ky 5 years ago
parent ffcc8d9373
commit 1f5b46488d

@ -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();
}

@ -386,9 +386,15 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
return jsonObject;
}
public JSONObject queryCustomCount(){
public JSONObject queryCustomCount(String copycatId){
Integer todoCount = customMapper.selectCount(new EntityWrapper<Custom>().eq("status_code", "todo"));
Integer disableCount = customMapper.selectCount(new EntityWrapper<Custom>().eq("status_code", "disable"));
Integer disableCount = 0;
if(null!=copycatId){
disableCount = customMapper.selectCount(new EntityWrapper<Custom>().eq("status_code", "disable").eq("copycat_id",copycatId));
}else {
disableCount = customMapper.selectCount(new EntityWrapper<Custom>().eq("status_code", "disable"));
}
JSONObject jsonObject = new JSONObject();
jsonObject.put("todoCount",todoCount);
jsonObject.put("disableCount",disableCount);

Loading…
Cancel
Save