Просмотр исходного кода

[微信第三方开发平台][修改]:状态修改

release_toaliyun_real
Stormeye Wu 7 лет назад
Родитель
Сommit
06ffd8fa27
1 измененных файлов: 14 добавлений и 10 удалений
  1. +14
    -10
      mallinkWechatOpen/src/main/java/com/iformall/controller/WechatWeappCodeController.java

+ 14
- 10
mallinkWechatOpen/src/main/java/com/iformall/controller/WechatWeappCodeController.java Просмотреть файл

@@ -478,21 +478,25 @@ public class WechatWeappCodeController {
@ApiOperation(value = "小程序审核撤回", notes = "单个帐号每天审核撤回次数最多不超过1次,一个月不超过10次。") @ApiOperation(value = "小程序审核撤回", notes = "单个帐号每天审核撤回次数最多不超过1次,一个月不超过10次。")
@GetMapping("/undoCodeAudit") @GetMapping("/undoCodeAudit")
public ResultData undoCodeAudit(String appId) { public ResultData undoCodeAudit(String appId) {
try {
WxOpenMaService openMaService = openService.getWxOpenComponentService().getWxMaServiceByAppid(appId);
WxOpenResult openResult = openMaService.undoCodeAudit();
WxWeappAuditStatus auditStatus = weappAuditStatusService.getByAppId(appId);
if(auditStatus != null) {
if(openResult.getErrcode().equals('0')) {
Gson gson = new GsonBuilder().create();
WxWeappAuditStatus auditStatus = weappAuditStatusService.getByAppId(appId);
if(auditStatus != null) {
try {
WxOpenMaService openMaService = openService.getWxOpenComponentService().getWxMaServiceByAppid(appId);
WxOpenResult openResult = openMaService.undoCodeAudit();
if(openResult.isSuccess()) {
auditStatus.setAuditStatus(EnumWeappAuditStatus.UNDO.getCode()); auditStatus.setAuditStatus(EnumWeappAuditStatus.UNDO.getCode());
auditStatus.setAuditErrCode(gson.toJson(openResult));
auditStatus.setAuditTime(new Date()); auditStatus.setAuditTime(new Date());
weappAuditStatusService.updateStatus(auditStatus); weappAuditStatusService.updateStatus(auditStatus);
return new ResultData("审核撤回成功");
} }
return new ResultData(Result.ERROR, "审核撤回失败");
} catch (WxErrorException e) {
logger.error(e.getMessage());
return new ResultData(Result.ERROR, e.getMessage());
} }
return new ResultData();
} catch (WxErrorException e) {
logger.error(e.getMessage());
return new ResultData(Result.ERROR, e.getMessage());
} }
return new ResultData(Result.ERROR, "没有审核记录,不能撤回");
} }
} }

Загрузка…
Отмена
Сохранить