DESKTOP-71BH0QO\L、ming
2021-03-29 b8637915f199f88c643f96118c2dd00201472fcc
ADD:实有房屋相关接口
1 文件已重命名
8个文件已修改
73 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/UserApi.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/VillageApi.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngVillageVO.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/api/ComMngVillageApi.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActVillageDAO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngVillageDO.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngVillageService.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVillageServiceImpl.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/UserApi.java
@@ -25,8 +25,7 @@
 **/
@Api(tags = {"用户模块"})
@RestController
@RequestMapping("/user/")
public class UserApi extends BaseController {
@RequestMapping("/user/")public class UserApi extends BaseController {
    @Resource
    private UserService userService;
    @ApiOperation(value = "当前登录用户信息",response = LoginUserInfoVO.class)
@@ -35,7 +34,6 @@
        Long userId = this.getUserId();
        return userService.detailUser(userId);
    }
    @ApiOperation(value = "修改密码")
    @PutMapping("changepassword")
    @OperLog(operModul = "密码管理",operType = 2)
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/VillageApi.java
@@ -2,16 +2,12 @@
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.community.PageComMngVillageDTO;
import com.panzhihua.common.model.dtos.community.PageComStreetDTO;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.ComMngVillageVO;
import com.panzhihua.common.model.vos.community.ComStreetVO;
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 org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -31,8 +27,6 @@
public class VillageApi extends BaseController {
    @Resource
    private CommunityService communityService;
    @Resource
    private UserService userService;
    @ApiOperation(value = "分页查询实有房屋",response = PageComMngVillageDTO.class )
    @PostMapping("pagevillage")
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngVillageVO.java
@@ -25,7 +25,7 @@
    private Integer houseNum;
    @ApiModelProperty("小区(组)")
    private String group;
    private String groupAt;
    @ApiModelProperty("社区id")
    private Long communityId;
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -1374,7 +1374,7 @@
     * @param Ids
     * @return
     */
    @PostMapping("/deletestreet")
    @PostMapping("/deletevillage")
    R delectVillage(@RequestBody List<Long> Ids);
    /**
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComMngVillageApi.java
@@ -1,12 +1,9 @@
package com.panzhihua.service_community.api;
import com.panzhihua.common.model.dtos.community.PageComMngVillageDTO;
import com.panzhihua.common.model.dtos.community.PageComStreetDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.ComMngVillageVO;
import com.panzhihua.common.model.vos.community.ComStreetVO;
import com.panzhihua.service_community.service.ComMngVillageService;
import com.panzhihua.service_community.service.ComStreetService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PostMapping;
@@ -37,7 +34,7 @@
    @PostMapping("addvillage")
    @Transactional(rollbackFor = Exception.class)
    public R addVillage(@Valid  @RequestBody ComMngVillageVO comMngVillageVO) {
        R r = comMngVillageService.addComMngVillage(comMngVillageVO);
        R r = comMngVillageService.addComActVillage(comMngVillageVO);
        return R.ok(r);
    }
@@ -48,7 +45,7 @@
     */
    @PostMapping("pagevillage")
    public R pageVillage(@RequestBody PageComMngVillageDTO pageComMngVillageDTO) {
        R r = comMngVillageService.pageComMngVillage(pageComMngVillageDTO);
        R r = comMngVillageService.pageComActVillage(pageComMngVillageDTO);
        return R.ok(r);
    }
@@ -59,7 +56,7 @@
     */
    @PostMapping("listvillage")
    public R listVillage(@RequestBody ComMngVillageVO comMngVillageVO) {
        R r = comMngVillageService.listComMngVillage(comMngVillageVO);
        R r = comMngVillageService.listComActVillage(comMngVillageVO);
        return R.ok(r);
    }
@@ -71,7 +68,7 @@
    @PostMapping("deletevillage")
    @Transactional(rollbackFor = Exception.class)
    public R delectVillage(@RequestBody List<Long> Ids) {
        R r = comMngVillageService.delecComMngVillage(Ids);
        R r = comMngVillageService.delecComActVillage(Ids);
        return R.ok(r);
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActVillageDAO.java
File was renamed from springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngVillageDAO.java
@@ -9,5 +9,5 @@
 * @description: 街道
 **/
@Mapper
public interface ComMngVillageDAO extends BaseMapper<ComMngVillageDO> {
public interface ComActVillageDAO extends BaseMapper<ComMngVillageDO> {
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngVillageDO.java
@@ -31,7 +31,7 @@
    /**
     * 小区(组)
     */
    private String group;
    private String groupAt;
    /**
     * 创建时间
     */
@@ -42,12 +42,10 @@
    /**
     * 社区id
     */
    @TableId(type = IdType.AUTO)
    private Long communityId;
    /**
     * 街道id
     */
    @TableId(type = IdType.AUTO)
    private Long streetId;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngVillageService.java
@@ -13,28 +13,33 @@
public interface ComMngVillageService {
    /**
     * 添加实有房屋
     *
     * @param comMngVillageVO 实有房屋
     * @return 新增结果
     */
    R addComMngVillage(ComMngVillageVO comMngVillageVO);
    R addComActVillage(ComMngVillageVO comMngVillageVO);
    /**
     * 查询实有房屋
     *
     * @param comMngVillageVO 登录人的经纬度、或者指定区域的社区
     * @return 社区集合
     */
    R listComMngVillage(ComMngVillageVO comMngVillageVO);
    R listComActVillage(ComMngVillageVO comMngVillageVO);
    /**
     * 分页查询实有房屋
     *
     * @param pageComMngVillageDTO 查询参数
     * @return 分页集合
     */
    R pageComMngVillage(PageComMngVillageDTO pageComMngVillageDTO);
    R pageComActVillage(PageComMngVillageDTO pageComMngVillageDTO);
    /**
     * 删除实有房屋
     *
     * @param Ids 实有房屋ids
     * @return 删除结果
     */
    R delecComMngVillage(List<Long> Ids);
    R delecComActVillage(List<Long> Ids);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVillageServiceImpl.java
@@ -9,12 +9,8 @@
import com.panzhihua.common.model.dtos.community.PageComMngVillageDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.ComMngVillageVO;
import com.panzhihua.common.model.vos.community.ComStreetVO;
import com.panzhihua.service_community.dao.ComActDAO;
import com.panzhihua.service_community.dao.ComMngVillageDAO;
import com.panzhihua.service_community.model.dos.ComActDO;
import com.panzhihua.service_community.dao.ComActVillageDAO;
import com.panzhihua.service_community.model.dos.ComMngVillageDO;
import com.panzhihua.service_community.model.dos.ComStreetDO;
import com.panzhihua.service_community.service.ComMngVillageService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
@@ -29,23 +25,24 @@
@Service
public class ComMngVillageServiceImpl implements ComMngVillageService {
    @Resource
    ComMngVillageDAO comMngVillageDAO;
    ComActVillageDAO comActVillageDAO;
    @Override
    public R addComMngVillage(ComMngVillageVO comMngVillageVO) {
    public R addComActVillage(ComMngVillageVO comMngVillageVO) {
        ComMngVillageDO comMngVillageDO = new ComMngVillageDO();
        LambdaQueryWrapper<ComMngVillageDO> param = new QueryWrapper<ComMngVillageDO>().lambda();
        param.eq(ComMngVillageDO::getCommunityId, comMngVillageVO.getCommunityId());
        Integer resultCount = comMngVillageDAO.selectCount(param);
        param.eq(ComMngVillageDO::getAlley, comMngVillageVO.getAlley());
        Integer resultCount = comActVillageDAO.selectCount(param);
        if (resultCount > 0) {
            return R.fail("实有房屋已经存在");
        }
        BeanUtils.copyProperties(comMngVillageVO, comMngVillageDO);
        int insert = comMngVillageDAO.insert(comMngVillageDO);
        int insert = comActVillageDAO.insert(comMngVillageDO);
        if (insert > 0) {
            param.eq(ComMngVillageDO::getAlley, comMngVillageVO.getAlley());
            param.eq(ComMngVillageDO::getHouseNum, comMngVillageVO.getHouseNum());
            ComMngVillageDO comMngVillageDO1 = comMngVillageDAO.selectOne(param);
            ComMngVillageDO comMngVillageDO1 = comActVillageDAO.selectOne(param);
            BeanUtils.copyProperties(comMngVillageDO1, comMngVillageVO);
            return R.ok(comMngVillageVO);
        }
@@ -53,19 +50,19 @@
    }
    @Override
    public R listComMngVillage(ComMngVillageVO comMngVillageVO) {
    public R listComActVillage(ComMngVillageVO comMngVillageVO) {
        List<ComMngVillageDO> vos = Lists.newArrayList();
        LambdaQueryWrapper<ComMngVillageDO> param = new QueryWrapper<ComMngVillageDO>().lambda();
        param.eq(ComMngVillageDO::getAlley, comMngVillageVO.getAlley());
        param.eq(ComMngVillageDO::getCommunityId, comMngVillageVO.getCommunityId());
        List<ComMngVillageDO> comMngVillageDOS = comMngVillageDAO.selectList(param);
        List<ComMngVillageDO> comMngVillageDOS = comActVillageDAO.selectList(param);
        BeanUtils.copyProperties(vos, comMngVillageDOS);
        return R.ok(vos);
    }
    @Override
    public R pageComMngVillage(PageComMngVillageDTO pageComMngVillageDTO) {
    public R pageComActVillage(PageComMngVillageDTO pageComMngVillageDTO) {
        Page page = new Page<>();
        Long pageNum = pageComMngVillageDTO.getPageNum();
        Long pageSize = pageComMngVillageDTO.getPageSize();
@@ -82,13 +79,13 @@
            userLambdaQueryWrapper.like(ComMngVillageDO::getAlley, pageComMngVillageDTO.getAlley());
        }
        Page userPage = new Page(pageNum, pageSize);
        IPage<ComMngVillageDO> doPager = comMngVillageDAO.selectPage(userPage, userLambdaQueryWrapper);
        IPage<ComMngVillageDO> doPager = comActVillageDAO.selectPage(userPage, userLambdaQueryWrapper);
        return R.ok(doPager);
    }
    @Override
    public R delecComMngVillage(List<Long> Ids) {
        int delete = comMngVillageDAO.deleteBatchIds(Ids);
    public R delecComActVillage(List<Long> Ids) {
        int delete = comActVillageDAO.deleteBatchIds(Ids);
        if (delete > 0) {
            return R.ok();
        }