huanghongfa
2021-05-06 1715cd9041edcfdb80ec74e1cee7bb1e88883169
修复bug
6个文件已修改
1个文件已添加
129 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/PartyBuildingApi.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/partybuilding/ComListPartyDTO.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/partybuilding/PartyBuildingService.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/api/PartyBuildIngApi.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/PartyOrganizationService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/PartyOrganizationServiceImpl.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/PartyBuildingApi.java
@@ -4,6 +4,7 @@
import com.panzhihua.applets.weixin.CheckService;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.partybuilding.ActivitySignUpDTO;
import com.panzhihua.common.model.dtos.partybuilding.ComListPartyDTO;
import com.panzhihua.common.model.dtos.partybuilding.ComPbActivityDTO;
import com.panzhihua.common.model.dtos.partybuilding.PageComPbServiceTeamDTO;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
@@ -199,11 +200,14 @@
    }
    @ApiOperation(value = "社区所有启用的党组织列表", response = PartyOrganizationVO.class)
    @GetMapping("listpartyorganization")
    public R listPartyOrganization() {
    @PostMapping("listpartyorganization")
    public R listPartyOrganization(@RequestBody ComListPartyDTO comListPartyDTO) {
        Long communityId = this.getCommunityId();
        log.info("社区所有党组织社区id【{}】", communityId);
        return partyBuildingService.listPartyOrganization(communityId);
        if(communityId != null){
            comListPartyDTO.setCommunityId(communityId);
        }
        return partyBuildingService.listPartyOrganizationByApp(comListPartyDTO);
    }
    public static void main(String[] args) {
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/partybuilding/ComListPartyDTO.java
New file
@@ -0,0 +1,23 @@
package com.panzhihua.common.model.dtos.partybuilding;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @program: springcloud_k8s_panzhihuazhihuishequ
 * @description: 查询党组织列表请求参数
 * @author: huang.hongfa weixin hhf9596 qq 959656820
 * @create: 2021-01-21 18:05
 **/
@Data
@ApiModel("查询党组织列表请求参数")
public class ComListPartyDTO {
    @ApiModelProperty("姓名")
    private String name;
    @ApiModelProperty(value = "社区id",hidden = true)
    private Long communityId;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/partybuilding/PartyBuildingService.java
@@ -1,9 +1,6 @@
package com.panzhihua.common.service.partybuilding;
import com.panzhihua.common.model.dtos.partybuilding.ActivitySignUpDTO;
import com.panzhihua.common.model.dtos.partybuilding.ComPbActivityDTO;
import com.panzhihua.common.model.dtos.partybuilding.ComPbServiceTeamDTO;
import com.panzhihua.common.model.dtos.partybuilding.PageComPbServiceTeamDTO;
import com.panzhihua.common.model.dtos.partybuilding.*;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.ComActActivityVO;
import com.panzhihua.common.model.vos.partybuilding.*;
@@ -387,4 +384,11 @@
     */
    @PostMapping("/partybuildIng/getPartyBuildingByIdCard")
    R getPartyBuildingByIdCard(@RequestParam("idCard") String idCard);
    /**
     * 社区所有启用的党组织列表
     * @return 党组织集合
     */
    @PostMapping("/partybuildIng/listpartyorganizationByApp")
    R listPartyOrganizationByApp(@RequestBody ComListPartyDTO comListPartyDTO);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java
@@ -84,8 +84,9 @@
                ComActNeighborCircleFabulousDO circleFabulousDO = comActNeighborCircleFabulousDAO.selectOne(
                        new QueryWrapper<ComActNeighborCircleFabulousDO>().lambda().eq(ComActNeighborCircleFabulousDO::getParentId,circleAppVO.getId())
                .eq(ComActNeighborCircleFabulousDO::getUserId,neighborCircleAppDTO.getUserId())
                                .eq(ComActNeighborCircleFabulousDO::getType,ComActNeighborCircleFabulousDO.type.llq));
                if(circleFabulousDO != null && circleFabulousDO.getIsEffective().equals(ComActNeighborCircleFabulousDO.isEffective.yes)){
                                .eq(ComActNeighborCircleFabulousDO::getType,ComActNeighborCircleFabulousDO.type.llq)
                                .eq(ComActNeighborCircleFabulousDO::getIsEffective,ComActNeighborCircleFabulousDO.isEffective.yes));
                if(circleFabulousDO != null){
                    circleAppVO.setHaveSign(1);
                }else{
                    circleAppVO.setHaveSign(2);
@@ -139,8 +140,9 @@
        ComActNeighborCircleFabulousDO circleFabulousDO = comActNeighborCircleFabulousDAO.selectOne(
                new QueryWrapper<ComActNeighborCircleFabulousDO>().lambda().eq(ComActNeighborCircleFabulousDO::getParentId,circleDetailAppVO.getId())
                        .eq(ComActNeighborCircleFabulousDO::getUserId,neighborCircleAppDTO.getUserId())
                        .eq(ComActNeighborCircleFabulousDO::getType,ComActNeighborCircleFabulousDO.type.llq));
        if(circleFabulousDO != null && circleFabulousDO.getIsEffective().equals(ComActNeighborCircleFabulousDO.isEffective.yes)){
                        .eq(ComActNeighborCircleFabulousDO::getType,ComActNeighborCircleFabulousDO.type.llq)
                        .eq(ComActNeighborCircleFabulousDO::getIsEffective,ComActNeighborCircleFabulousDO.isEffective.yes));
        if(circleFabulousDO != null){
            circleDetailAppVO.setHaveSign(1);
        }else{
            circleDetailAppVO.setHaveSign(2);
@@ -155,8 +157,9 @@
                ComActNeighborCircleFabulousDO circleCommentFabulousDO = comActNeighborCircleFabulousDAO.selectOne(
                        new QueryWrapper<ComActNeighborCircleFabulousDO>().lambda().eq(ComActNeighborCircleFabulousDO::getParentId,circleCommentVo.getId())
                                .eq(ComActNeighborCircleFabulousDO::getUserId,neighborCircleAppDTO.getUserId())
                                .eq(ComActNeighborCircleFabulousDO::getType,ComActNeighborCircleFabulousDO.type.pl));
                if(circleCommentFabulousDO != null && circleCommentFabulousDO.getIsEffective().equals(ComActNeighborCircleFabulousDO.isEffective.yes)){
                                .eq(ComActNeighborCircleFabulousDO::getType,ComActNeighborCircleFabulousDO.type.pl)
                                .eq(ComActNeighborCircleFabulousDO::getIsEffective,ComActNeighborCircleFabulousDO.isEffective.yes));
                if(circleCommentFabulousDO != null){
                    circleCommentVo.setHaveSign(1);
                }else{
                    circleCommentVo.setHaveSign(2);
@@ -169,8 +172,9 @@
                        ComActNeighborCircleFabulousDO circleReplyFabulousDO = comActNeighborCircleFabulousDAO.selectOne(
                                new QueryWrapper<ComActNeighborCircleFabulousDO>().lambda().eq(ComActNeighborCircleFabulousDO::getParentId,commentReplyVO.getId())
                                        .eq(ComActNeighborCircleFabulousDO::getUserId,neighborCircleAppDTO.getUserId())
                                        .eq(ComActNeighborCircleFabulousDO::getType,ComActNeighborCircleFabulousDO.type.hf));
                        if(circleReplyFabulousDO != null && circleReplyFabulousDO.getIsEffective().equals(ComActNeighborCircleFabulousDO.isEffective.yes)){
                                        .eq(ComActNeighborCircleFabulousDO::getType,ComActNeighborCircleFabulousDO.type.hf)
                                        .eq(ComActNeighborCircleFabulousDO::getIsEffective,ComActNeighborCircleFabulousDO.isEffective.yes));
                        if(circleReplyFabulousDO != null){
                            commentReplyVO.setHaveSign(1);
                        }else{
                            commentReplyVO.setHaveSign(2);
@@ -592,6 +596,13 @@
            if(circleFabulousDO == null){
                return R.fail("未查询到点赞信息");
            }
            //减少邻里圈点赞数量
            ComActNeighborCircleDO neighborCircleDO = this.baseMapper.selectById(fabulousAppDTO.getServiceId());
            if(neighborCircleDO != null){
                neighborCircleDO.setFabulousNum(neighborCircleDO.getFabulousNum() - 1);
                this.baseMapper.updateById(neighborCircleDO);
            }
        }else if(fabulousAppDTO.getType().equals(ComActNeighborFabulousAppDTO.type.pl)){
            circleFabulousDO = comActNeighborCircleFabulousDAO.selectOne(
                    new QueryWrapper<ComActNeighborCircleFabulousDO>().lambda().eq(ComActNeighborCircleFabulousDO::getParentId,fabulousAppDTO.getServiceId())
@@ -601,6 +612,13 @@
            if(circleFabulousDO == null){
                return R.fail("未查询到点赞信息");
            }
            //减少邻里圈评论点赞数量
            ComActNeighborCircleCommentDO circleCommentDO = comActNeighborCircleCommentDAO.selectById(fabulousAppDTO.getServiceId());
            if(circleCommentDO != null){
                circleCommentDO.setFabulousNum(circleCommentDO.getFabulousNum() - 1);
                comActNeighborCircleCommentDAO.updateById(circleCommentDO);
            }
        }else if(fabulousAppDTO.getType().equals(ComActNeighborFabulousAppDTO.type.hf)){
            circleFabulousDO = comActNeighborCircleFabulousDAO.selectOne(
                    new QueryWrapper<ComActNeighborCircleFabulousDO>().lambda().eq(ComActNeighborCircleFabulousDO::getParentId,fabulousAppDTO.getServiceId())
@@ -610,6 +628,12 @@
            if(circleFabulousDO == null){
                return R.fail("未查询到点赞信息");
            }
            //减少邻里圈评论回复点赞数量
            ComActNeighborCircleCommentReplyDO circleCommentReplyDO = comActNeighborCircleCommentReplyDAO.selectById(fabulousAppDTO.getServiceId());
            if(circleCommentReplyDO != null){
                circleCommentReplyDO.setFabulousNum(circleCommentReplyDO.getFabulousNum() - 1);
                comActNeighborCircleCommentReplyDAO.updateById(circleCommentReplyDO);
            }
        }
        if(circleFabulousDO != null){
            circleFabulousDO.setIsEffective(ComActNeighborCircleFabulousDO.isEffective.no);
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/api/PartyBuildIngApi.java
@@ -2,10 +2,7 @@
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.panzhihua.common.exceptions.PartyBuildingMemberException;
import com.panzhihua.common.model.dtos.partybuilding.ActivitySignUpDTO;
import com.panzhihua.common.model.dtos.partybuilding.ComPbActivityDTO;
import com.panzhihua.common.model.dtos.partybuilding.ComPbServiceTeamDTO;
import com.panzhihua.common.model.dtos.partybuilding.PageComPbServiceTeamDTO;
import com.panzhihua.common.model.dtos.partybuilding.*;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.partybuilding.*;
import com.panzhihua.service_dangjian.model.dos.ComPbMemberDO;
@@ -529,4 +526,14 @@
    R pageUserCertification(@RequestBody PagePartyBuildingMemberVO pagePartyBuildingMemberVO){
        return comPbMemberService.pagePrePartyBuilingMember(pagePartyBuildingMemberVO);
    }
    /**
     * 社区所有启用的党组织列表
     * @return 党组织集合
     */
    @PostMapping("listpartyorganizationByApp")
    public R listPartyOrganizationByApp(@RequestBody ComListPartyDTO comListPartyDTO){
        List<PartyOrganizationVO> partyOrganizationVOS=partyOrganizationService.listPartyOrganizationByApp(comListPartyDTO);
        return R.ok(partyOrganizationVOS);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/PartyOrganizationService.java
@@ -1,5 +1,6 @@
package com.panzhihua.service_dangjian.service;
import com.panzhihua.common.model.dtos.partybuilding.ComListPartyDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.partybuilding.PartyOrganizationVO;
@@ -47,4 +48,10 @@
     * @return 编辑结果
     */
    R deletePartyOrganization(PartyOrganizationVO partyOrganizationVO);
    /**
     * 平台所有启用的党组织
     * @return 党组织集合
     */
    List<PartyOrganizationVO> listPartyOrganizationByApp(ComListPartyDTO comListPartyDTO);
}
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/PartyOrganizationServiceImpl.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.panzhihua.common.model.dtos.partybuilding.ComListPartyDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.partybuilding.PartyOrganizationVO;
import com.panzhihua.service_dangjian.dao.ComPbMemberDAO;
@@ -14,6 +15,7 @@
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.util.ArrayList;
@@ -156,4 +158,24 @@
        }
        return R.fail();
    }
    public List<PartyOrganizationVO> listPartyOrganizationByApp(ComListPartyDTO comListPartyDTO){
        List<PartyOrganizationVO> partyOrganizationVOS = new ArrayList<>();
        QueryWrapper<ComPbOrgDO> queryWrapper = new QueryWrapper<>();
        queryWrapper.lambda().eq(ComPbOrgDO::getCommunityId, comListPartyDTO.getCommunityId()).eq(ComPbOrgDO::getStatus, 1);
        if(!StringUtils.isEmpty(comListPartyDTO.getName())){
            queryWrapper.lambda().like(ComPbOrgDO::getName,comListPartyDTO.getName());
        }
        List<ComPbOrgDO> comPbOrgDOS = comPbOrgDAO.selectList(queryWrapper);
        if (!ObjectUtils.isEmpty(comPbOrgDOS)) {
            comPbOrgDOS.forEach(comPbOrgDO -> {
                PartyOrganizationVO partyOrganizationVO = new PartyOrganizationVO();
                partyOrganizationVO.setId(comPbOrgDO.getId());
                partyOrganizationVO.setName(comPbOrgDO.getName());
                partyOrganizationVO.setStatus(comPbOrgDO.getStatus());
                partyOrganizationVOS.add(partyOrganizationVO);
            });
        }
        return partyOrganizationVOS;
    }
}