wangqing 4 years ago
parent
commit
0bf2796383
  1. 4
      tduck-api/src/main/java/com/tduck/cloud/api/handler/WxMpUserSubscribeEventHandler.java
  2. 2
      tduck-api/src/main/java/com/tduck/cloud/api/util/SignUtils.java
  3. 4
      tduck-api/src/main/resources/application.yml
  4. 2
      tduck-wx-mp/src/main/java/com/tduck/cloud/wx/mp/handler/SubscribeHandler.java

4
tduck-api/src/main/java/com/tduck/cloud/api/handler/WxMpUserSubscribeEventHandler.java

@ -23,9 +23,9 @@ import org.springframework.stereotype.Component;
@RequiredArgsConstructor @RequiredArgsConstructor
public class WxMpUserSubscribeEventHandler { public class WxMpUserSubscribeEventHandler {
private UserService userService; private final UserService userService;
private WxMpUserService wxMpUserService; private final WxMpUserService wxMpUserService;
private final LoginScanStrategy loginScanStrategy; private final LoginScanStrategy loginScanStrategy;

2
tduck-api/src/main/java/com/tduck/cloud/api/util/SignUtils.java

@ -33,8 +33,6 @@ public class SignUtils {
return false; return false;
} }
String paramsSign = getParamsSign(params, secret); String paramsSign = getParamsSign(params, secret);
log.debug("params:{}",JsonUtils.objToJson(params));
log.debug("sign1 {} sign2 {} result:{}", paramsSign, urlSign,urlSign.equals(paramsSign));
return StringUtils.isNotBlank(paramsSign) && urlSign.equals(paramsSign); return StringUtils.isNotBlank(paramsSign) && urlSign.equals(paramsSign);
} }

4
tduck-api/src/main/resources/application.yml

@ -2,7 +2,7 @@ spring:
application: application:
name: tduck-api name: tduck-api
profiles: profiles:
active: dev1 active: dev
jackson: jackson:
time-zone: GMT+8 time-zone: GMT+8
date-format: yyyy-MM-dd HH:mm:ss date-format: yyyy-MM-dd HH:mm:ss
@ -46,7 +46,7 @@ mybatis-plus:
# 请求日志是否打印 # 请求日志是否打印
platform: platform:
request: request:
trace-log: false trace-log: true
sign: sign:
enable: false enable: false
secret: 916lWh2WMcbSWiHv secret: 916lWh2WMcbSWiHv

2
tduck-wx-mp/src/main/java/com/tduck/cloud/wx/mp/handler/SubscribeHandler.java

@ -85,7 +85,7 @@ public class SubscribeHandler extends AbstractHandler {
} }
try { try {
return new TextBuilder().build("感谢关注", wxMessage, weixinService); return new TextBuilder().build("你好,欢迎关注Tduck填鸭!", wxMessage, weixinService);
} catch (Exception e) { } catch (Exception e) {
this.logger.error(e.getMessage(), e); this.logger.error(e.getMessage(), e);
} }

Loading…
Cancel
Save