| | |
| | | @OperLog(operModul = "党委管理", operType = 1) |
| | | @ApiOperation(value = "新增党委") |
| | | @PostMapping("addpartycommittee") |
| | | public R addPartyCommittee(@RequestBody PartyCommitteeVO partyCommitteeVO) { |
| | | public R addPartyCommittee(@RequestBody @Validated(AddGroup.class) PartyCommitteeVO partyCommitteeVO) { |
| | | Long communityId = this.getCommunityId(); |
| | | partyCommitteeVO.setCommunityId(communityId); |
| | | return partyBuildingService.addPartyCommittee(partyCommitteeVO); |
| | |
| | | @OperLog(operModul = "党委管理", operType = 2) |
| | | @ApiOperation(value = "编辑党委") |
| | | @PutMapping("updatepartycommittee") |
| | | public R updatePartyCommittee(@RequestBody PartyCommitteeVO partyCommitteeVO) { |
| | | public R updatePartyCommittee(@RequestBody @Validated(AddGroup.class) PartyCommitteeVO partyCommitteeVO) { |
| | | Long id = partyCommitteeVO.getId(); |
| | | if (null == id || 0 == id) { |
| | | return R.fail("主键不能为空"); |
| | | } |
| | | Long communityId = this.getCommunityId(); |
| | | partyCommitteeVO.setCommunityId(communityId); |
| | | |
| | | return partyBuildingService.updatePartyCommittee(partyCommitteeVO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "删除党委") |
| | | @DeleteMapping("deletepartycommittee") |
| | | public R deletePartyCommittee(@RequestBody PartyCommitteeVO partyCommitteeVO) { |
| | | Long id = partyCommitteeVO.getId(); |
| | | if (null == id || 0 == id) { |
| | | return R.fail("主键不能为空"); |
| | | } |
| | | Long communityId = this.getCommunityId(); |
| | | partyCommitteeVO.setCommunityId(communityId); |
| | | return partyBuildingService.deletePartyCommittee(partyCommitteeVO); |