From ca8d589a50c13abf7f29fc6b9cca5d497c830b5f Mon Sep 17 00:00:00 2001 From: zef <1146339010@QQ.com> Date: Mon, 8 Jul 2024 11:05:56 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=8E=A5=E5=8F=A3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E8=B7=AF=E5=BE=84=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TbCompanyVerificationController.java | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) 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());