springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/BcRegionApi.java
New file @@ -0,0 +1,36 @@ package com.panzhihua.applets.api; import com.panzhihua.common.controller.BaseController; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.service.community.CommunityService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; /** * 行政区划表(BcRegion)表控制层 * projectName 成都呐喊信息技术有限公司-智慧社区项目 * description: 行政区划表相关功能 * * @author zzj * @since 2022-04-20 14:26:14 */ @Api(tags = {"行政区划"}) @RestController @RequestMapping("bcRegion") public class BcRegionApi extends BaseController { /** * 服务对象 */ @Resource private CommunityService communityService; @ApiOperation("四级联动接口") @GetMapping("levelList") public R levelList(){ return this.communityService.levelList(); } } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/acid/ComActAcidRecordDTO.java
@@ -59,4 +59,6 @@ private String travelCard; @ApiModelProperty("核查状态") private String checkStatus; @ApiModelProperty("id数组") private String ids; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ProvinceCityReturnVO.java
New file @@ -0,0 +1,14 @@ package com.panzhihua.common.model.vos.community; import lombok.Data; import java.util.List; /** * @author zzj */ @Data public class ProvinceCityReturnVO { private String name; private List<ProvinceCityReturnVO> provinceCityReturnVOList; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -9876,4 +9876,7 @@ */ @PostMapping("/comActAcidCheckRecord/update") R updateComActAcidCheckRecord(@RequestBody ComActAcidCheckRecordVO comActAcidCheckRecordVO); @GetMapping("/bcRegion/levelList") R levelList(); } springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/BcRegionApi.java
New file @@ -0,0 +1,38 @@ package com.panzhihua.community_backstage.api; import com.panzhihua.common.controller.BaseController; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.service.community.CommunityService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; /** * 行政区划表(BcRegion)表控制层 * projectName 成都呐喊信息技术有限公司-智慧社区项目 * description: 行政区划表相关功能 * * @author zzj * @since 2022-04-20 14:26:14 */ @Api(tags = {"行政区划"}) @RestController @RequestMapping("bcRegion") public class BcRegionApi extends BaseController { /** * 服务对象 */ @Resource private CommunityService communityService; @ApiOperation("四级联动接口") @GetMapping("levelList") public R levelList(){ return this.communityService.levelList(); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/BcRegionApi.java
@@ -42,4 +42,8 @@ public R selectAll(@RequestParam("province") String province, @RequestParam("city") String city, @RequestParam("county")String country,@RequestParam("town")String town) { return this.bcRegionService.pageList(province,city,country,town); } @GetMapping("levelList") public R levelList(){ return this.bcRegionService.levelList(); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/BcRegionDao.java
@@ -2,9 +2,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.panzhihua.common.model.dtos.property.CommonPage; import com.panzhihua.common.model.vos.community.ProvinceCityReturnVO; import org.apache.ibatis.annotations.Mapper; import com.panzhihua.service_community.entity.BcRegion; import org.apache.ibatis.annotations.Param; import java.util.List; /** * 行政区划表(BcRegion)表数据库访问层 @@ -25,4 +28,12 @@ * @return */ String selectByName(@Param("province") String province,@Param("city") String city,@Param("county")String country,@Param("town")String town); List<ProvinceCityReturnVO> selectFirst(); List<ProvinceCityReturnVO> selectSecond(String name); List<ProvinceCityReturnVO> selectThird(String name); List<ProvinceCityReturnVO> selectFourth(String name); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActAcidRecordDao.java
@@ -47,6 +47,13 @@ List<ComActAcidRecordExcelReturn> exportNew(@Param("commonPage")ComActAcidRecordDTO comActAcidRecordDTO); /** * 导出 * @param ids * @return */ List<ComActAcidRecordExcelReturn> selectByIds(String ids); /** * 5项统计 * @param localCity * @return springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/BcRegionService.java
@@ -20,4 +20,10 @@ * @return */ R pageList(String province, String city, String country,String town); /** * 四级联动列表 * @return */ R levelList(); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BcRegionServiceImpl.java
@@ -1,13 +1,19 @@ package com.panzhihua.service_community.service.impl; import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.panzhihua.common.model.dtos.property.CommonPage; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.ProvinceCityReturnVO; import com.panzhihua.service_community.entity.BcRegion; import com.panzhihua.service_community.dao.BcRegionDao; import com.panzhihua.service_community.service.BcRegionService; import lombok.extern.slf4j.Slf4j; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.List; /** * 行政区划表(BcRegion)表服务实现类 @@ -20,9 +26,35 @@ @Slf4j @Service public class BcRegionServiceImpl extends ServiceImpl<BcRegionDao, BcRegion> implements BcRegionService { @Resource private StringRedisTemplate stringRedisTemplate; @Override public R pageList(String province, String city, String country,String town) { return R.ok(this.baseMapper.selectByName(province,city,country,town)); } @Override public R levelList() { if(stringRedisTemplate.hasKey("levelList")){ return R.ok(stringRedisTemplate.opsForValue().get("levelList")); } else { List<ProvinceCityReturnVO> firstLevel=this.baseMapper.selectFirst(); firstLevel.forEach(provinceCityReturnVO -> { List<ProvinceCityReturnVO> secondLevel=this.baseMapper.selectSecond(provinceCityReturnVO.getName()); secondLevel.forEach(provinceCityReturnVO1 -> { List<ProvinceCityReturnVO> thirdLevel=this.baseMapper.selectThird(provinceCityReturnVO1.getName()); thirdLevel.forEach(provinceCityReturnVO2 -> { List<ProvinceCityReturnVO> fourthLevel=this.baseMapper.selectFourth(provinceCityReturnVO2.getName()); provinceCityReturnVO2.setProvinceCityReturnVOList(fourthLevel); }); provinceCityReturnVO1.setProvinceCityReturnVOList(thirdLevel); }); provinceCityReturnVO.setProvinceCityReturnVOList(secondLevel); }); stringRedisTemplate.opsForValue().set("levelList", JSON.toJSONString(firstLevel)); return R.ok(firstLevel); } } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActAcidRecordServiceImpl.java
@@ -74,7 +74,13 @@ @Override public R export(ComActAcidRecordDTO comActAcidRecordDTO) { List<ComActAcidRecordExcelReturn> comActAcidRecordExcelVOS=this.baseMapper.export(comActAcidRecordDTO); List<ComActAcidRecordExcelReturn> comActAcidRecordExcelVOS=new ArrayList<>(); if(StringUtils.isNotEmpty(comActAcidRecordDTO.getIds())){ comActAcidRecordExcelVOS=this.baseMapper.selectByIds(comActAcidRecordDTO.getIds()); } else { comActAcidRecordExcelVOS=this.baseMapper.export(comActAcidRecordDTO); } comActAcidRecordExcelVOS.forEach(comActAcidRecordExcelVO -> { if(StringUtils.isNotEmpty(comActAcidRecordExcelVO.getTouristCity())&&comActAcidRecordExcelVO.getTouristCity().contains("[")){ JSONArray jsonArray = JSON.parseArray(comActAcidRecordExcelVO.getTouristCity()); springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVillageServiceImpl.java
@@ -96,7 +96,7 @@ ComMngVillageDO comMngVillageDO=new ComMngVillageDO(); comMngVillageDO.setVillageId(1540264792718184449L); comMngVillageDO.setType(1); comMngVillageDO.setName("默认小区"); comMngVillageDO.setName("该社区/村暂未添加小区(院落),请先选择本项"); comMngVillageDOS.add(comMngVillageDO); } return R.ok(comMngVillageDOS); @@ -106,7 +106,7 @@ ComMngVillageDO comMngVillageDO=new ComMngVillageDO(); comMngVillageDO.setVillageId(1540264792718184449L); comMngVillageDO.setType(1); comMngVillageDO.setName("默认小区"); comMngVillageDO.setName("该社区/村暂未添加小区(院落),请先选择本项"); vos.add(comMngVillageDO); } return R.ok(vos); springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/BcRegionMapper.xml
@@ -35,4 +35,19 @@ limit 1 </select> <select id="selectFirst" resultType="com.panzhihua.common.model.vos.community.ProvinceCityReturnVO"> select distinct province as name from area_index_2022 </select> <select id="selectSecond" resultType="com.panzhihua.common.model.vos.community.ProvinceCityReturnVO"> select distinct city as name from area_index_2022 where province = #{name} and city !='攀枝花市' </select> <select id="selectThird" resultType="com.panzhihua.common.model.vos.community.ProvinceCityReturnVO"> select distinct county as name from area_index_2022 where city = #{name} </select> <select id="selectFourth" resultType="com.panzhihua.common.model.vos.community.ProvinceCityReturnVO"> select distinct town as name from area_index_2022 where county = #{name} </select> </mapper> springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActAcidRecordMapper.xml
@@ -104,6 +104,17 @@ order by t.create_time desc </select> <select id="selectByIds" resultType="com.panzhihua.common.model.vos.community.acid.ComActAcidRecordExcelReturn"> select t.*,t1.status from com_act_acid_record t left join com_act_acid_danger_member t1 on t.id = t1.record_id <where> t.is_del=0 and t.name is not null and t.id_card is not null and t.phone is not null <if test="ids !=null and ids !=''"> and t.id in (${ids}) </if> </where> order by t.create_time desc </select> <select id="exportNew" resultType="com.panzhihua.common.model.vos.community.acid.ComActAcidRecordExcelReturn"> select t.*,t1.status from com_act_acid_record t left join com_act_acid_danger_member t1 on t.id = t1.record_id <where> springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -251,11 +251,11 @@ @Override public R updateUserWeiXinPhone(Long userId, String purePhoneNumber) { SysUserDO sysUserDO=userDao.selectById(userId); if(sysUserDO!=null&&StringUtils.isEmpty(sysUserDO.getPhone())){ if(sysUserDO!=null){ userDao.updateMemberRole(purePhoneNumber, sysUserDO.getPhone()); userDao.updateServiceTeam(purePhoneNumber, sysUserDO.getPhone()); sysUserDO.setPhone(purePhoneNumber); sysUserDO.setUserId(userId); userDao.updateMemberRole(purePhoneNumber, purePhoneNumber); userDao.updateServiceTeam(purePhoneNumber, purePhoneNumber); int i = userDao.updateById(sysUserDO); if (i > 0) { return R.ok(purePhoneNumber);