diff --git a/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/controller/TbCompanyVerificationController.java b/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/controller/TbCompanyVerificationController.java index bd92b60..8864e43 100644 --- a/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/controller/TbCompanyVerificationController.java +++ b/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/controller/TbCompanyVerificationController.java @@ -244,23 +244,18 @@ public class TbCompanyVerificationController extends BaseController { return toAjax(tbCompanyVerificationService.deleteTbCompanyVerificationByIds(ids)); } - @GetMapping("/readCount") + @GetMapping("/readCount/{companyId}") @ApiOperation("获取已读未读数量") @ApiOperationSupport(author = "张二富", order = 25) @ApiImplicitParam(name = "companyId", value = "企业id", required = true) - public R readCount(@RequestBody TbCompanyVerification tbCompanyVerification){ - if (tbCompanyVerification!=null&&tbCompanyVerification.getCompanyId()!=null&&StringUtils.isBlank(tbCompanyVerification.getCompanyId()+"")){ - R rspData = new R<>(); - rspData.setCode(HttpStatus.SUCCESS); - rspData.setMsg("查询成功"); - return rspData; - } + public R readCount(@PathVariable("companyId") Long companyId){ + HashMap map = new HashMap<>(); QueryWrapper total = new QueryWrapper<>(); total.eq(StringUtils.camelToUnderline(TbCompanyVerification.Fields.isDel),"1"); total.eq(StringUtils.camelToUnderline(TbCompanyVerification.Fields.auditState),"0"); - total.eq(StringUtils.camelToUnderline(TbCompanyVerification.Fields.companyId),tbCompanyVerification.getCompanyId()); + total.eq(StringUtils.camelToUnderline(TbCompanyVerification.Fields.companyId),companyId); List totalList = tbCompanyVerificationService.list(total); @@ -268,7 +263,7 @@ public class TbCompanyVerificationController extends BaseController { readTrue.eq(StringUtils.camelToUnderline(TbCompanyVerification.Fields.isDel),"1"); readTrue.eq(StringUtils.camelToUnderline(TbCompanyVerification.Fields.auditState),"0"); readTrue.eq(StringUtils.camelToUnderline(TbCompanyVerification.Fields.readState),"0"); - readTrue.eq(StringUtils.camelToUnderline(TbCompanyVerification.Fields.companyId),tbCompanyVerification.getCompanyId()); + readTrue.eq(StringUtils.camelToUnderline(TbCompanyVerification.Fields.companyId),companyId); List readTrueList = tbCompanyVerificationService.list(readTrue); @@ -277,7 +272,7 @@ public class TbCompanyVerificationController extends BaseController { readFalse.eq(StringUtils.camelToUnderline(TbCompanyVerification.Fields.isDel),"1"); readFalse.eq(StringUtils.camelToUnderline(TbCompanyVerification.Fields.auditState),"0"); readFalse.eq(StringUtils.camelToUnderline(TbCompanyVerification.Fields.readState),"1"); - readFalse.eq(StringUtils.camelToUnderline(TbCompanyVerification.Fields.companyId),tbCompanyVerification.getCompanyId()); + readFalse.eq(StringUtils.camelToUnderline(TbCompanyVerification.Fields.companyId),companyId); List readFalseList =tbCompanyVerificationService.list(readFalse); map.put("totalCount",totalList.size()); map.put("readTrueCount",readTrueList.size());