|
|
|
@@ -342,20 +342,23 @@ public class WxWeappInfoController extends BaseController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation(value = "批量审核查询", notes = "{\"apps\":\"appid,appid\"}") |
|
|
|
@ApiOperation(value = "批量审核查询", notes = "{\"version\":\"string\"}") |
|
|
|
@PostMapping("batchAuditQuery") |
|
|
|
public ResultData batchAuditQuery(@RequestBody Map<String, String> params) { |
|
|
|
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 { |
|
|
|
WxOpenMaService openMaService = openService.getWxOpenComponentService().getWxMaServiceByAppid(appId); |
|
|
|
WxOpenMaService openMaService = openService.getWxOpenComponentService().getWxMaServiceByAppid(app.getAppId()); |
|
|
|
WxOpenMaQueryAuditResult openResult = openMaService.getLatestAuditStatus(); |
|
|
|
logger.info(openResult.toString()); |
|
|
|
if(openResult.isSuccess()) { |
|
|
|
WxWeappCodeStatus codeStatus = weappCodeStatusService.getByAppId(appId); |
|
|
|
WxWeappCodeStatus codeStatus = weappCodeStatusService.getByAppId(app.getAppId()); |
|
|
|
if(codeStatus != null) { |
|
|
|
// 审核状态,其中0为审核成功,1为审核失败,2为审核中,3已撤回 |
|
|
|
switch (openResult.getStatus().intValue()) { |
|
|
|
@@ -381,7 +384,7 @@ public class WxWeappInfoController extends BaseController { |
|
|
|
} catch (WxErrorException e) { |
|
|
|
logger.error(e.getMessage()); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
return new ResultData(); |
|
|
|
} |
|
|
|
|
|
|
|
|