Browse Source

[审核退回][修改]:计入wx_authorize_info

release
Stormeye Wu 7 years ago
parent
commit
4db59b50ec
7 changed files with 1201 additions and 1 deletions
  1. +6
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxAuthorizerInfo.java
  2. +2
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxAuthorizerInfoMapper.java
  3. +2
    -0
      mallinkService/src/main/java/com/iformall/service/WxAuthorizerInfoService.java
  4. +21
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxAuthorizerInfoServiceImpl.java
  5. +1156
    -0
      mallinkService/src/main/java/com/iformall/utils/DateUtils.java
  6. +6
    -0
      mallinkService/src/main/resources/mapper/WxAuthorizerInfoMapper.xml
  7. +8
    -1
      mlWechatOpen/src/main/java/com/iformall/controller/WechatWeappCodeController.java

+ 6
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxAuthorizerInfo.java View File

@@ -57,6 +57,10 @@ public class WxAuthorizerInfo implements Serializable {
private Integer templateStatus; private Integer templateStatus;
@io.swagger.annotations.ApiModelProperty(value="微信小程序模板设置时间",name="templateTime") @io.swagger.annotations.ApiModelProperty(value="微信小程序模板设置时间",name="templateTime")
private Date templateTime; private Date templateTime;
@io.swagger.annotations.ApiModelProperty(value="小程序每月审核撤回次数",name="auditBackNum")
private Integer auditBackNum;
@io.swagger.annotations.ApiModelProperty(value="微信小程序审核最后撤回时间",name="auditBackTime")
private Date auditBackTime;
@io.swagger.annotations.ApiModelProperty(value="当前版本",name="currentVersion") @io.swagger.annotations.ApiModelProperty(value="当前版本",name="currentVersion")
private String currentVersion; private String currentVersion;
@io.swagger.annotations.ApiModelProperty(value="当前版本描述",name="currentDesc") @io.swagger.annotations.ApiModelProperty(value="当前版本描述",name="currentDesc")
@@ -96,6 +100,8 @@ public class WxAuthorizerInfo implements Serializable {
,WebDomainTime_ASC("`webdomain_time` ASC"),WebDomainTime_DESC("`webdomain_time` DESC") ,WebDomainTime_ASC("`webdomain_time` ASC"),WebDomainTime_DESC("`webdomain_time` DESC")
,TemplateStatus_ASC("`template_status` ASC"),TemplateStatus_DESC("`template_status` DESC") ,TemplateStatus_ASC("`template_status` ASC"),TemplateStatus_DESC("`template_status` DESC")
,TemplateTime_ASC("`template_time` ASC"),TemplateTime_DESC("`template_time` DESC") ,TemplateTime_ASC("`template_time` ASC"),TemplateTime_DESC("`template_time` DESC")
,AuditBackNum_ASC("`audit_back_num` ASC"),AuditBackNum_DESC("`audit_back_num` DESC")
,AuditBackTime_ASC("`audit_back_time` ASC"),AuditBackTime_DESC("`audit_back_time` DESC")
,CurrentVersion_ASC("`current_version` ASC"),CurrentVersion_DESC("`current_version` DESC") ,CurrentVersion_ASC("`current_version` ASC"),CurrentVersion_DESC("`current_version` DESC")
,CurrentDesc_ASC("`current_desc` ASC"),CurrentDesc_DESC("`current_desc` DESC") ,CurrentDesc_ASC("`current_desc` ASC"),CurrentDesc_DESC("`current_desc` DESC")
,ReleaseTime_ASC("`release_time` ASC"),ReleaseTime_DESC("`release_time` DESC") ,ReleaseTime_ASC("`release_time` ASC"),ReleaseTime_DESC("`release_time` DESC")


+ 2
- 0
mallinkService/src/main/java/com/iformall/mapper/WxAuthorizerInfoMapper.java View File

@@ -21,6 +21,8 @@ public interface WxAuthorizerInfoMapper extends CommonMapper<WxAuthorizerInfo, L


int updateAccessToken(WxAuthorizerInfo wxAuthorizerInfo); int updateAccessToken(WxAuthorizerInfo wxAuthorizerInfo);


int updateAuthBackInfo(WxAuthorizerInfo wxAuthorizerInfo);

int removeOpenAppId(WxAuthorizerInfo wxAuthorizerInfo); int removeOpenAppId(WxAuthorizerInfo wxAuthorizerInfo);


List<WxWeappInfo> findWeappList(); List<WxWeappInfo> findWeappList();


+ 2
- 0
mallinkService/src/main/java/com/iformall/service/WxAuthorizerInfoService.java View File

@@ -82,4 +82,6 @@ public interface WxAuthorizerInfoService {


int updateAuthAppidInfo(WxAuthorizerInfo record); int updateAuthAppidInfo(WxAuthorizerInfo record);


int updateAuthBackInfo(WxAuthorizerInfo record);

} }

+ 21
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxAuthorizerInfoServiceImpl.java View File

@@ -12,6 +12,7 @@ import com.iformall.mapper.WxAppinfoMapper;
import com.iformall.mapper.WxAuthorizerInfoMapper; import com.iformall.mapper.WxAuthorizerInfoMapper;
import com.iformall.mapper.WxWeappExtSetMapper; import com.iformall.mapper.WxWeappExtSetMapper;
import com.iformall.service.WxAuthorizerInfoService; import com.iformall.service.WxAuthorizerInfoService;
import com.iformall.utils.DateUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@@ -204,6 +205,26 @@ public class WxAuthorizerInfoServiceImpl implements WxAuthorizerInfoService {




} }

@Override
public int updateAuthBackInfo(WxAuthorizerInfo record) {
WxAuthorizerInfo authorizerInfo = authorizerInfoMapper.findByAppid(record.getAuthorizerAppid());
if(authorizerInfo != null) {
if(DateUtils.isSameMonth(authorizerInfo.getAuditBackTime(), record.getAuditBackTime()))
{
// 同一个月,增加
record.setId(authorizerInfo.getId());
return authorizerInfoMapper.updateAuthBackInfo(record);
} else {
// 不是同一个月,重置authBackNum
record.setAuditBackNum(1);
return authorizerInfoMapper.updateByPrimaryKeySelective(record);
}
} else {
/// TODO
}
return 0;
}


+ 1156
- 0
mallinkService/src/main/java/com/iformall/utils/DateUtils.java
File diff suppressed because it is too large
View File


+ 6
- 0
mallinkService/src/main/resources/mapper/WxAuthorizerInfoMapper.xml View File

@@ -147,6 +147,12 @@
where `authorizer_appid` = #{authorizerAppid} where `authorizer_appid` = #{authorizerAppid}
</update> </update>


<update id="updateAuthBackInfo" parameterType="com.iformall.domain.po.WxAuthorizerInfo">
update wx_authorizer_info
set `auth_back_num` = `auth_back_num` + 1, `auth_back_time` = #{authBackTime}
where `authorizer_appid` = #{authorizerAppid}
</update>

<update id="removeOpenAppId" parameterType="com.iformall.domain.po.WxAuthorizerInfo"> <update id="removeOpenAppId" parameterType="com.iformall.domain.po.WxAuthorizerInfo">
update wx_authorizer_info update wx_authorizer_info
set `open_appid` = null, `bind_open_time` = null set `open_appid` = null, `bind_open_time` = null


+ 8
- 1
mlWechatOpen/src/main/java/com/iformall/controller/WechatWeappCodeController.java View File

@@ -637,11 +637,18 @@ public class WechatWeappCodeController {
try { try {
WxOpenMaService openMaService = openService.getWxOpenComponentService().getWxMaServiceByAppid(appId); WxOpenMaService openMaService = openService.getWxOpenComponentService().getWxMaServiceByAppid(appId);
WxOpenResult openResult = openMaService.undoCodeAudit(); WxOpenResult openResult = openMaService.undoCodeAudit();
Date curDate = new Date();
if(openResult.isSuccess()) { if(openResult.isSuccess()) {
// 审核状态
auditStatus.setAuditStatus(EnumWeappAuditStatus.UNDO.getCode()); auditStatus.setAuditStatus(EnumWeappAuditStatus.UNDO.getCode());
auditStatus.setAuditErrCode(gson.toJson(openResult)); auditStatus.setAuditErrCode(gson.toJson(openResult));
auditStatus.setAuditTime(new Date());
auditStatus.setAuditTime(curDate);
weappAuditStatusService.updateStatus(auditStatus); weappAuditStatusService.updateStatus(auditStatus);
// 审核次数记入wx_authorizer_info
WxAuthorizerInfo authorizerInfo = new WxAuthorizerInfo();
authorizerInfo.setAuthorizerAppid(appId);
authorizerInfo.setAuditBackTime(curDate);
authorizerInfoService.updateAuthBackInfo(authorizerInfo);
return new ResultData("审核撤回成功"); return new ResultData("审核撤回成功");
} }
return new ResultData(Result.ERROR, "审核撤回失败"); return new ResultData(Result.ERROR, "审核撤回失败");


Loading…
Cancel
Save