瀏覽代碼

[微信开发平台][修改]:审核状态查询

release_toaliyun_real
Stormeye Wu 7 年之前
父節點
當前提交
7d7f19c3fa
共有 1 個檔案被更改,包括 11 行新增8 行删除
  1. +11
    -8
      mallinkWechatOpen/src/main/java/com/iformall/controller/WxWeappInfoController.java

+ 11
- 8
mallinkWechatOpen/src/main/java/com/iformall/controller/WxWeappInfoController.java 查看文件

@@ -342,20 +342,23 @@ public class WxWeappInfoController extends BaseController {
} }
} }


@ApiOperation(value = "批量审核查询", notes = "{\"apps\":\"appid,appid\"}")
@ApiOperation(value = "批量审核查询", notes = "{\"version\":\"string\"}")
@PostMapping("batchAuditQuery") @PostMapping("batchAuditQuery")
public ResultData batchAuditQuery(@RequestBody Map<String, String> params) { public ResultData batchAuditQuery(@RequestBody Map<String, String> params) {
logger.debug("[" + getIpAddr() + "] WxWeappInfoController::batchAuditQuery"); logger.debug("[" + getIpAddr() + "] WxWeappInfoController::batchAuditQuery");
String appsStr = params.get("apps");
// 逐一设置app配置
String [] apps = appsStr.split(",");
for(String appId: apps) {
String version = params.get("version");
WxWeappCodeStatusVo queryVo = new WxWeappCodeStatusVo();
if(StringUtils.isNotBlank(version)) {
queryVo.setUserVersion(version);
}
List<WxWeappCodeStatusVo> apps = weappCodeStatusService.getList(queryVo);
apps.stream().forEach( app -> {
try { try {
WxOpenMaService openMaService = openService.getWxOpenComponentService().getWxMaServiceByAppid(appId);
WxOpenMaService openMaService = openService.getWxOpenComponentService().getWxMaServiceByAppid(app.getAppId());
WxOpenMaQueryAuditResult openResult = openMaService.getLatestAuditStatus(); WxOpenMaQueryAuditResult openResult = openMaService.getLatestAuditStatus();
logger.info(openResult.toString()); logger.info(openResult.toString());
if(openResult.isSuccess()) { if(openResult.isSuccess()) {
WxWeappCodeStatus codeStatus = weappCodeStatusService.getByAppId(appId);
WxWeappCodeStatus codeStatus = weappCodeStatusService.getByAppId(app.getAppId());
if(codeStatus != null) { if(codeStatus != null) {
// 审核状态,其中0为审核成功,1为审核失败,2为审核中,3已撤回 // 审核状态,其中0为审核成功,1为审核失败,2为审核中,3已撤回
switch (openResult.getStatus().intValue()) { switch (openResult.getStatus().intValue()) {
@@ -381,7 +384,7 @@ public class WxWeappInfoController extends BaseController {
} catch (WxErrorException e) { } catch (WxErrorException e) {
logger.error(e.getMessage()); logger.error(e.getMessage());
} }
}
});
return new ResultData(); return new ResultData();
} }




Loading…
取消
儲存