| @@ -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, "没有审核记录,不能撤回"); | |||||
| } | } | ||||
| } | } | ||||