mitao
2025-02-28 0e4c3c6a2e4774a67326841255d3078b75b4b1c8
bug修改
5个文件已修改
1个文件已添加
52 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/SystemUserController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/SystemUserMapper.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/vo/RegionVO.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/ISystemUserService.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/SystemUserServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/SystemUserMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/SystemUserController.java
@@ -11,6 +11,7 @@
import com.panzhihua.sangeshenbian.model.entity.SystemMenu;
import com.panzhihua.sangeshenbian.model.entity.SystemRoleMenu;
import com.panzhihua.sangeshenbian.model.entity.SystemUser;
import com.panzhihua.sangeshenbian.model.vo.RegionVO;
import com.panzhihua.sangeshenbian.service.ISystemMenuService;
import com.panzhihua.sangeshenbian.service.ISystemRoleMenuService;
import com.panzhihua.sangeshenbian.service.ISystemUserService;
@@ -313,8 +314,8 @@
            @ApiImplicitParam(name = "tier", value = "数据层级(2=区县,3=街道,4=社区)", required = true, dataType = "int"),
    })
    @OperLog(operModul = "三个身边后台",operType = 0,businessType = "获取行政区划层级联动数据")
    public R<List<Map<String, String>>> getAdministrativeDivision(@PathVariable("id") String id, @PathVariable("tier") Integer tier){
        List<Map<String, String>> list = new ArrayList<>();
    public R<List<RegionVO>> getAdministrativeDivision(@PathVariable("id") String id, @PathVariable("tier") Integer tier){
        List<RegionVO> list = new ArrayList<>();
        //区县
        if(2 == tier){
            list = systemUserService.getRegion("510400");
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/SystemUserMapper.java
@@ -4,6 +4,7 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.sangeshenbian.model.entity.SystemUser;
import com.panzhihua.sangeshenbian.model.vo.RegionVO;
import com.panzhihua.sangeshenbian.warpper.SystemUserList;
import com.panzhihua.sangeshenbian.warpper.SystemUserListVo;
import org.apache.ibatis.annotations.Mapper;
@@ -32,14 +33,14 @@
     * @param pcode
     * @return
     */
    List<Map<String, String>> getRegion(@Param("pcode") String pcode);
    List<RegionVO> getRegion(@Param("pcode") String pcode);
    
    /**
     * 获取街道数据
     * @param areaCode
     * @return
     */
    List<Map<String, String>> getStreet(@Param("areaCode") String areaCode);
    List<RegionVO> getStreet(@Param("areaCode") String areaCode);
    
    
    /**
@@ -47,5 +48,5 @@
     * @param streetId
     * @return
     */
    List<Map<String, String>> getCommunity(@Param("streetId") String streetId);
    List<RegionVO> getCommunity(@Param("streetId") String streetId);
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/vo/RegionVO.java
New file
@@ -0,0 +1,18 @@
package com.panzhihua.sangeshenbian.model.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author mitao
 * @date 2025/2/28
 */
@Data
@ApiModel("区域视图对象")
public class RegionVO {
    @ApiModelProperty("主键id")
    private String id;
    @ApiModelProperty("名称")
    private String name;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/ISystemUserService.java
@@ -3,11 +3,11 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.sangeshenbian.model.entity.SystemUser;
import com.panzhihua.sangeshenbian.model.vo.RegionVO;
import com.panzhihua.sangeshenbian.warpper.SystemUserList;
import com.panzhihua.sangeshenbian.warpper.SystemUserListVo;
import java.util.List;
import java.util.Map;
import java.util.Optional;
/**
@@ -35,7 +35,7 @@
     * @param pcode
     * @return
     */
    List<Map<String, String>> getRegion(String pcode);
    List<RegionVO> getRegion(String pcode);
    
    
    /**
@@ -44,7 +44,7 @@
     * @param areaCode
     * @return
     */
    List<Map<String, String>> getStreet(String areaCode);
    List<RegionVO> getStreet(String areaCode);
    
    
    /**
@@ -53,5 +53,5 @@
     * @param streetId
     * @return
     */
    List<Map<String, String>> getCommunity(String streetId);
    List<RegionVO> getCommunity(String streetId);
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/SystemUserServiceImpl.java
@@ -6,13 +6,13 @@
import com.panzhihua.common.utlis.StringUtils;
import com.panzhihua.sangeshenbian.dao.SystemUserMapper;
import com.panzhihua.sangeshenbian.model.entity.SystemUser;
import com.panzhihua.sangeshenbian.model.vo.RegionVO;
import com.panzhihua.sangeshenbian.service.ISystemUserService;
import com.panzhihua.sangeshenbian.warpper.SystemUserList;
import com.panzhihua.sangeshenbian.warpper.SystemUserListVo;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
import java.util.Optional;
/**
@@ -61,7 +61,7 @@
     * @return
     */
    @Override
    public List<Map<String, String>> getRegion(String pcode) {
    public List<RegionVO> getRegion(String pcode) {
        return this.baseMapper.getRegion(pcode);
    }
    
@@ -73,7 +73,7 @@
     * @return
     */
    @Override
    public List<Map<String, String>> getStreet(String areaCode) {
    public List<RegionVO> getStreet(String areaCode) {
        return this.baseMapper.getStreet(areaCode);
    }
    
@@ -85,7 +85,7 @@
     * @return
     */
    @Override
    public List<Map<String, String>> getCommunity(String streetId) {
    public List<RegionVO> getCommunity(String streetId) {
        return this.baseMapper.getCommunity(streetId);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/SystemUserMapper.xml
@@ -55,17 +55,17 @@
    
    
    
    <select id="getRegion" resultType="map">
    <select id="getRegion" resultType="com.panzhihua.sangeshenbian.model.vo.RegionVO">
        select region_code as id, region_name as name from bc_region where parent_id = #{pcode}
    </select>
    
    
    <select id="getStreet" resultType="map">
    <select id="getStreet" resultType="com.panzhihua.sangeshenbian.model.vo.RegionVO">
        select CAST(street_id AS CHAR) as id, name as name from com_street where area_code = #{areaCode}
    </select>
    
    
    <select id="getCommunity" resultType="map">
    <select id="getCommunity" resultType="com.panzhihua.sangeshenbian.model.vo.RegionVO">
        select CAST(Scommunity_id AS CHAR) as id, name as name from com_act where street_id = #{streetId}
    </select>