Commit 290a3763 authored by 竹天卫's avatar 竹天卫

正式部署代码

parent 87d5da31
......@@ -203,14 +203,11 @@
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>*.xlsx</include>
<include>*.properties</include>
<include>*.xml</include>
</includes>
<excludes>
<exclude>*.yml</exclude>
</excludes>
<include>*.xlsx</include>
<include>*</include>
</includes>
</resource>
<resource>
<directory>src/main/resources/templates</directory>
<filtering>true</filtering>
......
......@@ -36,9 +36,9 @@ public class WeiXinController {
log.debug("=============================================");
try {
//测试服务器
return weiXinService.getTestToken(code);
// return weiXinService.getTestToken(code);
//正式服务器
// return weiXinService.getToken(code, "APP");
return weiXinService.getToken(code, "APP");
} catch (Exception e) {
log.debug("获取登录token{}", e);
}
......@@ -50,9 +50,9 @@ public class WeiXinController {
public BaseResponse getPCToken(String code) {
try {
//测试服务器
return weiXinService.getTestToken(code);
// return weiXinService.getTestToken(code);
//正式服务器
// return weiXinService.getToken(code, "PC");
return weiXinService.getToken(code, "PC");
} catch (Exception e) {
log.debug("获取登录token{}", e);
}
......
......@@ -127,7 +127,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
private EntityEnclosureMapper entityEnclosureMapper;
@Value("${weixin.systemUrl}")
private static String systemUrl;
private String systemUrl;
/**
* 委托分页
*
......
......@@ -66,7 +66,7 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
@Autowired
private WeiXinService weiXinService;
@Value("${weixin.systemUrl}")
private static String systemUrl;
private String systemUrl;
/**
* 设备分页查询
......
......@@ -236,9 +236,9 @@ public class PlanConsumablesPurchaseServiceImpl extends ServiceImpl<PlanConsumab
log.debug("没有找到数据!");
}
Map<String, Object> beanParams = new HashMap<>();
records.add(records.get(0));
// records.add(records.get(0));
beanParams.put("list", records);
beanParams.put("fileNo","");
beanParams.put("fileNo","41-4051-2001");
beanParams.put("year", DateUtil.year(DateUtil.date()) +"");
WordUtil.writeWordReport("消耗品采购计划.docx", "消耗品采购计划.ftl", beanParams, response, FileExt.DOC);
}
......
......@@ -76,7 +76,7 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
@Autowired
private WeiXinService weiXinService;
@Value("${weixin.systemUrl}")
private static String systemUrl;
private String systemUrl;
/**
......
......@@ -35,15 +35,11 @@ public class WeiXinService {
RedisUtil redisUtil;
@Value("${weixin.corpId}")
private static String corpId;
private String corpId;
@Value("${weixin.agentId}")
private static int agentId;
private int agentId;
@Value("${weixin.agentSecret}")
private static String agentSecret;
private String agentSecret;
final static String ACCESS_TOKEN = "ACCESS_TOKEN";
final static String JSAPITICKET = "JSAPITICKET";
......@@ -154,7 +150,6 @@ public class WeiXinService {
public String getToken() {
String accessToken;
if (!redisUtil.existsKey(ACCESS_TOKEN)) {
String param = "corpid=%s&corpsecret=%s";
param = String.format(param, corpId, agentSecret);
......
......@@ -34,11 +34,11 @@ public class WeiXinUtil {
public final static String jsapi_ticket_url = "https://qyapi.weixin.qq.com/cgi-bin/get_jsapi_ticket?access_token=ACCESSTOKEN";
@Value("${weixin.corpId}")
private static String corpId;
private String corpId;
@Value("${weixin.agentId}")
private static int agentId;
private int agentId;
@Value("${weixin.agentSecret}")
private static String agentSecret;
private String agentSecret;
......@@ -368,7 +368,7 @@ public class WeiXinUtil {
String nonceStr = UUID.randomUUID().toString(); // 必填,生成签名的随机串
//System.out.println("nonceStr:"+nonceStr);
String accessToken=WeiXinUtil.getAccessToken(corpId, agentSecret).getToken();
String accessToken=WeiXinUtil.getAccessToken(Global.corpId, Global.agentSecret).getToken();
String jsapi_ticket =getJsapiTicket(accessToken);// 必填,生成签名的H5应用调用企业微信JS接口的临时票据
//System.out.println("jsapi_ticket:"+jsapi_ticket);
String timestamp = Long.toString(System.currentTimeMillis() / 1000); // 必填,生成签名的时间戳
......@@ -392,7 +392,7 @@ public class WeiXinUtil {
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
ret.put("appId", corpId);
ret.put("appId", Global.corpId);
ret.put("timestamp", timestamp);
ret.put("nonceStr", nonceStr);
ret.put("signature", signature);
......
......@@ -7,8 +7,8 @@ spring:
active: dev
datasource:
# 192.168.110.85 admin!@#123
url: jdbc:mysql://192.168.110.85:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
# url: jdbc:mysql://47.93.148.213:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
# url: jdbc:mysql://192.168.110.85:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
url: jdbc:mysql://47.93.148.213:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: root
password: admin!@#123
driverClassName: com.mysql.cj.jdbc.Driver
......
......@@ -4,7 +4,7 @@ fastdfs.charset=UTF-8
fastdfs.http.tracker_http_port=8888
fastdfs.http.anti_steal_token=no
fastdfs.http.secret_key=FastDFS1234567890
fastdfs.tracker_servers=192.168.110.85:22122
fastdfs.tracker_servers=localhost:22122
#fastdfs.tracker_servers=localhost:22122
......@@ -34,11 +34,11 @@
<version>2.0.6.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.artofsolving/jodconverter -->
<dependency>
<!-- <dependency>
<groupId>com.artofsolving</groupId>
<artifactId>jodconverter</artifactId>
<version>2.2.1</version>
</dependency>
</dependency>-->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment