| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.common.AddComPbCheckUnitDto; |
| | | import com.panzhihua.common.model.dtos.common.PageComPbCheckUnitDto; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.common.ComPbCheckUnitVo; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | |
| | | comPbCheckUnit.setCommunityId(this.getCommunityId()); |
| | | return this.comPbCheckUnitService.queryByList(comPbCheckUnit); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增报道单位") |
| | | @PostMapping("/add") |
| | | public R add(@RequestBody AddComPbCheckUnitDto comPbCheckUnit) { |
| | | comPbCheckUnit.setCommunityId(this.getCommunityId()); |
| | | comPbCheckUnit.setCreateAt(new Date()); |
| | | comPbCheckUnit.setCreateBy(this.getUserId()); |
| | | return this.comPbCheckUnitService.insert(comPbCheckUnit); |
| | | } |
| | | } |
| | |
| | | @GetMapping("topic/list") |
| | | public R getNeighborTopicByApp(@RequestParam("communityId") Long communityId |
| | | ,@RequestParam(value = "isZero",defaultValue = "2",required = false) Integer isZero |
| | | ,@RequestParam(value = "belongType",defaultValue = "1",required = false) Integer belongType |
| | | ,@RequestParam(value = "name",defaultValue = "",required = false) String name) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if (loginUserInfo != null) { |
| | |
| | | if(isZero == null){ |
| | | isZero = 2; |
| | | } |
| | | return communityService.getNeighborTopicByApp(communityId,isZero,name); |
| | | return communityService.getNeighborTopicByApp(communityId,isZero,name,belongType); |
| | | } |
| | | |
| | | @ApiOperation(value = "用户新增邻里圈话题") |
| | |
| | | import com.panzhihua.common.interfaces.OperLog; |
| | | import com.panzhihua.common.model.dtos.common.PageComPbCheckUnitDto; |
| | | import com.panzhihua.common.model.vos.common.ComPbCheckUnitVo; |
| | | import com.panzhihua.common.model.vos.grid.EventGridCommunityAdminVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.partybuilding.ComPbCheckUnitFeign; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | private CheckService checkService; |
| | | @Resource |
| | | private ComPbCheckUnitFeign pbCheckUnitFeign; |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | public static void main(String[] args) { |
| | | Date date = new Date(); |
| | |
| | | } |
| | | return pbCheckUnitFeign.queryByList(comPbCheckUnit); |
| | | } |
| | | |
| | | @OperLog(operModul = "党员管理", operType = 1) |
| | | @ApiOperation(value = "新增党员") |
| | | @PostMapping("addpartybuildingmember") |
| | |
| | | partyBuildingMemberVO.setCommunityId(communityId); |
| | | R r = partyBuildingService.addPartyBuildingMember(partyBuildingMemberVO); |
| | | if (R.isOk(r)) { |
| | | R r1 = userService.updateUserIsPartymember(partyBuildingMemberVO.getIdCard()); |
| | | R r1 = userService.updateUserPartyStatus(this.getUserId()); |
| | | } |
| | | return r; |
| | | } |
| | | |
| | | @OperLog(operModul = "党员管理", operType = 1) |
| | | @ApiOperation(value = "分页查询党员列表",response = PartyBuildingMemberVO.class) |
| | | @PostMapping("/page/member") |
| | | public R pageMember(@RequestBody PartyBuildingMemberVO partyBuildingMemberVO) { |
| | | partyBuildingMemberVO.setCommunityId(this.getCommunityId()); |
| | | return partyBuildingService.getPagePbMember(partyBuildingMemberVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询所有社区列表", response = EventGridCommunityAdminVO.class) |
| | | @GetMapping("/community/list") |
| | | public R getCommunityLists() { |
| | | return communityService.getCommunityLists(); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "社区id",hidden = true) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "党组织名称") |
| | | private String orgName; |
| | | |
| | | @ApiModelProperty(value = "党组织logo") |
| | | private String logo; |
| | | } |
| | | |
| | |
| | | |
| | | @ApiModelProperty(value = "社区id",hidden = true) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "党组织名称") |
| | | private String orgName; |
| | | |
| | | @ApiModelProperty(value = "党组织logo") |
| | | private String logo; |
| | | } |
| | | |
| | |
| | | @ApiModelProperty("用户新增邻里圈话题") |
| | | private String topicName; |
| | | |
| | | @ApiModelProperty("使用类型(1.邻里圈 2.问题清单 3.需求清单)") |
| | | private Integer belongType; |
| | | |
| | | /** |
| | | * 使用类型(1.邻里圈 2.问题清单 3.需求清单) |
| | | */ |
| | | public interface BelongType{ |
| | | int LLQ = 1; |
| | | int WTQD = 2; |
| | | int XQQD = 3; |
| | | } |
| | | |
| | | /** |
| | | * 是否需要审核(1.是 2.否) |
| | | */ |
| | |
| | | @ApiModelProperty("话题id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("使用类型(1.邻里圈 2.问题清单 3.需求清单)") |
| | | private Integer belongType; |
| | | |
| | | @ApiModelProperty("话题logo") |
| | | private String logo; |
| | | |
| | | /** |
| | | * 使用类型(1.邻里圈 2.问题清单 3.需求清单) |
| | | */ |
| | | public interface BelongType{ |
| | | int LLQ = 1; |
| | | int WTQD = 2; |
| | | int XQQD = 3; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("邻里圈话题名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("使用类型(1.邻里圈 2.问题清单 3.需求清单)") |
| | | private Integer belongType; |
| | | |
| | | /** |
| | | * 使用类型(1.邻里圈 2.问题清单 3.需求清单) |
| | | */ |
| | | public interface BelongType{ |
| | | int LLQ = 1; |
| | | int WTQD = 2; |
| | | int XQQD = 3; |
| | | } |
| | | } |
| | |
| | | @ApiModelProperty("关键词") |
| | | private String keyWord; |
| | | |
| | | @ApiModelProperty("使用类型(1.邻里圈 2.问题清单 3.需求清单)") |
| | | private Integer belongType; |
| | | } |
| | |
| | | @ApiModelProperty("关键词") |
| | | private String keyWord; |
| | | |
| | | @ApiModelProperty("使用类型(1.邻里圈 2.问题清单 3.需求清单)") |
| | | private Integer belongType; |
| | | |
| | | /** |
| | | * 使用类型(1.邻里圈 2.问题清单 3.需求清单) |
| | | */ |
| | | public interface BelongType{ |
| | | int LLQ = 1; |
| | | int WTQD = 2; |
| | | int XQQD = 3; |
| | | } |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "发布状态(1.启用 2.禁用)") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("使用类型(1.邻里圈 2.问题清单 3.需求清单)") |
| | | private Integer belongType; |
| | | |
| | | /** |
| | | * 使用类型(1.邻里圈 2.问题清单 3.需求清单) |
| | | */ |
| | | public interface BelongType{ |
| | | int LLQ = 1; |
| | | int WTQD = 2; |
| | | int XQQD = 3; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "社区id",hidden = true) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "党组织名称") |
| | | private String orgName; |
| | | |
| | | @ApiModelProperty(value = "党组织logo") |
| | | private String logo; |
| | | |
| | | @ApiModelProperty(value = "所属社区名称") |
| | | private String communityName; |
| | | |
| | | @ApiModelProperty(value = "党员人数") |
| | | private Integer count; |
| | | } |
| | |
| | | @ApiModelProperty("发布图片") |
| | | private String releaseImages; |
| | | |
| | | @ApiModelProperty("使用类型(1.邻里圈 2.问题清单 3.需求清单)") |
| | | private Integer belongType; |
| | | |
| | | /** |
| | | * 使用类型(1.邻里圈 2.问题清单 3.需求清单) |
| | | */ |
| | | public interface BelongType{ |
| | | int LLQ = 1; |
| | | int WTQD = 2; |
| | | int XQQD = 3; |
| | | } |
| | | |
| | | @ApiModelProperty(value = "当前登陆人id", hidden = true) |
| | | private Long userId; |
| | | } |
| | |
| | | @ApiModelProperty("点赞数") |
| | | private Integer lastFabulousNum; |
| | | |
| | | @ApiModelProperty("使用类型(1.邻里圈 2.问题清单 3.需求清单)") |
| | | private Integer belongType; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("热度") |
| | | private Long hotNum; |
| | | |
| | | @ApiModelProperty("社区名称") |
| | | private String communityName; |
| | | } |
| | |
| | | @ApiModelProperty("邻里圈数量") |
| | | private Integer count; |
| | | |
| | | @ApiModelProperty("话题logo") |
| | | private String logo; |
| | | } |
| | |
| | | @ApiModelProperty("驳回原因") |
| | | private String refuseReason; |
| | | |
| | | @ApiModelProperty("使用类型(1.邻里圈 2.问题清单 3.需求清单)") |
| | | private Integer belongType; |
| | | |
| | | /** |
| | | * 使用类型(1.邻里圈 2.问题清单 3.需求清单) |
| | | */ |
| | | public interface BelongType{ |
| | | int LLQ = 1; |
| | | int WTQD = 2; |
| | | int XQQD = 3; |
| | | } |
| | | |
| | | /** |
| | | * 发布状态(1.待审核 2.显示 3.隐藏 4.驳回) |
| | | */ |
| | |
| | | @ApiModelProperty(value = "职能") |
| | | private String function; |
| | | |
| | | @ApiModelProperty(value = "特长类别(1.体育类 2.舞蹈类 3.音乐类 4.美术类 5.其他)") |
| | | @ApiModelProperty(value = "特长类别(1.统计调查 2.法律援助 3.志愿活动 4.尊老爱幼 5.宣讲宣教 6.心理关爱 7.设施维修 8.其他)") |
| | | private Integer specialtyCategory; |
| | | |
| | | @ApiModelProperty(value = "特长描述") |
| | |
| | | |
| | | @ApiModelProperty(value = "活动积分") |
| | | private Integer partyInterval; |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize = 10L; |
| | | } |
| | |
| | | * @return 邻里圈话题列表 |
| | | */ |
| | | @GetMapping("/neighbor/getNeighborTopicByApp") |
| | | R getNeighborTopicByApp(@RequestParam("communityId") Long communityId,@RequestParam("isZero") Integer isZero,@RequestParam("name") String name); |
| | | R getNeighborTopicByApp(@RequestParam("communityId") Long communityId,@RequestParam("isZero") Integer isZero,@RequestParam("name") String name,@RequestParam("belongType") Integer belongType); |
| | | |
| | | /** |
| | | * 综治后台-查询社区列表 |
| | |
| | | */ |
| | | @GetMapping("/partybuildIng/checkMember") |
| | | R checkMember(@RequestParam("idCard")String idCard); |
| | | |
| | | /** |
| | | * 小程序分页查询党员列表 |
| | | * @param partyBuildingMemberVO 请求参数 |
| | | * @return 党员列表 |
| | | */ |
| | | @PostMapping("/partybuildIng/getPagePbMember") |
| | | R getPagePbMember(@RequestBody PartyBuildingMemberVO partyBuildingMemberVO); |
| | | } |
| | |
| | | */ |
| | | @DeleteMapping("/deleteUserCashByPhone") |
| | | R deleteUserCashByPhone(@RequestParam("phone") String phone); |
| | | |
| | | /** |
| | | * 修改用户党员状态 |
| | | * @param userId 用户id |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/update/user/party/status") |
| | | R updateUserPartyStatus(@RequestParam("userId") Long userId); |
| | | } |
| | |
| | | * @return 邻里圈话题列表 |
| | | */ |
| | | @GetMapping("getNeighborTopicByApp") |
| | | public R getNeighborTopicByApp(@RequestParam("communityId") Long communityId,@RequestParam("isZero") Integer isZero,@RequestParam("name") String name) { |
| | | return comActNeighborCircleTopicService.getNeighborTopicByApp(communityId,isZero,name); |
| | | public R getNeighborTopicByApp(@RequestParam("communityId") Long communityId,@RequestParam("isZero") Integer isZero,@RequestParam("name") String name,@RequestParam("belongType") Integer belongType) { |
| | | return comActNeighborCircleTopicService.getNeighborTopicByApp(communityId,isZero,name,belongType); |
| | | } |
| | | |
| | | /** |
| | |
| | | + ",canc.comment_num,canc.fabulous_num,canc.forward_num,canc.views_num,canc.refuse_reason,su.nick_name as name,su.image_url as headUrl " |
| | | + " from com_act_neighbor_circle as canc " + " left join sys_user as su on su.user_id = canc.release_id " |
| | | + " left join com_act_neighbor_circle_topic as canct on canct.id = canc.topic_id " |
| | | + " where canc.release_id = #{userId} and canc.is_del = 2 and canc.status != 3 order by create_at desc" + " </script>") |
| | | IPage<ComActNeighborCircleAppVO> neighborExamineByApp(Page page, @Param("userId") Long userId); |
| | | + " where canc.release_id = #{userId} and canc.is_del = 2 and canc.belong_type = #{belongType} and canc.status != 3 order by create_at desc" + " </script>") |
| | | IPage<ComActNeighborCircleAppVO> neighborExamineByApp(Page page, @Param("userId") Long userId,@Param("belongType") Integer belongType); |
| | | |
| | | @Select("select reply.id,reply.comment_id,reply.reply_content,reply.fabulous_num,reply.create_at" |
| | | + ",reply.is_release,su.nick_name as userName,su.image_url as userHeadUrl,su1.nick_name as oldUserName" |
| | |
| | | + " where reply.comment_id = #{commentId} and reply.status = 1") |
| | | IPage<ComActNeighborCommentReplyAppVO> neighborCommentReplyByApp(Page page, @Param("commentId") Long commentId); |
| | | |
| | | @Select("SELECT id,release_content as content FROM com_act_neighbor_circle WHERE community_id = ${communityId} and status = 2 ORDER BY create_at DESC limit #{pageSize}") |
| | | @Select("SELECT id,release_content as content FROM com_act_neighbor_circle WHERE community_id = ${communityId} and belong_type = 1 and status = 2 ORDER BY create_at DESC limit #{pageSize}") |
| | | List<CarouselInfoVO> screenNeighborCircle(@Param("communityId") Long communityId, |
| | | @Param("pageSize") Integer pageSize); |
| | | |
| | | @Select(" SELECT COUNT(id) AS totalNum," |
| | | + " (SELECT COUNT(id) FROM com_act_neighbor_circle WHERE community_id = ${communityId} AND status = 2 AND create_at LIKE CONCAT(#{nowDate},'%')) AS currentNum " |
| | | + " (SELECT COUNT(id) FROM com_act_neighbor_circle WHERE community_id = ${communityId} and belong_type = 1 AND status = 2 AND create_at LIKE CONCAT(#{nowDate},'%')) AS currentNum " |
| | | + " FROM com_act_neighbor_circle WHERE community_id = ${communityId} AND status = 2") |
| | | Map<String, Long> countByCommunityId(@Param("communityId") Long communityId, @Param("nowDate") String nowDate); |
| | | |
| | | @Select("SELECT SUM(comment_num) as commentNum,SUM(fabulous_num) as fabulousNum,SUM(forward_num) as forwardNum FROM com_act_neighbor_circle WHERE community_id = ${communityId} and status = 2 ") |
| | | @Select("SELECT SUM(comment_num) as commentNum,SUM(fabulous_num) as fabulousNum,SUM(forward_num) as forwardNum FROM com_act_neighbor_circle WHERE community_id = ${communityId} and belong_type = 1 and status = 2 ") |
| | | Map<String, Object> sumScreenNum(@Param("communityId") Long communityId); |
| | | |
| | | @Select("SELECT release_images FROM com_act_neighbor_circle WHERE community_id = ${communityId} and status = 2 order by create_at desc limit #{pageSize}") |
| | | @Select("SELECT release_images FROM com_act_neighbor_circle WHERE community_id = ${communityId} and belong_type = 1 and status = 2 order by create_at desc limit #{pageSize}") |
| | | List<String> screenNeighborCircleImgs(@Param("communityId") Long communityId, @Param("pageSize") Integer pageSize); |
| | | |
| | | @Select("SELECT COUNT(id) as num,'随手拍' as name FROM com_act_easy_photo WHERE community_id = ${communityId} AND STATUS = 4 " |
| | |
| | | + "UNION ALL " |
| | | + "SELECT COUNT(id) as num,'一起议' as name FROM com_act_discuss WHERE community_id = ${communityId} " |
| | | + "UNION ALL " |
| | | + "SELECT COUNT(id) as num,'邻里圈' as name FROM com_act_neighbor_circle WHERE community_id = ${communityId} AND STATUS = 2 " |
| | | + "SELECT COUNT(id) as num,'邻里圈' as name FROM com_act_neighbor_circle WHERE community_id = ${communityId} AND STATUS = 2 and belong_type = 1" |
| | | + "UNION ALL " |
| | | + "SELECT COUNT( e.id ) AS num,'网格事件' AS name FROM `event` as e left join event_grid_data as egd on egd.id = e.grid_id WHERE egd.grid_community_id = ${communityId} AND e.event_process_status = 2 " |
| | | + "UNION ALL " |
| | |
| | | + "UNION ALL " |
| | | + "SELECT COUNT(id) as num,'一起议' as name FROM com_act_discuss WHERE community_id = ${communityId} " |
| | | + "UNION ALL " |
| | | + "SELECT COUNT(id) as num,'邻里圈' as name FROM com_act_neighbor_circle WHERE community_id = ${communityId} AND STATUS = 1 " |
| | | + "SELECT COUNT(id) as num,'邻里圈' as name FROM com_act_neighbor_circle WHERE community_id = ${communityId} AND STATUS = 1 and belong_type = 1" |
| | | + "UNION ALL " |
| | | + "SELECT COUNT( e.id ) AS num,'网格事件' AS NAME FROM `event` as e left join event_grid_data as egd on egd.id = e.grid_id WHERE egd.grid_community_id = ${communityId} AND e.event_status = 2 and e.event_deal_status in (1,2,3) " |
| | | + "UNION ALL " |
| | |
| | | * 社区id |
| | | * @return 邻里圈话题列表 |
| | | */ |
| | | List<ComActNeighborCircleTopicAppVO> getNeighborTopicByApp(@Param("communityId") Long communityId,@Param("isZero") Integer isZero,@Param("name") String name); |
| | | List<ComActNeighborCircleTopicAppVO> getNeighborTopicByApp(@Param("communityId") Long communityId,@Param("isZero") Integer isZero,@Param("name") String name,@Param("belongType") Integer belongType); |
| | | |
| | | /** |
| | | * 添加邻里圈话题热度 |
| | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @author lyq |
| | | * @create 2021-04-28 09:20:49 |
| | | * @describe 邻里圈表实体类 |
| | | */ |
| | |
| | | */ |
| | | private Integer isDel; |
| | | |
| | | /** |
| | | * 使用类型(1.邻里圈 2.问题清单 3.需求清单) |
| | | */ |
| | | private Integer belongType; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComActNeighborCircleDO{" + "id=" + id + ", releaseId=" + releaseId + ", releasePhone=" + releasePhone |
| | |
| | | int yes = 1; |
| | | int no = 2; |
| | | } |
| | | |
| | | /** |
| | | * 使用类型(1.邻里圈 2.问题清单 3.需求清单) |
| | | */ |
| | | public interface BelongType{ |
| | | int LLQ = 1; |
| | | int WTQD = 2; |
| | | int XQQD = 3; |
| | | } |
| | | } |
| | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @author lyq |
| | | * @create 2021-07-06 15:04:37 |
| | | * @describe 邻里圈话题表实体类 |
| | | */ |
| | |
| | | private Integer count; |
| | | |
| | | /** |
| | | * 使用类型(1.邻里圈 2.问题清单 3.需求清单) |
| | | */ |
| | | private Integer belongType; |
| | | |
| | | /** |
| | | * 话题logo |
| | | */ |
| | | private String logo; |
| | | |
| | | /** |
| | | * 状态(1.启用 2.禁用) |
| | | */ |
| | | public interface status{ |
| | |
| | | return "ComActNeighborCircleTopicDO{" + "id=" + id + ", name=" + name + ", status=" + status + ", createAt=" |
| | | + createAt + ", createBy=" + createBy + "}"; |
| | | } |
| | | |
| | | /** |
| | | * 使用类型(1.邻里圈 2.问题清单 3.需求清单) |
| | | */ |
| | | public interface BelongType{ |
| | | int LLQ = 1; |
| | | int WTQD = 2; |
| | | int XQQD = 3; |
| | | } |
| | | } |
| | |
| | | * 社区id |
| | | * @return 邻里圈话题列表 |
| | | */ |
| | | R getNeighborTopicByApp(Long communityId,Integer isZero,String name); |
| | | R getNeighborTopicByApp(Long communityId,Integer isZero,String name,Integer belongType); |
| | | |
| | | /** |
| | | * 小程序-用户新增话题 |
| | |
| | | comActNeighborCircleDO.setLastCommentNum(0); |
| | | comActNeighborCircleDO.setLastFabulousNum(0); |
| | | comActNeighborCircleDO.setLastViewsNum(0); |
| | | comActNeighborCircleDO.setBelongType(addVO.getBelongType()); |
| | | this.baseMapper.insert(comActNeighborCircleDO); |
| | | return R.ok(); |
| | | } |
| | |
| | | public R neighborExamineByApp(ComActNeighborCircleAppDTO neighborCircleAppDTO) { |
| | | IPage<ComActNeighborCircleAppVO> neighborCircleIPage = this.baseMapper.neighborExamineByApp( |
| | | new Page<>(neighborCircleAppDTO.getPageNum(), neighborCircleAppDTO.getPageSize()), |
| | | neighborCircleAppDTO.getUserId()); |
| | | neighborCircleAppDTO.getUserId(),neighborCircleAppDTO.getBelongType()); |
| | | if (!neighborCircleIPage.getRecords().isEmpty()) { |
| | | for (ComActNeighborCircleAppVO circleAppVO : neighborCircleIPage.getRecords()) { |
| | | // 查询点赞信息 |
| | |
| | | * @return 邻里圈话题列表 |
| | | */ |
| | | @Override |
| | | public R getNeighborTopicByApp(Long communityId,Integer isZero,String name){ |
| | | return R.ok(this.baseMapper.getNeighborTopicByApp(communityId,isZero,name)); |
| | | public R getNeighborTopicByApp(Long communityId,Integer isZero,String name,Integer belongType){ |
| | | return R.ok(this.baseMapper.getNeighborTopicByApp(communityId,isZero,name,belongType)); |
| | | } |
| | | |
| | | /** |
| | |
| | | public R addNeighborTopicByApp(AddNeighborCircleTopicAppDTO circleTopicAppDTO){ |
| | | ComActNeighborCircleTopicDO circleTopicDO = this.baseMapper.selectOne(new QueryWrapper<ComActNeighborCircleTopicDO>() |
| | | .lambda().eq(ComActNeighborCircleTopicDO::getCommunityId,circleTopicAppDTO.getCommunityId()) |
| | | .eq(ComActNeighborCircleTopicDO::getName,circleTopicAppDTO.getName())); |
| | | .eq(ComActNeighborCircleTopicDO::getName,circleTopicAppDTO.getName()) |
| | | .eq(ComActNeighborCircleTopicDO::getBelongType,circleTopicAppDTO.getBelongType())); |
| | | if(circleTopicDO == null){ |
| | | circleTopicDO = new ComActNeighborCircleTopicDO(); |
| | | circleTopicDO.setCommunityId(circleTopicAppDTO.getCommunityId()); |
| | |
| | | circleTopicDO.setCount(0); |
| | | circleTopicDO.setHotNum(0L); |
| | | circleTopicDO.setStatus(ComActNeighborCircleTopicDO.status.yes); |
| | | circleTopicDO.setBelongType(circleTopicAppDTO.getBelongType()); |
| | | this.baseMapper.insert(circleTopicDO); |
| | | } |
| | | return R.ok(circleTopicDO); |
| | |
| | | canc.hot_num, |
| | | su.nick_name as name, |
| | | su.community_id, |
| | | ca.`name` as communityName, |
| | | canct.name as topicName, |
| | | su.image_url as headUrl |
| | | FROM |
| | | com_act_neighbor_circle AS canc |
| | | left join sys_user as su on su.user_id = canc.release_id |
| | | left join com_act_neighbor_circle_topic as canct on canct.id = canc.topic_id |
| | | left join com_act as ca on ca.community_id = canc.community_id |
| | | where canc.status = 2 and is_del = 2 and canc.community_id = ${neighborCircleAppDTO.communityId} |
| | | <if test='neighborCircleAppDTO.topicId != null '> |
| | | and canc.topic_id = #{neighborCircleAppDTO.topicId} |
| | | </if> |
| | | <if test='neighborCircleAppDTO.belongType != null '> |
| | | and canc.belong_type = #{neighborCircleAppDTO.belongType} |
| | | </if> |
| | | <if test='neighborCircleAppDTO.keyWord != null and neighborCircleAppDTO.keyWord != ""'> |
| | | and (canct.`name` like concat (#{neighborCircleAppDTO.keyWord},'%') or |
| | | su.nick_name like concat (#{neighborCircleAppDTO.keyWord},'%') or |
| | | canc.release_content like concat (#{neighborCircleAppDTO.keyWord},'%')) |
| | | and (canct.`name` like concat ('%',#{neighborCircleAppDTO.keyWord},'%') or |
| | | su.nick_name like concat ('%',#{neighborCircleAppDTO.keyWord},'%') or |
| | | canc.release_content like concat ('%',#{neighborCircleAppDTO.keyWord},'%')) |
| | | </if> |
| | | order by canc.create_at desc |
| | | </select> |
| | |
| | | <if test='neighborCircleAdminDTO.status != null '> |
| | | and nc.status = #{neighborCircleAdminDTO.status} |
| | | </if> |
| | | <if test='neighborCircleAdminDTO.belongType != null '> |
| | | and nc.belong_type = #{neighborCircleAdminDTO.belongType} |
| | | </if> |
| | | </where> |
| | | order by |
| | | case when nc.`status`=1 then 0 else 1 end, |
| | |
| | | </select> |
| | | <select id="getAllImages" resultType="java.lang.String"> |
| | | SELECT release_images FROM com_act_neighbor_circle |
| | | WHERE community_id = ${communityId} AND `status` = 2 AND release_images IS NOT NULL AND release_images != '' |
| | | WHERE community_id = ${communityId} AND `status` = 2 and belong_type = 1 AND release_images IS NOT NULL AND release_images != '' |
| | | ORDER BY create_at DESC limit #{pageSize} |
| | | </select> |
| | | <select id="getContents" resultType="java.lang.String"> |
| | | SELECT release_content FROM com_act_neighbor_circle |
| | | WHERE community_id = ${communityId} AND `status` = 2 AND release_content IS NOT NULL AND release_content != '' |
| | | WHERE community_id = ${communityId} AND `status` = 2 and belong_type = 1 AND release_content IS NOT NULL AND release_content != '' |
| | | ORDER BY create_at DESC limit #{pageSize} |
| | | </select> |
| | | <select id="getIndexNeighborBaseData" |
| | |
| | | canct.`name`, |
| | | canct.`status`, |
| | | canct.create_at, |
| | | canct.logo, |
| | | ( SELECT count( id ) FROM com_act_neighbor_circle WHERE is_del = 2 AND `status` = 2 and topic_id = canct.id) AS `count`, |
| | | su.`name` as createBy |
| | | FROM |
| | |
| | | </select> |
| | | |
| | | <select id="getNeighborTopicByApp" resultType="com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleTopicAppVO"> |
| | | SELECT canct.id, canct.`name`, canct.hot_num,( SELECT count( id ) FROM com_act_neighbor_circle WHERE is_del = 2 AND `status` = 2 and topic_id = canct.id) AS `count` |
| | | from com_act_neighbor_circle_topic as canct where canct.`status` = 1 and canct.community_id = ${communityId} |
| | | SELECT canct.id, canct.`name`,`logo`, canct.hot_num,( SELECT count( id ) FROM com_act_neighbor_circle WHERE is_del = 2 AND `status` = 2 and topic_id = canct.id) AS `count` |
| | | from com_act_neighbor_circle_topic as canct where canct.`status` = 1 and canct.community_id = ${communityId} and canct.belong_type = #{belongType} |
| | | <if test="isZero != null and isZero == 1"> |
| | | and `count` > 0 |
| | | </if> |
| | |
| | | public R checkMember(@RequestParam("idCard")String idCard){ |
| | | return comPbMemberService.checkMember(idCard); |
| | | } |
| | | |
| | | @PostMapping("/getPagePbMember") |
| | | public R getPagePbMember(@RequestBody PartyBuildingMemberVO partyBuildingMemberVO){ |
| | | return comPbMemberService.getPagePbMember(partyBuildingMemberVO); |
| | | } |
| | | } |
| | |
| | | * @return 党员导出数据 |
| | | */ |
| | | List<ComDataStatisticsMemberExcelVo> exportDataStatisticsMember(@Param("dto") PageComDataStatisticsMemberDto statisticsMemberDto); |
| | | |
| | | /** |
| | | * 根据报到单位id查询党员列表 |
| | | * @param page 分页参数 |
| | | * @param partyBuildingMemberVO 请求参数 |
| | | * @return 党员列表 |
| | | */ |
| | | IPage<PartyBuildingMemberVO> getPbMemberByApplets(Page page,@Param("dto") PartyBuildingMemberVO partyBuildingMemberVO); |
| | | } |
| | |
| | | */ |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 党组织名称 |
| | | */ |
| | | private String orgName; |
| | | |
| | | /** |
| | | * 党组织logo |
| | | */ |
| | | private String logo; |
| | | } |
| | | |
| | |
| | | private String positionTwo; |
| | | |
| | | /** |
| | | * 党组织名字 |
| | | */ |
| | | private String orgName; |
| | | |
| | | /** |
| | | * 党员审查结果 0待审核 1 审核通过 3审核失败 |
| | | */ |
| | | public interface AuditResult { |
| | |
| | | * @return |
| | | */ |
| | | R checkMember(String idCard); |
| | | |
| | | R getPagePbMember(PartyBuildingMemberVO partyBuildingMemberVO); |
| | | } |
| | |
| | | package com.panzhihua.service_dangjian.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.google.common.collect.Lists; |
| | | import com.panzhihua.common.enums.ComPbCheckUnitTypeEnum; |
| | | import com.panzhihua.common.model.vos.common.ComPbCheckUnitVo; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyBuildingMemberVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.excel.ComPbCheckUnitErrorExcelVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.excel.ComPbCheckUnitExcelVO; |
| | | import com.panzhihua.service_dangjian.dao.ComPbMemberDAO; |
| | |
| | | List<ComPbMemberDO> list=comPbMemberDAO.selectList(new QueryWrapper<ComPbMemberDO>().lambda().eq(ComPbMemberDO::getIdCard,idCard)); |
| | | return R.ok(CollectionUtils.isEmpty(list)); |
| | | } |
| | | |
| | | @Override |
| | | public R getPagePbMember(PartyBuildingMemberVO dto) { |
| | | return R.ok(comPbMemberDAO.getPbMemberByApplets(new Page(dto.getPageNum(),dto.getPageSize()),dto)); |
| | | } |
| | | } |
| | |
| | | <!--查询单个--> |
| | | <select id="queryById" resultType="com.panzhihua.common.model.vos.common.ComPbCheckUnitVo"> |
| | | select |
| | | id, name, type, contacts, phone, create_at, create_by, update_at, update_by, community_id |
| | | from com_pb_check_unit |
| | | where id = #{id} |
| | | cpcu.id, cpcu.`name`, cpcu.`type`, cpcu.contacts, cpcu.phone, cpcu.create_at, cpcu.create_by, cpcu.update_at, cpcu.update_by |
| | | , cpcu.community_id, cpcu.org_name, ca.`name` as communityName, cpcu.`logo` |
| | | ,(select count(id) from com_pb_member where audit_result = 1 and check_unit_id = cpcu.id) as count |
| | | from com_pb_check_unit as cpcu |
| | | left join com_act as ca on ca.community_id = cpcu.community_id |
| | | where cpcu.id = #{id} |
| | | </select> |
| | | |
| | | <!--查询指定行数据--> |
| | | <select id="queryAllByLimit" resultType="com.panzhihua.common.model.vos.common.ComPbCheckUnitVo"> |
| | | select |
| | | id, name, type, contacts, phone, create_at, create_by, update_at, update_by, community_id |
| | | from com_pb_check_unit |
| | | cpcu.id, cpcu.`name`, cpcu.`type`, cpcu.contacts, cpcu.phone, cpcu.create_at, cpcu.create_by, cpcu.update_at, cpcu.update_by |
| | | , cpcu.community_id, cpcu.org_name, ca.`name` as communityName, cpcu.`logo` |
| | | from com_pb_check_unit as cpcu |
| | | left join com_act as ca on ca.community_id = cpcu.community_id |
| | | <where> |
| | | <if test="dto.type != null"> |
| | | and type = #{dto.type} |
| | | and cpcu.`type` = #{dto.type} |
| | | </if> |
| | | <if test="dto.communityId != null"> |
| | | and community_id = #{dto.communityId} |
| | | and cpcu.community_id = #{dto.communityId} |
| | | </if> |
| | | <if test="dto.keyWord != null and dto.keyWord != ''"> |
| | | and (`name` like concat(#{dto.keyWord},'%') or |
| | | `contacts` like concat(#{dto.keyWord},'%') or phone like concat(#{dto.keyWord},'%')) |
| | | and (cpcu.`name` like concat(#{dto.keyWord},'%') or |
| | | cpcu.`contacts` like concat(#{dto.keyWord},'%') or cpcu.phone like concat(#{dto.keyWord},'%')) |
| | | </if> |
| | | </where> |
| | | order by create_at desc |
| | | order by cpcu.create_at desc |
| | | </select> |
| | | |
| | | <!--查询所有数据--> |
| | | <select id="queryAllByList" resultType="com.panzhihua.common.model.vos.common.ComPbCheckUnitVo"> |
| | | select |
| | | id, name, type, contacts, phone, create_at, create_by, update_at, update_by |
| | | from com_pb_check_unit |
| | | cpcu.id, cpcu.`name`, cpcu.`type`, cpcu.contacts, cpcu.phone, cpcu.create_at, cpcu.create_by, cpcu.update_at, cpcu.update_by |
| | | , cpcu.community_id, cpcu.org_name, ca.`name` as communityName, cpcu.`logo` |
| | | from com_pb_check_unit as cpcu |
| | | left join com_act as ca on ca.community_id = cpcu.community_id |
| | | <where> |
| | | <if test="dto.id != null"> |
| | | and id = #{dto.id} |
| | | and cpcu.id = #{dto.id} |
| | | </if> |
| | | <if test="dto.name != null and dto.name != ''"> |
| | | and name = #{dto.name} |
| | | and cpcu.`name` = #{dto.name} |
| | | </if> |
| | | <if test="dto.type != null"> |
| | | and type = #{dto.type} |
| | | and cpcu.`type` = #{dto.type} |
| | | </if> |
| | | <if test="dto.contacts != null and dto.contacts != ''"> |
| | | and contacts = #{dto.contacts} |
| | | and cpcu.contacts = #{dto.contacts} |
| | | </if> |
| | | <if test="dto.phone != null and dto.phone != ''"> |
| | | and phone = #{dto.phone} |
| | | and cpcu.phone = #{dto.phone} |
| | | </if> |
| | | <if test="dto.communityId != null"> |
| | | and community_id = #{dto.communityId} |
| | | and cpcu.community_id = #{dto.communityId} |
| | | </if> |
| | | </where> |
| | | order by create_at desc |
| | | order by cpcu.create_at desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </where> |
| | | order by cpm.create_at desc |
| | | </select> |
| | | |
| | | <select id="getPbMemberByApplets" resultType="com.panzhihua.common.model.vos.partybuilding.PartyBuildingMemberVO"> |
| | | select |
| | | m.id, m.org_id, m.name, m.id_card, m.photo_path, m.join_time, m.employment_time, m.audit_result, m.create_at, m.update_at, |
| | | m.community_id, u.user_id, m.refuse_reason, m.phone, m.type, m.position, m.check_unit_id, m.function, m.specialty_category, |
| | | m.specialty_name, m.position_two, m.org_Name,cpcu.name as checkUnitName,t2.partyTime,t2.partyInterval, |
| | | TIMESTAMPDIFF( |
| | | YEAR, |
| | | m.employment_time, |
| | | DATE_FORMAT( NOW(), '%Y-%m-%d' )) as partyAge |
| | | from com_pb_member as m |
| | | LEFT JOIN sys_user u ON m.id_card = u.id_card and u.type = 1 |
| | | LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id |
| | | LEFT JOIN (select t1.user_id,sum(t.duration) as partyTime,sum(t.reward_integral) as partyInterval from com_act_activity t LEFT JOIN com_act_act_regist t1 on t.id = t1.activity_id where t.type = 3 |
| | | GROUP BY t1.user_id ) t2 on u.user_id = t2.user_id |
| | | where m.audit_result = 1 |
| | | <if test="dto.checkUnitId != null"> |
| | | and m.check_unit_id = #{dto.checkUnitId} |
| | | </if> |
| | | <if test="dto.specialtyCategory != null"> |
| | | and m.specialty_category = #{dto.specialtyCategory} |
| | | </if> |
| | | <if test="dto.name != null"> |
| | | and m.name like concat('%',#{dto.name},'%') |
| | | </if> |
| | | order by m.create_at desc |
| | | </select> |
| | | </mapper> |
| | | |
| | |
| | | @DeleteMapping("/deleteUserCashByPhone") |
| | | public R deleteUserCashByPhone(@RequestParam("phone") String phone) { |
| | | return userService.deleteUserCashByPhone(phone); |
| | | } |
| | | |
| | | @PostMapping("/update/user/party/status") |
| | | public R updateUserPartyStatus(@RequestParam("userId") Long userId) { |
| | | return userService.updateUserPartyStatus(userId); |
| | | } |
| | | |
| | | } |
| | |
| | | * @param phone |
| | | */ |
| | | R deleteUserCashByPhone(String phone); |
| | | |
| | | R updateUserPartyStatus(Long userId); |
| | | } |
| | |
| | | rs.append(r.nextInt(10)); |
| | | } |
| | | return rs.toString(); |
| | | } |
| | | |
| | | @Override |
| | | public R updateUserPartyStatus(Long userId) { |
| | | SysUserDO sysUserDO = userDao.selectById(userId); |
| | | if (sysUserDO != null) { |
| | | sysUserDO.setIsPartymember(1); |
| | | int updated = userDao.updateById(sysUserDO); |
| | | if (updated > 0) { |
| | | // 删除用户信息缓存 |
| | | String userKey = UserConstants.LOGIN_USER_INFO + sysUserDO.getUserId(); |
| | | stringRedisTemplate.delete(userKey); |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | } |