101captain
2022-04-25 b2c975094e4a3cac5ba67c154e9b7b4fd0ce35c9
花城E+防疫修改
27个文件已修改
1个文件已添加
478 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/NeighborApi.java 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/NeighborApi.java 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComPbCheckUnitExcelListen.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/AddComActNeighborCircleAppDTO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/AddNeighborCircleTopicAdminDTO.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/ComActNeighborCircleTopicAdminDTO.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/ComActNeighborCircleTopicAdminVO.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/ComPbMemberVO.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/PartyBuildingMemberExcelVO.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/excel/ComPbCheckUnitExcelVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPbCheckUnitApi.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/NeighborApi.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/listen/PartyBuildingMemberExcelListen.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/NeighborApi.java 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleTopicMapper.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActNeighborCircleTopicDO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActNeighborCircleTopicService.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleTopicServiceImpl.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleTopicDOMapper.xml 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbMemberDAO.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbCheckUnitServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/UserService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/NeighborApi.java
@@ -42,7 +42,12 @@
    public R pageNeighborByApp(@RequestBody ComActNeighborCircleAppDTO neighborCircleAppDTO) {
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
        if (loginUserInfo != null) {
            neighborCircleAppDTO.setCommunityId(loginUserInfo.getCommunityId());
            if(loginUserInfo.getIsPartymember()==1){
                neighborCircleAppDTO.setCommunityId(0L);
            }
            else {
                neighborCircleAppDTO.setCommunityId(loginUserInfo.getCommunityId());
            }
            neighborCircleAppDTO.setUserId(loginUserInfo.getUserId());
        }
        return communityService.pageNeighborByApp(neighborCircleAppDTO);
@@ -206,30 +211,9 @@
    @ApiOperation(value = "查询社区邻里圈话题列表", response = ComActNeighborCircleTopicAppVO.class)
    @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) {
            communityId = loginUserInfo.getCommunityId();
        }
        if(isZero == null){
            isZero = 2;
        }
        return communityService.getNeighborTopicByApp(communityId,isZero,name,belongType);
    }
    @ApiOperation(value = "用户新增邻里圈话题")
    @PostMapping("topic/add")
    public R addNeighborTopicByApp(@RequestBody AddNeighborCircleTopicAppDTO circleTopicAppDTO) {
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
        if(loginUserInfo == null){
            return R.fail(401,"请先登录");
        }
        circleTopicAppDTO.setUserId(loginUserInfo.getUserId());
        circleTopicAppDTO.setCommunityId(loginUserInfo.getCommunityId());
        return communityService.addNeighborTopicByApp(circleTopicAppDTO);
    public R getNeighborTopicByApp(
            @RequestParam(value = "name",defaultValue = "",required = false) String name) {
        return communityService.getNeighborTopicByApp(name);
    }
    @ApiOperation(value = "用户删除邻里圈")
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/NeighborApi.java
New file
@@ -0,0 +1,68 @@
package com.panzhihua.applets_backstage.api;
import com.alibaba.fastjson.JSONObject;
import com.panzhihua.common.constants.NeighborCircleConstants;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.neighbor.*;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.neighbor.*;
import com.panzhihua.common.model.vos.user.SysUserNoticeVO;
import com.panzhihua.common.service.community.CommunityService;
import com.panzhihua.common.service.user.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import static java.util.Objects.isNull;
/**
 * @auther llming
 * @describe
 */
@Slf4j
@RestController
@RequestMapping("/neighbor/")
@Api(tags = {"邻里圈服务"})
public class NeighborApi extends BaseController {
    @Resource
    private CommunityService communityService;
    @Resource
    private UserService userService;
    @ApiOperation(value = "分页查询邻里圈话题列表", response = ComActNeighborCircleTopicAdminVO.class)
    @PostMapping("pageNeighborTopicByAdmin")
    public R pageNeighborTopicByAdmin(@RequestBody ComActNeighborCircleTopicAdminDTO circleTopicAdminDTO) {
        return communityService.pageNeighborTopicByAdmin(circleTopicAdminDTO);
    }
    @ApiOperation(value = "添加邻里圈话题")
    @PostMapping("addNeighborTopicByAdmin")
    public R addNeighborTopicByAdmin(@RequestBody AddNeighborCircleTopicAdminDTO addCircleTopicAdminDTO) {
        addCircleTopicAdminDTO.setUserId(this.getUserId());
        return communityService.addNeighborTopicByAdmin(addCircleTopicAdminDTO);
    }
    @ApiOperation(value = "编辑邻里圈话题")
    @PostMapping("editNeighborTopicByAdmin")
    public R editNeighborTopicByAdmin(@RequestBody AddNeighborCircleTopicAdminDTO addCircleTopicAdminDTO) {
        if (addCircleTopicAdminDTO.getId() == null) {
            return R.fail("参数错误");
        }
        return communityService.editNeighborTopicByAdmin(addCircleTopicAdminDTO);
    }
    /**
     * 删除话题
     * @param id
     * @return
     */
    @ApiOperation(value = "删除话题")
    @GetMapping("deleteNeighborTopic")
    public R deleteNeighborTopic(@RequestParam("id") Long id){
        return communityService.deleteNeighborTopic(id);
    }
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComPbCheckUnitExcelListen.java
@@ -131,6 +131,9 @@
                    }
                    vo.setPhone(oneData.get(3));
                }
                if(StringUtils.isNotEmpty(oneData.get(4))){
                    vo.setOrgName(oneData.get(4));
                }
                voList.add(vo);
                index++;
            }
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/AddComActNeighborCircleAppDTO.java
@@ -37,9 +37,6 @@
    @ApiModelProperty(value = "微信审核结果(1.通过 2.拒绝)",hidden = true)
    private Integer wxExamineResult;
    @ApiModelProperty("用户新增邻里圈话题")
    private String topicName;
    @ApiModelProperty("使用类型(1.邻里圈 2.问题清单 3.需求清单)")
    private Integer belongType;
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/AddNeighborCircleTopicAdminDTO.java
@@ -1,5 +1,6 @@
package com.panzhihua.common.model.dtos.neighbor;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -15,14 +16,8 @@
    @ApiModelProperty("话题名称")
    private String name;
    @ApiModelProperty(value = "社区id", hidden = true)
    private Long communityId;
    @ApiModelProperty(value = "登录用户id", hidden = true)
    private Long userId;
    @ApiModelProperty(value = "发布状态(1.启用 2.禁用)")
    private Integer status;
    @ApiModelProperty("话题id")
    private Long id;
@@ -33,6 +28,9 @@
    @ApiModelProperty("话题logo")
    private String logo;
    @ApiModelProperty("排序")
    private Integer sort;
    /**
     * 使用类型(1.邻里圈 2.问题清单 3.需求清单)
     */
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/ComActNeighborCircleTopicAdminDTO.java
@@ -21,12 +21,6 @@
    @ApiModelProperty("话题名称")
    private String name;
    @ApiModelProperty(value = "社区id", hidden = true)
    private Long communityId;
    @ApiModelProperty(value = "发布状态(1.启用 2.禁用)")
    private Integer status;
    @ApiModelProperty("使用类型(1.邻里圈 2.问题清单 3.需求清单)")
    private Integer belongType;
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/ComActNeighborCircleTopicAdminVO.java
@@ -19,9 +19,6 @@
    @ApiModelProperty("id")
    private Long id;
    @ApiModelProperty("社区id")
    private Long communityId;
    @ApiModelProperty("话题名字")
    private String name;
@@ -35,6 +32,6 @@
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createAt;
    @ApiModelProperty("随手拍条数")
    private Integer count;
    @ApiModelProperty("排序")
    private Integer sort;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/ComPbMemberVO.java
@@ -91,4 +91,10 @@
    @ApiModelProperty("党组织")
    private String orgName;
    @ApiModelProperty("时长")
    private Long duration;
    @ApiModelProperty("积分")
    private Long partyInterval;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/PartyBuildingMemberExcelVO.java
@@ -20,31 +20,11 @@
    @ExcelProperty(value = "党员姓名", index = 0)
    private String name;
    /**
     * 身份证号
     */
    @ExcelProperty(value = "身份证号", index = 1)
    private String idCard;
    /**
     * 所属党组织
     */
    @ExcelProperty(value = "所属党组织", index = 2)
    private String orgName;
    /**
     * 入党日期
     */
    @ExcelProperty(value = "入党日期", index = 3)
    private String joinTime;
    /**
     * 转正日期
     */
    @ExcelProperty(value = "转正日期", index = 4)
    private String employmentTime;
    /**
     * 所属社区
     */
    @ExcelProperty(value = "所属社区", index = 5)
    private String communityName;
    @ExcelProperty(value = "手机号",index = 6)
    @ExcelProperty(value = "联系电话",index = 1)
    private String phone;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/excel/ComPbCheckUnitExcelVO.java
@@ -23,4 +23,7 @@
    @ExcelProperty(value = "负责人联系电话", index = 3)
    private String phone;
    @ExcelProperty(value = "党组织名称",index = 4)
    private String orgName;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -5017,12 +5017,19 @@
    /**
     * 小程序查询邻里圈话题列表
     *
     * @param communityId
     *            社区id
     * @return 邻里圈话题列表
     */
    @GetMapping("/neighbor/getNeighborTopicByApp")
    R getNeighborTopicByApp(@RequestParam("communityId") Long communityId,@RequestParam("isZero") Integer isZero,@RequestParam("name") String name,@RequestParam("belongType") Integer belongType);
    R getNeighborTopicByApp(@RequestParam("name") String name);
    /**
     * 删除话题
     * @param id
     * @return
     */
    @GetMapping("/neighbor/deleteNeighborTopic")
    R deleteNeighborTopic(@RequestParam("id") Long id);
    /**
     * 综治后台-查询社区列表
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java
@@ -655,6 +655,13 @@
    R updateUserIsPartymember(@RequestParam("idCard") String idCard);
    /**
     * 修改党员状态
     * @param phone
     * @return
     */
    @PostMapping("updateuserispartymemberByPhone")
    R updateUserIsPartymemberByPhone(@RequestParam("phone") String phone);
    /**
     * 修改用户的为非党员状态
     *
     * @param idCard
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPbCheckUnitApi.java
@@ -230,6 +230,6 @@
    @ApiOperation(value = "党员双报到单位-下载模板")
    @GetMapping("/export/elder")
    public R exportElder() {
        return R.ok(sftpConfig.getExcelUrl() + "党员双报到单位导入模板.xlsx");
        return R.ok(sftpConfig.getExcelUrl() + "报到单位导入模板.xlsx");
    }
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/NeighborApi.java
@@ -154,33 +154,6 @@
        return communityService.addNeighborByAdmin(addNeighborCircleAdminVO);
    }
    @ApiOperation(value = "分页查询邻里圈话题列表", response = ComActNeighborCircleTopicAdminVO.class)
    @PostMapping("pageNeighborTopicByAdmin")
    public R pageNeighborTopicByAdmin(@RequestBody ComActNeighborCircleTopicAdminDTO circleTopicAdminDTO) {
        if (isNull(circleTopicAdminDTO.getCommunityId())) {
            circleTopicAdminDTO.setCommunityId(this.getCommunityId());
        }
        return communityService.pageNeighborTopicByAdmin(circleTopicAdminDTO);
    }
    @ApiOperation(value = "添加邻里圈话题")
    @PostMapping("addNeighborTopicByAdmin")
    public R addNeighborTopicByAdmin(@RequestBody AddNeighborCircleTopicAdminDTO addCircleTopicAdminDTO) {
        addCircleTopicAdminDTO.setCommunityId(this.getCommunityId());
        addCircleTopicAdminDTO.setUserId(this.getUserId());
        return communityService.addNeighborTopicByAdmin(addCircleTopicAdminDTO);
    }
    @ApiOperation(value = "编辑邻里圈话题")
    @PostMapping("editNeighborTopicByAdmin")
    public R editNeighborTopicByAdmin(@RequestBody AddNeighborCircleTopicAdminDTO addCircleTopicAdminDTO) {
        if (addCircleTopicAdminDTO.getId() == null) {
            return R.fail("参数错误");
        }
        addCircleTopicAdminDTO.setCommunityId(this.getCommunityId());
        return communityService.editNeighborTopicByAdmin(addCircleTopicAdminDTO);
    }
    @ApiOperation(value = "获取社区审核状态")
    @GetMapping("getCircleExamineStatus")
    public R getCircleExamineStatus(){
@@ -214,5 +187,10 @@
        Long communityId = loginUserInfo.getCommunityId();
        return communityService.editSysConfValue(communityId,status);
    }
    @ApiOperation(value = "分页查询邻里圈话题列表", response = ComActNeighborCircleTopicAdminVO.class)
    @PostMapping("pageNeighborTopicByAdmin")
    public R pageNeighborTopicByAdmin(@RequestBody ComActNeighborCircleTopicAdminDTO circleTopicAdminDTO) {
        return communityService.pageNeighborTopicByAdmin(circleTopicAdminDTO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/listen/PartyBuildingMemberExcelListen.java
@@ -32,10 +32,6 @@
    @Override
    public void invoke(PartyBuildingMemberExcelVO partyBuildingMemberExcelVO, AnalysisContext analysisContext) {
        Boolean isRepeat = list.stream().anyMatch(v -> v.getIdCard().equals(partyBuildingMemberExcelVO.getIdCard()));
        if (isRepeat) {
            throw new PartyBuildingMemberException("导入失败,存在多个相同身份证号:" + partyBuildingMemberExcelVO.getIdCard());
        }
        list.add(partyBuildingMemberExcelVO);
        // 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM
        if (list.size() >= BATCH_COUNT) {
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/NeighborApi.java
@@ -335,23 +335,22 @@
    /**
     * 小程序查询邻里圈话题列表
     *
     * @param communityId
     *            社区id
     * @return 邻里圈话题列表
     */
    @GetMapping("getNeighborTopicByApp")
    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);
    public R getNeighborTopicByApp(@RequestParam("name") String name) {
        return comActNeighborCircleTopicService.getNeighborTopicByApp(name);
    }
    /**
     * 小程序-用户新增话题
     * @param circleTopicAppDTO 请求参数
     * @return  新增结果
     * 删除话题
     * @param id
     * @return
     */
    @PostMapping("addNeighborTopicByApp")
    public R addNeighborTopicByApp(@RequestBody AddNeighborCircleTopicAppDTO circleTopicAppDTO){
        return comActNeighborCircleTopicService.addNeighborTopicByApp(circleTopicAppDTO);
    @GetMapping("deleteNeighborTopic")
    public R deleteNeighborTopic(@RequestParam("id") Long id){
        return comActNeighborCircleTopicService.delete(id);
    }
    /**
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleTopicMapper.java
@@ -33,12 +33,10 @@
    /**
     * 小程序查询邻里圈话题列表
     *
     * @param communityId
     *            社区id
     * @return 邻里圈话题列表
     */
    List<ComActNeighborCircleTopicAppVO> getNeighborTopicByApp(@Param("communityId") Long communityId,@Param("isZero") Integer isZero,@Param("name") String name,@Param("belongType") Integer belongType);
    List<ComActNeighborCircleTopicAppVO> getNeighborTopicByApp(@Param("name") String name);
    /**
     * 添加邻里圈话题热度
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActNeighborCircleTopicDO.java
@@ -72,6 +72,8 @@
     */
    private String logo;
    private Integer sort;
    /**
     * 状态(1.启用  2.禁用)
     */
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActNeighborCircleTopicService.java
@@ -45,11 +45,10 @@
    /**
     * 小程序查询邻里圈话题列表
     *
     * @param communityId
     *            社区id
     * @return 邻里圈话题列表
     */
    R getNeighborTopicByApp(Long communityId,Integer isZero,String name,Integer belongType);
    R getNeighborTopicByApp(String name);
    /**
     * 小程序-用户新增话题
@@ -58,4 +57,10 @@
     */
    R addNeighborTopicByApp(AddNeighborCircleTopicAppDTO circleTopicAppDTO);
    /**
     * 删除话题
     * @param id
     * @return
     */
    R delete(Long id);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java
@@ -6,6 +6,8 @@
import javax.annotation.Resource;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.service.user.UserService;
import com.panzhihua.service_community.service.ComActNeighborCircleTopicService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
@@ -64,7 +66,10 @@
    private ComActNeighborCircleTopicMapper comActNeighborCircleTopicMapper;
    @Resource
    private ComActNeighborCircleTopicService comActNeighborCircleTopicService;
    @Resource
    private UserService userService;
    @Resource
    private ComPbMemberDAO comPbMemberDAO;
    /**
     * 分页查询邻里圈列表
     *
@@ -74,6 +79,18 @@
     */
    @Override
    public R pageNeighborByApp(ComActNeighborCircleAppDTO neighborCircleAppDTO) {
        if(neighborCircleAppDTO.getCommunityId()==0L){
            R<LoginUserInfoVO> loginUserInfoVOR=userService.getUserInfoByUserId(neighborCircleAppDTO.getUserId().toString());
            if(R.isOk(loginUserInfoVOR)){
                LoginUserInfoVO loginUserInfoVO=loginUserInfoVOR.getData();
                if(loginUserInfoVO!=null){
                 ComPbMemberDO comPbMemberDO=comPbMemberDAO.selectOne(new QueryWrapper<ComPbMemberDO>().lambda().eq(ComPbMemberDO::getIdCard,loginUserInfoVO.getIdCard()));
                 if(comPbMemberDO!=null){
                     neighborCircleAppDTO.setCommunityId(comPbMemberDO.getCommunityId());
                 }
                }
            }
        }
        Page userPage = new Page(neighborCircleAppDTO.getPageNum(), neighborCircleAppDTO.getPageSize());
        IPage<ComActNeighborCircleAppVO> doPager = this.baseMapper.pageNeighborByApp(userPage, neighborCircleAppDTO);
        if (!doPager.getRecords().isEmpty()) {
@@ -126,25 +143,6 @@
        }
        if (StringUtils.isNotEmpty(addNeighborCircleAppDTO.getPhone())) {
            neighborCircleDO.setReleasePhone(addNeighborCircleAppDTO.getPhone());
        }
        //判断用户的话题是否是新增的
        if(StringUtils.isNotEmpty(addNeighborCircleAppDTO.getTopicName())){
            //新增邻里圈话题
            ComActNeighborCircleTopicDO circleTopicDO = comActNeighborCircleTopicMapper.selectOne(new QueryWrapper<ComActNeighborCircleTopicDO>()
                    .lambda().eq(ComActNeighborCircleTopicDO::getCommunityId,neighborCircleDO.getCommunityId())
                    .eq(ComActNeighborCircleTopicDO::getName,addNeighborCircleAppDTO.getTopicName()));
            if(circleTopicDO == null){
                circleTopicDO = new ComActNeighborCircleTopicDO();
                circleTopicDO.setCommunityId(neighborCircleDO.getCommunityId());
                circleTopicDO.setName(addNeighborCircleAppDTO.getTopicName());
                circleTopicDO.setCreateBy(neighborCircleDO.getReleaseId());
                circleTopicDO.setCreateAt(new Date());
                circleTopicDO.setCount(0);
                circleTopicDO.setHotNum(0L);
                circleTopicDO.setStatus(ComActNeighborCircleTopicDO.status.yes);
                comActNeighborCircleTopicMapper.insert(circleTopicDO);
            }
            neighborCircleDO.setTopicId(circleTopicDO.getId());
        }
        //判断当前邻里圈是否需要审核
        if(addNeighborCircleAppDTO.getIsExamine().equals(AddComActNeighborCircleAppDTO.isExamine.no)){
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleTopicServiceImpl.java
@@ -2,6 +2,9 @@
import java.util.Date;
import com.panzhihua.service_community.dao.ComActNeighborCircleDAO;
import com.panzhihua.service_community.model.dos.ComActNeighborCircleDO;
import com.panzhihua.service_community.service.ComActNeighborCircleService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
@@ -20,6 +23,8 @@
import lombok.extern.slf4j.Slf4j;
import javax.annotation.Resource;
/**
 * @auther lyq
 * @create 2021-07-06 15:04:37
@@ -31,6 +36,8 @@
    extends ServiceImpl<ComActNeighborCircleTopicMapper, ComActNeighborCircleTopicDO>
    implements ComActNeighborCircleTopicService {
    @Resource
    private ComActNeighborCircleDAO comActNeighborCircleDAO;
    /**
     * 分页查询邻里圈话题列表
     *
@@ -56,7 +63,7 @@
        ComActNeighborCircleTopicDO circleTopicDO =
            this.baseMapper.selectOne(new QueryWrapper<ComActNeighborCircleTopicDO>().lambda()
                .eq(ComActNeighborCircleTopicDO::getName, addCircleTopicAdminDTO.getName())
                .eq(ComActNeighborCircleTopicDO::getCommunityId, addCircleTopicAdminDTO.getCommunityId()));
                );
        if (circleTopicDO != null) {
            return R.fail("该话题已存在");
        }
@@ -85,18 +92,6 @@
        if (circleTopicDO == null) {
            return R.fail("未找到邻里圈话题记录");
        }
        if (StringUtils.isNotEmpty(addCircleTopicAdminDTO.getName())) {
            ComActNeighborCircleTopicDO oldCircleTopicDO =
                this.baseMapper.selectOne(new QueryWrapper<ComActNeighborCircleTopicDO>().lambda()
                    .eq(ComActNeighborCircleTopicDO::getName, addCircleTopicAdminDTO.getName())
                    .eq(ComActNeighborCircleTopicDO::getCommunityId, addCircleTopicAdminDTO.getCommunityId())
                    .ne(ComActNeighborCircleTopicDO::getId, circleTopicDO.getId()));
            if (oldCircleTopicDO != null && !oldCircleTopicDO.getId().equals(addCircleTopicAdminDTO.getId())) {
                return R.fail("该话题已存在");
            }
        }
        BeanUtils.copyProperties(addCircleTopicAdminDTO, circleTopicDO);
        if (this.baseMapper.updateById(circleTopicDO) > 0) {
            return R.ok();
@@ -107,13 +102,12 @@
    /**
     * 小程序查询邻里圈话题列表
     *
     * @param communityId
     *            社区id
     * @return 邻里圈话题列表
     */
    @Override
    public R getNeighborTopicByApp(Long communityId,Integer isZero,String name,Integer belongType){
        return R.ok(this.baseMapper.getNeighborTopicByApp(communityId,isZero,name,belongType));
    public R getNeighborTopicByApp(String name){
        return R.ok(this.baseMapper.getNeighborTopicByApp(name));
    }
    /**
@@ -141,4 +135,17 @@
        }
        return R.ok(circleTopicDO);
    }
    @Override
    public R delete(Long id) {
        ComActNeighborCircleTopicDO comActNeighborCircleTopicDO=this.baseMapper.selectById(id);
        if(comActNeighborCircleTopicDO==null){
            return R.fail("参数错误");
        }
        Integer count=this.comActNeighborCircleDAO.selectCount(new QueryWrapper<ComActNeighborCircleDO>().lambda().eq(ComActNeighborCircleDO::getTopicId,id));
        if(count>0){
            return R.fail("请删除相应问题");
        }
        return R.ok(this.baseMapper.deleteById(id));
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleTopicDOMapper.xml
@@ -27,35 +27,26 @@
            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
            su.`name` as createBy,
            canct.sort
        FROM
            com_act_neighbor_circle_topic AS canct
            LEFT JOIN sys_user AS su ON su.user_id = canct.create_by
        <where>
            <if test="circleTopicAdminDTO.communityId != null">
                and canct.community_id = ${circleTopicAdminDTO.communityId}
            </if>
            <if test="circleTopicAdminDTO.status != null">
                and canct.status = #{circleTopicAdminDTO.status}
            </if>
            <if test="circleTopicAdminDTO.name != null and circleTopicAdminDTO.name != &quot;&quot;">
                and canct.name like concat(#{circleTopicAdminDTO.name},'%')
            </if>
        </where>
        order by canct.create_at desc
        order by canct.sort asc
    </select>
    <select id="getNeighborTopicByApp" resultType="com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleTopicAppVO">
        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>
        SELECT canct.id, canct.`name`,`logo`, canct.hot_num
         from com_act_neighbor_circle_topic as canct where canct.`status` = 1
        <if test="name != null and name != &quot;&quot;">
            and canct.`name` like concat('%',#{name},'%')
        </if>
        order by `count` desc
        order by canct.sort asc
    </select>
    <update id="addHotNum">
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbMemberDAO.java
@@ -187,4 +187,11 @@
     * @return  党员列表
     */
    IPage<PartyBuildingMemberVO> getPbMemberByApplets(Page page,@Param("dto") PartyBuildingMemberVO partyBuildingMemberVO);
    /**
     * 小程序获取报道单位党员列表
     * @param id
     * @return
     */
    List<PartyBuildingMemberVO> getDetailByApp(Long id);
}
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbCheckUnitServiceImpl.java
@@ -5,7 +5,6 @@
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.common.utlis.StringUtils;
@@ -161,8 +160,8 @@
     */
    @Override
    public R queryByList(PageComPbCheckUnitDto comPbCheckUnit) {
        List<ComPbCheckUnitVo> checkUnitList = this.baseMapper.queryAllByList(comPbCheckUnit);
        checkUnitList.forEach(checkUnit -> {
        IPage<ComPbCheckUnitVo> checkUnitList = this.baseMapper.queryAllByLimit(comPbCheckUnit,new Page(comPbCheckUnit.getPageNum(),comPbCheckUnit.getPageSize()));
        checkUnitList.getRecords().forEach(checkUnit -> {
            if(StringUtils.isEmpty(checkUnit.getOrgName())){
                checkUnit.setOrgName("待编辑党支部");
            }
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java
@@ -93,7 +93,9 @@
        List<ComPbMemberDO> comPbMemberDOs = comPbMemberDAO.selectList(new QueryWrapper<ComPbMemberDO>().lambda()
            .eq(ComPbMemberDO::getIdCard, idCard).eq(ComPbMemberDO::getAuditResult, 1));
        if (!ObjectUtils.isEmpty(comPbMemberDOs) && comPbMemberDOs.size() > 0) {
            return R.fail("身份证已经存在");
            comPbMemberDOs.forEach(comPbMemberDO -> {
                comPbMemberDAO.deleteById(comPbMemberDO.getId());
            });
        }
        ComPbMemberDO comPbMemberDO1 = new ComPbMemberDO();
        BeanUtils.copyProperties(partyBuildingMemberVO, comPbMemberDO1);
@@ -102,28 +104,6 @@
        comPbMemberDO1.setUpdateAt(date);
        int insert = comPbMemberDAO.insert(comPbMemberDO1);
        if (insert > 0) {
            //金沙特殊需求
            if(comPbMemberDO1.getCommunityId()==2L){
                ComMngVolunteerMngVO comMngVolunteerMngVO=new ComMngVolunteerMngVO();
                comMngVolunteerMngVO.setOrgId(53L);
                comMngVolunteerMngVO.setName(comPbMemberDO1.getName());
                comMngVolunteerMngVO.setPhone(comPbMemberDO1.getPhone());
                comMngVolunteerMngVO.setIdCard(comPbMemberDO1.getIdCard());
                comMngVolunteerMngVO.setState(2);
                comMngVolunteerMngVO.setCommunityId(2L);
                R r = communityService.addVolunteer(comMngVolunteerMngVO);
                // 支援者添加成功,修改小程序用户的志愿者状态    ,通过手机号
                if (R.isOk(r)) {
                    String phone = comMngVolunteerMngVO.getPhone();
                    R r1 = userService.putUserIsVolunteer(phone, 1);
                    if (R.isOk(r1)) {
                        log.info("修改手机号【{}】的支援者状态为是", phone);
                    } else {
                        log.info("手机号【{}】没有小程序用户", phone);
                    }
                }
            }
            // 删除已驳回的记录
            int delete = comPbMemberDAO.delete(new QueryWrapper<ComPbMemberDO>().lambda()
                .eq(ComPbMemberDO::getIdCard, partyBuildingMemberVO.getIdCard())
@@ -201,7 +181,7 @@
                    comPbMemberDO.setCommunityId(partyOrganizationVO.getCommunityId());
                    List<ComPbMemberDO> comPbMemberDOList = this.baseMapper.selectList(new QueryWrapper<ComPbMemberDO>()
                        .lambda().eq(ComPbMemberDO::getIdCard, partyBuildingMemberExcelVO.getIdCard())
                        .lambda().eq(ComPbMemberDO::getPhone, partyBuildingMemberExcelVO.getPhone())
                        .eq(ComPbMemberDO::getCommunityId, partyOrganizationVO.getCommunityId())
                        .in(ComPbMemberDO::getAuditResult, 0, 1));
                    if (!comPbMemberDOList.isEmpty()) {
@@ -215,36 +195,7 @@
                        // partyBuildingMemberExcelVO.getName());
                    }
                }
                if (StringUtils.isNotEmpty(partyBuildingMemberExcelVO.getEmploymentTime())
                    && !DateUtils.isValidDate(partyBuildingMemberExcelVO.getEmploymentTime())) {
                    throw new PartyBuildingMemberException(
                        "导入失败,您导入的数据中有转正日期格式错误,错误数据:" + partyBuildingMemberExcelVO.getEmploymentTime() + ",错误人名:"
                            + partyBuildingMemberExcelVO.getName());
                }
                if (StringUtils.isNotEmpty(partyBuildingMemberExcelVO.getJoinTime())
                    && !DateUtils.isValidDate(partyBuildingMemberExcelVO.getJoinTime())) {
                    throw new PartyBuildingMemberException("导入失败,您导入的数据中有入党日期格式错误,错误数据:"
                        + partyBuildingMemberExcelVO.getJoinTime() + ",错误人名:" + partyBuildingMemberExcelVO.getName());
                }
                if (StringUtils.isNotEmpty(partyBuildingMemberExcelVO.getEmploymentTime())) {
                    Date employmentTime = DateUtils.toValidDate(partyBuildingMemberExcelVO.getEmploymentTime());
                    comPbMemberDO.setEmploymentTime(employmentTime);
                } else {
                    comPbMemberDO.setEmploymentTime(null);
                }
                if (StringUtils.isNotEmpty(partyBuildingMemberExcelVO.getJoinTime())) {
                    Date joinTime = DateUtils.toValidDate(partyBuildingMemberExcelVO.getJoinTime());
                    comPbMemberDO.setJoinTime(joinTime);
                } else {
                    comPbMemberDO.setJoinTime(null);
                }
                comPbMemberDO.setName(partyBuildingMemberExcelVO.getName());
                comPbMemberDO.setIdCard(partyBuildingMemberExcelVO.getIdCard());
                comPbMemberDO.setPhone(partyBuildingMemberExcelVO.getPhone());
                comPbMemberDOS.add(comPbMemberDO);
            }
@@ -253,28 +204,7 @@
            boolean flag=this.save(comPbMemberDO);
            if(flag){
                //修改党员状态
                userService.updateUserIsPartymember(comPbMemberDO.getIdCard());
                //金沙社区特殊需求 添加党员默认添加志愿者
                if(comPbMemberDO.getCommunityId()==2L){
                    ComMngVolunteerMngVO comMngVolunteerMngVO=new ComMngVolunteerMngVO();
                    comMngVolunteerMngVO.setOrgId(53L);
                    comMngVolunteerMngVO.setName(comPbMemberDO.getName());
                    comMngVolunteerMngVO.setPhone(comPbMemberDO.getPhone());
                    comMngVolunteerMngVO.setIdCard(comPbMemberDO.getIdCard());
                    comMngVolunteerMngVO.setState(2);
                    comMngVolunteerMngVO.setCommunityId(2L);
                    R r = communityService.addVolunteer(comMngVolunteerMngVO);
                    // 支援者添加成功,修改小程序用户的志愿者状态    ,通过手机号
                    if (R.isOk(r)) {
                        String phone = comMngVolunteerMngVO.getPhone();
                        R r1 = userService.putUserIsVolunteer(phone, 1);
                        if (R.isOk(r1)) {
                            log.info("修改手机号【{}】的支援者状态为是", phone);
                        } else {
                            log.info("手机号【{}】没有小程序用户", phone);
                        }
                    }
                }
                userService.updateUserIsPartymemberByPhone(comPbMemberDO.getPhone());
            }
        });
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java
@@ -693,6 +693,11 @@
        return userService.updateUserIsPartymember(idCard);
    }
    @PostMapping("updateuserispartymemberByPhone")
    public R updateUserIsPartymemberByPhone(@RequestParam("phone") String phone) {
        return userService.updateUserIsPartymemberByPhone(phone);
    }
    /**
     * 修改用户为非党员状态
     *
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/UserService.java
@@ -453,6 +453,15 @@
    R updateUserIsPartymember(String idCard);
    /**
     * 修改用户的党员状态
     *
     * @param phone
     *            身份证号
     * @return 修改结果
     */
    R updateUserIsPartymemberByPhone(String phone);
    /**
     * 修改用户为非党员状态
     *
     * @param idCard
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -1975,6 +1975,30 @@
    /**
     * 修改用户的党员状态
     *
     * @param phone
     *            身份证号
     * @return 修改结果
     */
    @Override
    public R updateUserIsPartymemberByPhone(String phone) {
        SysUserDO sysUserDO = userDao.selectOne(
                new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getPhone, phone).eq(SysUserDO::getType, 1));
        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);
            }
            log.info("新增党员修改用户党员状态成功 手机号【{}】", phone);
        }
        return R.ok();
    }
    /**
     * 修改用户的党员状态
     *
     * @param idCard
     *            身份证号
     * @return 修改结果