DESKTOP-71BH0QO\L、ming
2021-04-02 8555f974846ca5b4f4734f52b51e39cd4502df44
fix:修改bug
10个文件已修改
83 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/CommunityApi.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/StreetApi.java 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/AdministratorsUserVO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngCarServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVillageServiceImpl.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComOpsAdvServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComStreetServiceImpl.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/SysUserFeedbackDAO.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/CommunityApi.java
@@ -102,7 +102,6 @@
    public R detailCommunity(@RequestParam("id") Long id){
        return communityService.detailCommunity(id);
    }
}
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/StreetApi.java
@@ -2,25 +2,21 @@
import com.alibaba.fastjson.JSONObject;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.interfaces.OperLog;
import com.panzhihua.common.model.dtos.community.PageComActDTO;
import com.panzhihua.common.model.dtos.community.PageComStreetDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.ComActVO;
import com.panzhihua.common.model.vos.community.ComMngStructAreaDistrictVO;
import com.panzhihua.common.model.vos.community.ComMngStructAreaVO;
import com.panzhihua.common.model.vos.community.ComStreetVO;
import com.panzhihua.common.model.vos.user.AdministratorsUserVO;
import com.panzhihua.common.service.community.CommunityService;
import com.panzhihua.common.service.user.UserService;
import com.panzhihua.common.validated.AddGroup;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;
/**
 * @description: 街道管理
@@ -44,13 +40,37 @@
    @ApiOperation(value = "查询街道",response = ComStreetVO.class )
    @PostMapping("liststreet")
    public R listStreet(@RequestBody ComStreetVO comStreetVO){
        return communityService.listStreet(comStreetVO);
        R r = communityService.listStreet(comStreetVO);
        return r;
    }
    @ApiOperation(value = "新增街道",response = ComStreetVO.class )
    @PostMapping("addstreet")
    public R pageStreet(@RequestBody ComStreetVO comStreetVO){
        return communityService.pageStreet(comStreetVO);
        R r = communityService.addStreet(comStreetVO);
        if (R.isOk(r)) {
            AdministratorsUserVO administratorsUserVO = new AdministratorsUserVO();
            administratorsUserVO.setAccount(comStreetVO.getAccount());
            administratorsUserVO.setPassword(comStreetVO.getPassword());
            administratorsUserVO.setType(4);
            administratorsUserVO.setAreaId(null);
            administratorsUserVO.setStatus(1);
            administratorsUserVO.setRoleId(999999999l);
            administratorsUserVO.setUserId(this.getUserId());
            R r1 = userService.addUserBackstage(administratorsUserVO);
            if (!R.isOk(r1)) {
                ComStreetVO paramStreet = new ComStreetVO();
                paramStreet.setProvinceCode(comStreetVO.getProvinceCode());
                paramStreet.setCityCode(comStreetVO.getCityCode());
                paramStreet.setAreaCode(comStreetVO.getAreaCode());
                paramStreet.setName(comStreetVO.getName());
                List<ComStreetVO> comStreetVOS = JSONObject.parseArray(JSONObject.toJSONString(r.getData()), ComStreetVO.class);
                List<Long> streetIds = comStreetVOS.stream().map(ComStreetVO::getStreetId).collect(Collectors.toList());
                communityService.delectStreat(streetIds);
            }
        }
        return r;
    }
    @ApiOperation(value = "批量删除街道")
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/AdministratorsUserVO.java
@@ -44,7 +44,7 @@
    @Min(groups = {AddGroup.class},value =1,message = "账户状态不能为空")
    private Integer status;
    @ApiModelProperty(value = "人员所在平台 用户类型 1 小程序 2 运营平台 3 社区平台",hidden = true)
    @ApiModelProperty(value = "人员所在平台 用户类型 1 小程序 2 运营平台 3 社区平台 4 街道平台",hidden = true)
    private Integer type;
    @ApiModelProperty(value = "小区id",hidden = true)
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -1504,7 +1504,7 @@
     * @return  新增结果
     */
    @PostMapping("/addstreet")
    R pageStreet(@RequestBody ComStreetVO comStreetVOO);
    R addStreet(@RequestBody ComStreetVO comStreetVOO);
    /**
     * 删除街道
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngCarServiceImpl.java
@@ -97,10 +97,10 @@
            return R.fail("车牌号有误!");
        }
        ComMngCarDO exist= comMngCarDAO.selectOne(new QueryWrapper<ComMngCarDO>()
                .lambda().eq(ComMngCarDO::getPlateNum, comMngCarSaveDTO.getPlateNum()).and(wrapper->wrapper.eq(ComMngCarDO::getSource,2)));
        /*if (comMngCarSaveDTO.getId()!=0 && exist.getId()!=comMngCarSaveDTO.getId()) {
                .lambda().eq(ComMngCarDO::getPlateNum, comMngCarSaveDTO.getPlateNum()));
        if (exist != null) {
            return R.ok("车辆已存在");
        }*/
        }
        ComMngStructAreaDO comMngStructAreaDO = comMngStructAreaDAO.selectById(comMngCarSaveDTO.getAreaId());
        if (ObjectUtils.isEmpty(comMngStructAreaDO)) {
            return R.fail("小区不存在");
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVillageServiceImpl.java
@@ -13,9 +13,11 @@
import com.panzhihua.common.model.vos.community.ComMngVillageVO;
import com.panzhihua.service_community.dao.ComActDAO;
import com.panzhihua.service_community.dao.ComActVillageDAO;
import com.panzhihua.service_community.dao.ComMngPopulationDAO;
import com.panzhihua.service_community.dao.ComMngVolunteerMngDAO;
import com.panzhihua.service_community.model.dos.ComActDO;
import com.panzhihua.service_community.model.dos.ComActDiscussDO;
import com.panzhihua.service_community.model.dos.ComMngPopulationDO;
import com.panzhihua.service_community.model.dos.ComMngVillageDO;
import com.panzhihua.service_community.service.ComMngVillageService;
import org.springframework.beans.BeanUtils;
@@ -38,6 +40,8 @@
    ComActVillageDAO comActVillageDAO;
    @Resource
    ComActDAO comActDAO;
    @Resource
    ComMngPopulationDAO populationDAO;
    @Override
    public R addComActVillage(ComMngVillageVO comMngVillageVO) {
@@ -100,6 +104,12 @@
    @Override
    public R delecComActVillage(List<Long> Ids) {
        LambdaQueryWrapper<ComMngPopulationDO> paramWrapper = Wrappers.lambdaQuery();
        paramWrapper.in(ComMngPopulationDO::getVillageId, Ids);
        ComMngPopulationDO mngPopulationDO = populationDAO.selectOne(paramWrapper);
        if (mngPopulationDO != null) {
            return R.fail("无法删除,已绑定实有人口!");
        }
        int delete = comActVillageDAO.deleteBatchIds(Ids);
        if (delete > 0) {
            return R.ok();
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComOpsAdvServiceImpl.java
@@ -52,7 +52,7 @@
    @Override
    public R getJumpContent() {
        List<ComOpsAdvJumpVO> comOpsAdvJumpVOS=new ArrayList<>();
        List<ComOpsAdvJumpDO> comOpsAdvJumpDOS = comOpsAdvJumpDAO.selectList(null);
        List<ComOpsAdvJumpDO> comOpsAdvJumpDOS = comOpsAdvJumpDAO.selectList(new QueryWrapper<>());
        if (!ObjectUtils.isEmpty(comOpsAdvJumpDOS)) {
            comOpsAdvJumpDOS.forEach(comOpsAdvJumpDO -> {
                ComOpsAdvJumpVO comOpsAdvJumpVO=new ComOpsAdvJumpVO();
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComStreetServiceImpl.java
@@ -21,6 +21,7 @@
import org.springframework.util.ObjectUtils;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
/**
@@ -85,8 +86,14 @@
        if (comStreetVO.getAreaCode() != null) {
            param.eq(ComStreetDO::getAreaCode, comStreetVO.getAreaCode());
        }
        List<ComStreetVO> voList = Lists.newArrayList();
        List<ComStreetDO> comStreetDOS = comStreetDAO.selectList(param);
        return R.ok(comStreetDOS);
        comStreetDOS.forEach(dos -> {
            ComStreetVO vo = new ComStreetVO();
            BeanUtils.copyProperties(dos, vo);
            voList.add(vo);
        });
        return R.ok(voList);
    }
    /**
@@ -138,6 +145,7 @@
    /**
     * 批量删除街道
     *
     * @param streetIds 社区id
     * @return 删除结果
     */
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/SysUserFeedbackDAO.java
@@ -41,15 +41,15 @@
            "c.name communityName\n" +
            "from sys_user_feedback f\n" +
            "join sys_user u on f.user_id=u.user_id\n" +
            "<if test='pageFeedBackDTO.name != null and pageFeedBackDTO.name.trim() != &quot;&quot;'>" +
            "and u.name=#{pageFeedBackDTO.name}\n" +
            " </if> " +
            "<if test='pageFeedBackDTO.nickName != null and pageFeedBackDTO.nickName.trim() != &quot;&quot;'>" +
            "and u.nick_name=#{pageFeedBackDTO.nickName}\n" +
            " </if> " +
            "<if test='pageFeedBackDTO.phone != null and pageFeedBackDTO.phone.trim() != &quot;&quot;'>" +
            "and u.phone=#{pageFeedBackDTO.phone}\n" +
            " </if> " +
            "<if test='pageFeedBackDTO.name != null and pageFeedBackDTO.name.trim() != &quot;&quot;'>" +
            "and u.name like concat('%',#{pageFeedBackDTO.name},'%')   \n" +
            " </if> " +
            "<if test='pageFeedBackDTO.nickName != null and pageFeedBackDTO.nickName.trim() != &quot;&quot;'>" +
            "and u.nick_name=like concat('%',#{pageFeedBackDTO.nickName},'%') \n" +
            " </if> " +
            "join com_act c on u.community_id=c.community_id\n" +
            "order by f.create_at desc\n" +
            "</script>")
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -781,7 +781,7 @@
        }
        if (insert>0) {
            SysUserDO sysUserDO1 = userDao.selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getType, administratorsUserVO.getType()).eq(SysUserDO::getPhone, administratorsUserVO.getPhone()));
            SysUserDO sysUserDO1 = userDao.selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getType, administratorsUserVO.getType()).eq(SysUserDO::getAccount, administratorsUserVO.getAccount()));
            Long userId = sysUserDO1.getUserId();
            SysUserRoleDO sysUserRoleDO=new SysUserRoleDO();
            sysUserRoleDO.setUserId(userId);