mitao
2025-03-17 a42cbb25455c468865fbba70438c571ce109865d
增加小程序端区域树接口
9个文件已修改
70 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/MgtPartyMemberController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/SystemUserController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/BcRegionController.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/PartyMemberController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IBcRegionService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/BcRegionServiceImpl.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/PartyMemberDTO.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/PartyMemberQuery.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/PartyMemberMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/MgtPartyMemberController.java
@@ -107,7 +107,7 @@
        }
    }
    @ApiOperation("审核")
    @GetMapping("/audit/{id}")
    @PostMapping("/audit")
    public R<?> audit(@RequestBody PartyMemberDTO dto) {
        SystemUserVo loginUserInfo = getLoginUserInfoSanGeShenBian();
        partyMemberService.audit(dto,loginUserInfo);
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/SystemUserController.java
@@ -340,4 +340,5 @@
        List<RegionVO> list = systemUserService.getRegionTree(loginUserInfo);
        return R.ok(list);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/BcRegionController.java
@@ -1,9 +1,19 @@
package com.panzhihua.sangeshenbian.controller;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.sangeshenbian.model.vo.RegionVO;
import com.panzhihua.sangeshenbian.service.IBcRegionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.chanjar.weixin.common.annotation.Required;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
 * <p>
@@ -13,8 +23,15 @@
 * @author 
 * @since 2025-02-23
 */
@Api(tags = {"行政区划管理相关接口"})
@RestController
@RequestMapping("/bc-region")
@RequiredArgsConstructor
public class BcRegionController {
    private final IBcRegionService bcRegionService;
    @GetMapping("/regionTree-applet")
    @ApiOperation(value = "获取区县-街道-社区树")
    public R<List<RegionVO>> regionTree() {
        return R.ok(bcRegionService.regionTree());
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/PartyMemberController.java
@@ -14,6 +14,7 @@
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Lazy;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IBcRegionService.java
@@ -2,6 +2,9 @@
import com.panzhihua.sangeshenbian.model.entity.BcRegion;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.sangeshenbian.model.vo.RegionVO;
import java.util.List;
/**
 * <p>
@@ -20,4 +23,10 @@
    BcRegion getDistrictByName(String districtName);
    BcRegion getDistrictByCode(String districtCode);
    /**
     * 获取区县-街道-社区树
     * @return
     */
    List<RegionVO> regionTree();
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/BcRegionServiceImpl.java
@@ -1,10 +1,16 @@
package com.panzhihua.sangeshenbian.service.impl;
import com.panzhihua.sangeshenbian.dao.SystemUserMapper;
import com.panzhihua.sangeshenbian.model.entity.BcRegion;
import com.panzhihua.sangeshenbian.dao.BcRegionMapper;
import com.panzhihua.sangeshenbian.model.vo.RegionVO;
import com.panzhihua.sangeshenbian.service.IBcRegionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * <p>
@@ -15,7 +21,9 @@
 * @since 2025-02-23
 */
@Service
@RequiredArgsConstructor(onConstructor_ = {@Lazy})
public class BcRegionServiceImpl extends ServiceImpl<BcRegionMapper, BcRegion> implements IBcRegionService {
    private final SystemUserMapper systemUserMapper;
    /**
     * 判断区县是否存在
     * @param districtName
@@ -33,4 +41,22 @@
    public BcRegion getDistrictByCode(String districtCode) {
        return this.lambdaQuery().eq(BcRegion::getRegionCode, districtCode).last("LIMIT 1").one();
    }
    /**
     * 获取区县-街道-社区树
     * @return
     */
    @Override
    public List<RegionVO> regionTree() {
        List<RegionVO> regionTree = systemUserMapper.getRegion("510400");
        systemUserMapper.getStreet("510400");
        regionTree.forEach(district -> {
            List<RegionVO> streets = systemUserMapper.getStreet(district.getId());
            district.setChildren(streets);
            streets.forEach(street -> {
                List<RegionVO> communities = systemUserMapper.getCommunity(street.getId());
                street.setChildren(communities);
            });
        });
        return regionTree;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/PartyMemberDTO.java
@@ -64,4 +64,10 @@
    @ApiModelProperty(value = "头像")
    @NotBlank(message = "头像不能空")
    private String avatar;
    @ApiModelProperty(value = "审核状态 0:待审核 1:审核通过 2:审核不通过")
    private Integer auditStatus;
    @ApiModelProperty(value = "拒绝理由")
    private String refuseReason;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/PartyMemberQuery.java
@@ -21,7 +21,7 @@
    private Long communityId;
    @ApiModelProperty(value = "服务对象")
    private String serviceObject;
    private String serviceTarget;
    @ApiModelProperty(value = "所在党组织")
    private String partyOrganization;
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/PartyMemberMapper.xml
@@ -45,7 +45,7 @@
            <if test="query.communityId != null and query.communityId != ''">
                and community_id = #{query.communityId}
            </if>
            <if test="query.serviceObject != null and query.serviceObject != ''">
            <if test="query.serviceTarget != null and query.serviceTarget != ''">
                and service_target like concat('%',#{query.serviceTarget},'%')
            </if>
            <if test="query.partyOrganization != null and query.partyOrganization != ''">
@@ -97,7 +97,7 @@
            <if test="query.communityId != null and query.communityId != ''">
                and community_id = #{query.communityId}
            </if>
            <if test="query.serviceObject != null and query.serviceObject != ''">
            <if test="query.serviceTarget != null and query.serviceTarget != ''">
                and service_target like concat('%',#{query.serviceTarget},'%')
            </if>
            <if test="query.partyOrganization != null and query.partyOrganization != ''">