From e756906ffa868b1300c66427809cf3d1402d8f0d Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Mon, 26 Oct 2020 16:11:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../partyorganize/PartyOrganizeController.java | 10 +++++++++- .../PartyOrganizeAppController.java | 8 ++++++++ .../PartyOrganizeResourceController.java | 8 ++++++++ .../dao/partyorganize/IPartyOrganizeDao.java | 7 +++++++ .../partyorganize/IPartyOrganizeService.java | 7 +++++++ .../impl/PartyOrganizeServiceImpl.java | 16 ++++++++++++++++ .../partyorganize/partyorganize-mapper.xml | 12 ++++++++++++ .../route/partyorganize/save-partyorganize.html | 4 ++-- .../partyorganize/update-partyorganize.html | 7 ++++++- 9 files changed, 75 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/cm/partybuilding/controller/apis/partyorganize/PartyOrganizeController.java b/src/main/java/com/cm/partybuilding/controller/apis/partyorganize/PartyOrganizeController.java index cf14ac2..e714fb1 100644 --- a/src/main/java/com/cm/partybuilding/controller/apis/partyorganize/PartyOrganizeController.java +++ b/src/main/java/com/cm/partybuilding/controller/apis/partyorganize/PartyOrganizeController.java @@ -26,7 +26,7 @@ import java.util.Map; /** * @ClassName: PartyOrganizeController * @Description: 党组织 - * @Author: WenG + * @Author: renpc * @Date: 2020-10-16 14:24 * @Version: 1.0 **/ @@ -118,4 +118,12 @@ public class PartyOrganizeController extends AbstractController { return securityComponent.getCurrentUserIdInfo(); } + @ApiOperation(value = "该党组织中党员人数统计", notes = "该党组织中党员人数统计接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("countpartymember") + SuccessResultData countPartyMember() throws SearchException { + Map params = requestParams(); + return partyOrganizeService.countPartyMember(params); + } + } \ No newline at end of file diff --git a/src/main/java/com/cm/partybuilding/controller/app/apis/partyorganize/PartyOrganizeAppController.java b/src/main/java/com/cm/partybuilding/controller/app/apis/partyorganize/PartyOrganizeAppController.java index dacf90c..77f0421 100644 --- a/src/main/java/com/cm/partybuilding/controller/app/apis/partyorganize/PartyOrganizeAppController.java +++ b/src/main/java/com/cm/partybuilding/controller/app/apis/partyorganize/PartyOrganizeAppController.java @@ -116,4 +116,12 @@ public class PartyOrganizeAppController extends AbstractController { return partyOrganizeService.countPartyOrganize(params); } + @ApiOperation(value = "该党组织中党员人数统计", notes = "该党组织中党员人数统计接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("countpartymember") + SuccessResultData countPartyMember() throws SearchException { + Map params = requestParams(); + return partyOrganizeService.countPartyMember(params); + } + } \ No newline at end of file diff --git a/src/main/java/com/cm/partybuilding/controller/resources/partyorganize/PartyOrganizeResourceController.java b/src/main/java/com/cm/partybuilding/controller/resources/partyorganize/PartyOrganizeResourceController.java index 1573be3..e6fd681 100644 --- a/src/main/java/com/cm/partybuilding/controller/resources/partyorganize/PartyOrganizeResourceController.java +++ b/src/main/java/com/cm/partybuilding/controller/resources/partyorganize/PartyOrganizeResourceController.java @@ -117,4 +117,12 @@ public class PartyOrganizeResourceController extends AbstractController { return partyOrganizeService.countPartyOrganize(params); } + @ApiOperation(value = "该党组织中党员人数统计", notes = "该党组织中党员人数统计接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("countpartymember") + SuccessResultData countPartyMember() throws SearchException { + Map params = requestParams(); + return partyOrganizeService.countPartyMember(params); + } + } \ No newline at end of file diff --git a/src/main/java/com/cm/partybuilding/dao/partyorganize/IPartyOrganizeDao.java b/src/main/java/com/cm/partybuilding/dao/partyorganize/IPartyOrganizeDao.java index db00b9e..ad83d8e 100644 --- a/src/main/java/com/cm/partybuilding/dao/partyorganize/IPartyOrganizeDao.java +++ b/src/main/java/com/cm/partybuilding/dao/partyorganize/IPartyOrganizeDao.java @@ -80,4 +80,11 @@ public interface IPartyOrganizeDao { */ Integer countPartyOrganize(Map params) throws SearchException; + /** + * 计算党组织中的党员数量 + * @param params + * @return + * @throws SearchException + */ + Integer countPartyMemberOfPartyOrganize(Map params) throws SearchException; } \ No newline at end of file diff --git a/src/main/java/com/cm/partybuilding/service/partyorganize/IPartyOrganizeService.java b/src/main/java/com/cm/partybuilding/service/partyorganize/IPartyOrganizeService.java index b40dc73..d04718d 100644 --- a/src/main/java/com/cm/partybuilding/service/partyorganize/IPartyOrganizeService.java +++ b/src/main/java/com/cm/partybuilding/service/partyorganize/IPartyOrganizeService.java @@ -153,4 +153,11 @@ public interface IPartyOrganizeService { */ SuccessResultData countPartyOrganize(Map params) throws SearchException; + /** + * 该党组织中党员人数统计 + * @param params + * @return + * @throws SearchException + */ + SuccessResultData countPartyMember(Map params) throws SearchException; } \ No newline at end of file diff --git a/src/main/java/com/cm/partybuilding/service/partyorganize/impl/PartyOrganizeServiceImpl.java b/src/main/java/com/cm/partybuilding/service/partyorganize/impl/PartyOrganizeServiceImpl.java index f52a9d3..0bdd21a 100644 --- a/src/main/java/com/cm/partybuilding/service/partyorganize/impl/PartyOrganizeServiceImpl.java +++ b/src/main/java/com/cm/partybuilding/service/partyorganize/impl/PartyOrganizeServiceImpl.java @@ -189,4 +189,20 @@ public class PartyOrganizeServiceImpl extends AbstractService implements IPartyO return new SuccessResultData<>(countNumberPartyOrganize(params)); } + @Override + public SuccessResultData countPartyMember(Map params) throws SearchException { + return new SuccessResultData<>(countPartyMemberOfPartyOrganize(params)); + } + + /** + * 计算党组织中的党员数量(私有方法) + * @param params + * @return + * @throws SearchException + */ + private Integer countPartyMemberOfPartyOrganize(Map params) throws SearchException { + Integer count = partyOrganizeDao.countPartyMemberOfPartyOrganize(params); + return count == null ? 0 : count; + } + } \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/partyorganize/partyorganize-mapper.xml b/src/main/resources/mybatis/mapper/partyorganize/partyorganize-mapper.xml index 6cbff97..617e095 100644 --- a/src/main/resources/mybatis/mapper/partyorganize/partyorganize-mapper.xml +++ b/src/main/resources/mybatis/mapper/partyorganize/partyorganize-mapper.xml @@ -398,4 +398,16 @@ t1.is_delete = 0 + + \ No newline at end of file diff --git a/src/main/resources/static/route/partyorganize/save-partyorganize.html b/src/main/resources/static/route/partyorganize/save-partyorganize.html index 8630d14..81ab064 100644 --- a/src/main/resources/static/route/partyorganize/save-partyorganize.html +++ b/src/main/resources/static/route/partyorganize/save-partyorganize.html @@ -61,9 +61,9 @@
-
+