From 4ea1c82400f4177b3d731963791928d9d45c58be Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Mon, 27 May 2019 23:57:35 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=A1=E6=A0=B8=E5=A4=B1=E8=B4=A5][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9]:=E5=AE=A1=E6=A0=B8=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E5=A1=AB=E5=86=99screenshot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iformall/domain/po/WxWeappAuditStatus.java | 2 ++ .../service/wechat/handler/WeappAuditHandler.java | 11 ++++++----- pom.xml | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxWeappAuditStatus.java b/mallinkService/src/main/java/com/iformall/domain/po/WxWeappAuditStatus.java index 3fab9ff..37fedde 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxWeappAuditStatus.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxWeappAuditStatus.java @@ -39,6 +39,8 @@ public class WxWeappAuditStatus implements Serializable { private Integer auditStatus; @io.swagger.annotations.ApiModelProperty(value="审核错误码",name="auditErrCode") private String auditErrCode; + @io.swagger.annotations.ApiModelProperty(value="审核失败的小程序截图示例",name="screenShot") + private String screenShot; @io.swagger.annotations.ApiModelProperty(value="审核时间",name="auditTime") private Date auditTime; diff --git a/mallinkService/src/main/java/com/iformall/service/wechat/handler/WeappAuditHandler.java b/mallinkService/src/main/java/com/iformall/service/wechat/handler/WeappAuditHandler.java index e98c9bc..d05751c 100644 --- a/mallinkService/src/main/java/com/iformall/service/wechat/handler/WeappAuditHandler.java +++ b/mallinkService/src/main/java/com/iformall/service/wechat/handler/WeappAuditHandler.java @@ -43,14 +43,14 @@ public class WeappAuditHandler extends AbstractHandler { WxSessionManager sessionManager) { String appId = wxMpService.getWxMpConfigStorage().getAppId(); if(wxMessage.getEvent().equalsIgnoreCase(WxConsts.EventType.WEAPP_AUDIT_SUCCESS)) { - updateAuditStatus(appId, true, null); - } else if(wxMessage.getEvent().equalsIgnoreCase(WxConsts.EventType.WEAPP_AUDIT_SUCCESS)) { - updateAuditStatus(appId, false, wxMessage.getReason()); + updateAuditStatus(appId, true, new Date(wxMessage.getSuccTime()*1000), null, null); + } else if(wxMessage.getEvent().equalsIgnoreCase(WxConsts.EventType.WEAPP_AUDIT_FAIL)) { + updateAuditStatus(appId, false, new Date(wxMessage.getFailTime()*1000), wxMessage.getReason(), wxMessage.getScreenShot()); } return null; } - private void updateAuditStatus(String appId, boolean success, String reason) { + private void updateAuditStatus(String appId, boolean success, Date auditTime, String reason, String screenShot) { WxWeappAuditStatus auditStatus = weappAuditStatusService.getByAppId(appId); if (auditStatus != null) { if (success) { @@ -59,8 +59,9 @@ public class WeappAuditHandler extends AbstractHandler { } else { auditStatus.setAuditStatus(EnumWeappAuditStatus.FAIL.getCode()); auditStatus.setAuditErrCode(reason); + auditStatus.setScreenShot(screenShot); } - auditStatus.setAuditTime(new Date()); + auditStatus.setAuditTime(auditTime); weappAuditStatusService.updateStatus(auditStatus); } diff --git a/pom.xml b/pom.xml index cf73d3e..bce62b1 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ org.springframework.boot spring-boot-starter-parent - 2.1.4.RELEASE + 2.1.5.RELEASE