Browse Source

[wxjava][修改]:wxjava升级到3.7.0.A,支持审核加速

release^2
Stormeye Wu 6 years ago
parent
commit
ff47dc372f
4 changed files with 12 additions and 19 deletions
  1. +1
    -1
      mallinkService/src/main/java/com/iformall/service/wechat/FmOpenInRedisDBConfigStorage.java
  2. +3
    -4
      mallinkService/src/main/java/com/iformall/service/wechat/handler/WeappAuditHandler.java
  3. +1
    -1
      mlWechatOpen/src/main/java/com/iformall/controller/card/WxCardController.java
  4. +7
    -13
      pom.xml

+ 1
- 1
mallinkService/src/main/java/com/iformall/service/wechat/FmOpenInRedisDBConfigStorage.java View File

@@ -15,7 +15,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import redis.clients.jedis.Jedis; import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool; import redis.clients.jedis.JedisPool;
import redis.clients.util.Pool;
import redis.clients.jedis.util.Pool;


import java.util.Date; import java.util.Date;




+ 3
- 4
mallinkService/src/main/java/com/iformall/service/wechat/handler/WeappAuditHandler.java View File

@@ -43,14 +43,14 @@ public class WeappAuditHandler extends AbstractHandler {
WxSessionManager sessionManager) { WxSessionManager sessionManager) {
String appId = wxMpService.getWxMpConfigStorage().getAppId(); String appId = wxMpService.getWxMpConfigStorage().getAppId();
if(wxMessage.getEvent().equalsIgnoreCase(WxConsts.EventType.WEAPP_AUDIT_SUCCESS)) { if(wxMessage.getEvent().equalsIgnoreCase(WxConsts.EventType.WEAPP_AUDIT_SUCCESS)) {
updateAuditStatus(appId, true, new Date(wxMessage.getSuccTime()*1000), null, null);
updateAuditStatus(appId, true, new Date(wxMessage.getSuccTime()*1000), null);
} else if(wxMessage.getEvent().equalsIgnoreCase(WxConsts.EventType.WEAPP_AUDIT_FAIL)) { } else if(wxMessage.getEvent().equalsIgnoreCase(WxConsts.EventType.WEAPP_AUDIT_FAIL)) {
updateAuditStatus(appId, false, new Date(wxMessage.getFailTime()*1000), wxMessage.getReason(), wxMessage.getScreenShot());
updateAuditStatus(appId, false, new Date(wxMessage.getFailTime()*1000), wxMessage.getReason());
} }
return null; return null;
} }


private void updateAuditStatus(String appId, boolean success, Date auditTime, String reason, String screenShot) {
private void updateAuditStatus(String appId, boolean success, Date auditTime, String reason) {
WxWeappAuditStatus auditStatus = weappAuditStatusService.getByAppId(appId); WxWeappAuditStatus auditStatus = weappAuditStatusService.getByAppId(appId);
if (auditStatus != null) { if (auditStatus != null) {
if (success) { if (success) {
@@ -59,7 +59,6 @@ public class WeappAuditHandler extends AbstractHandler {
} else { } else {
auditStatus.setAuditStatus(EnumWeappAuditStatus.FAIL.getCode()); auditStatus.setAuditStatus(EnumWeappAuditStatus.FAIL.getCode());
auditStatus.setAuditErrCode(reason); auditStatus.setAuditErrCode(reason);
auditStatus.setScreenShot(screenShot);
} }
auditStatus.setAuditTime(auditTime); auditStatus.setAuditTime(auditTime);
weappAuditStatusService.updateStatus(auditStatus); weappAuditStatusService.updateStatus(auditStatus);


+ 1
- 1
mlWechatOpen/src/main/java/com/iformall/controller/card/WxCardController.java View File

@@ -276,7 +276,7 @@ public class WxCardController extends BaseController {
logger.debug("[" + getIpAddr() + "] WxCardController::getCardList"); logger.debug("[" + getIpAddr() + "] WxCardController::getCardList");
try { try {
WxMpService mpService = openService.getWxOpenComponentService().getWxMpServiceByAppid(appId); WxMpService mpService = openService.getWxOpenComponentService().getWxMpServiceByAppid(appId);
WxMpCardUserGetCardListResult result = mpService.getCardService().getUserCardList(openId, null);
WxUserCardListResult result = mpService.getCardService().getUserCardList(openId, null);
logger.info(result.toString()); logger.info(result.toString());
} catch (WxErrorException e) { } catch (WxErrorException e) {
logger.error(e.getMessage()); logger.error(e.getMessage());


+ 7
- 13
pom.xml View File

@@ -18,16 +18,16 @@
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.8.RELEASE</version>
<version>2.2.5.RELEASE</version>
<relativePath/> <relativePath/>
</parent> </parent>


<properties> <properties>
<weixin-java-common.version>3.6.0.A</weixin-java-common.version>
<weixin-java-mp.version>3.6.0.A</weixin-java-mp.version>
<weixin-java-miniapp.version>3.6.0.A</weixin-java-miniapp.version>
<weixin-java-pay.version>3.6.0.A</weixin-java-pay.version>
<weixin-java-open.version>3.6.0.A</weixin-java-open.version>
<weixin-java-common.version>3.7.0.A</weixin-java-common.version>
<weixin-java-mp.version>3.7.0.A</weixin-java-mp.version>
<weixin-java-miniapp.version>3.7.0.A</weixin-java-miniapp.version>
<weixin-java-pay.version>3.7.0.A</weixin-java-pay.version>
<weixin-java-open.version>3.7.0.A</weixin-java-open.version>
<quartz.version>2.3.0</quartz.version> <quartz.version>2.3.0</quartz.version>
</properties> </properties>


@@ -101,13 +101,7 @@
<dependency> <dependency>
<groupId>com.baomidou</groupId> <groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId> <artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.1.0</version>
</dependency>

<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.1.0</version>
<version>3.3.1</version>
</dependency> </dependency>


<dependency> <dependency>


Loading…
Cancel
Save