From 1f5b46488da9e9ecede7dc6424fc3f306f56fca8 Mon Sep 17 00:00:00 2001 From: ky <592468495@qq.com> Date: Tue, 26 May 2020 14:46:47 +0800 Subject: [PATCH] p --- .../java/com/gszc/controller/PcCustomV2Controller.java | 4 ++-- .../java/com/gszc/service/impl/CustomServiceImpl.java | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) 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);