diff --git a/src/main/java/com/gszc/controller/PcCustomV2Controller.java b/src/main/java/com/gszc/controller/PcCustomV2Controller.java index 5ee851e..c370c2a 100644 --- a/src/main/java/com/gszc/controller/PcCustomV2Controller.java +++ b/src/main/java/com/gszc/controller/PcCustomV2Controller.java @@ -27,9 +27,9 @@ public class PcCustomV2Controller { @PostMapping("/queryCustomCount") @ApiImplicitParam(name = "token", value = "token", required = true, dataType = "String", paramType = "header") @ApiOperation(value = "查看待接单、待认证公司数量", notes = "查看待接单、待认证公司数量") - public Result queryCustomCount() { + public Result queryCustomCount(String copycatId) { - JSONObject customs = customService.queryCustomCount(); + JSONObject customs = customService.queryCustomCount(copycatId); return ResultBuilder.withPayload(customs).build(); } diff --git a/src/main/java/com/gszc/service/impl/CustomServiceImpl.java b/src/main/java/com/gszc/service/impl/CustomServiceImpl.java index 2d01dd6..b0f3225 100644 --- a/src/main/java/com/gszc/service/impl/CustomServiceImpl.java +++ b/src/main/java/com/gszc/service/impl/CustomServiceImpl.java @@ -386,9 +386,15 @@ public class CustomServiceImpl extends ServiceImpl impleme return jsonObject; } - public JSONObject queryCustomCount(){ + public JSONObject queryCustomCount(String copycatId){ Integer todoCount = customMapper.selectCount(new EntityWrapper().eq("status_code", "todo")); - Integer disableCount = customMapper.selectCount(new EntityWrapper().eq("status_code", "disable")); + Integer disableCount = 0; + if(null!=copycatId){ + disableCount = customMapper.selectCount(new EntityWrapper().eq("status_code", "disable").eq("copycat_id",copycatId)); + }else { + disableCount = customMapper.selectCount(new EntityWrapper().eq("status_code", "disable")); + } + JSONObject jsonObject = new JSONObject(); jsonObject.put("todoCount",todoCount); jsonObject.put("disableCount",disableCount);