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

正式部署代码

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