101captain
2022-06-30 cc595b0aa24773735417accd0158da6ac98a6db0
Merge branch 'huacheng' into huacheng_test

# Conflicts:
# springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
# springcloud_k8s_panzhihuazhihuishequ/community_backstage/pom.xml
18个文件已修改
11个文件已添加
830 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/BcRegionApi.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/pom.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/KaphtchaApi.java 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/config/KaptchaConfig.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/auth/src/main/java/com/panzhihua/auth/handel/UserAuthenticationProvider.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/acid/ComActAcidRecordDTO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ProvinceCityReturnVO.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/BcRegionApi.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActAcidRecordApi.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/BcRegionApi.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActAcidRecordApi.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/BcRegionDao.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActAcidRecordDao.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComCunDao.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/SysUserDao.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComAreaTownCommunity.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComCun.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/SysUser.java 269 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/BcRegionService.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActAcidRecordService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BcRegionServiceImpl.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActAcidRecordServiceImpl.java 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVillageServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/BcRegionMapper.xml 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActAcidRecordMapper.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComCunMapper.xml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/SysUserMapper.xml 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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/applets_backstage/pom.xml
@@ -64,6 +64,11 @@
            <artifactId>minio</artifactId>
            <version>6.0.8</version>
        </dependency>
        <dependency>
            <groupId>com.github.penggle</groupId>
            <artifactId>kaptcha</artifactId>
            <version>2.3.2</version>
        </dependency>
    </dependencies>
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/KaphtchaApi.java
New file
@@ -0,0 +1,80 @@
package com.panzhihua.applets_backstage.api;
import com.google.code.kaptcha.impl.DefaultKaptcha;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.utlis.StringUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.imageio.ImageIO;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.time.Duration;
/**
 * @author zzj
 */
@Api(tags = {"验证码接口"})
@RestController
@RequestMapping("/kaphtcha/")
public class KaphtchaApi extends BaseController {
    @Resource
    private DefaultKaptcha defaultKaptcha;
    @Resource
    private StringRedisTemplate stringRedisTemplate;
    @ApiOperation("生成验证码")
    @GetMapping("/verification")
    public void defaultKaptcha(@RequestParam("uuid")String uuid,HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
            throws Exception {
        byte[] captchaChallengeAsJpeg = null;
        ByteArrayOutputStream jpegOutputStream = new ByteArrayOutputStream();
        try {
            // 生产验证码字符串并保存到session中,分布式环境存redis中
            String createText = defaultKaptcha.createText();
            stringRedisTemplate.opsForValue().set("verifyCode_"+uuid,createText, Duration.ofMinutes(5));
            // 使用生产的验证码字符串返回一个BufferedImage对象并转为byte写入到byte数组中
            BufferedImage challenge = defaultKaptcha.createImage(createText);
            ImageIO.write(challenge, "jpg", jpegOutputStream);
        } catch (IllegalArgumentException e) {
            httpServletResponse.sendError(HttpServletResponse.SC_NOT_FOUND);
            return;
        }
        // 定义response输出类型为image/jpeg类型,使用response输出流输出图片的byte数组
        captchaChallengeAsJpeg = jpegOutputStream.toByteArray();
        httpServletResponse.setHeader("Cache-Control", "no-store");
        httpServletResponse.setHeader("Pragma", "no-cache");
        httpServletResponse.setDateHeader("Expires", 0);
        httpServletResponse.setContentType("image/jpeg");
        ServletOutputStream responseOutputStream = httpServletResponse.getOutputStream();
        responseOutputStream.write(captchaChallengeAsJpeg);
        responseOutputStream.flush();
        responseOutputStream.close();
    }
    @ApiOperation("验证码核对")
    @GetMapping("/checkVerifyCode")
    public R checkVerifyCode(@RequestParam("verifyCode")String verifyCode,@RequestParam("uuid")String uuid){
        String text=stringRedisTemplate.opsForValue().get("verifyCode_"+uuid);
        if(StringUtils.isNotEmpty(text)){
            if(verifyCode.equals(text)){
                stringRedisTemplate.delete("verifyCode_"+uuid);
                return R.ok();
            }
            return R.fail("验证码错误");
        }
        return R.fail("验证码失效");
    }
}
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/config/KaptchaConfig.java
New file
@@ -0,0 +1,45 @@
package com.panzhihua.applets_backstage.config;
import com.google.code.kaptcha.Constants;
import com.google.code.kaptcha.impl.DefaultKaptcha;
import com.google.code.kaptcha.util.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.Properties;
/**
 * @author zzj
 */
@Configuration
public class KaptchaConfig {
    /**
     * 验证码配置
     * @return
     */
    @Bean
    public DefaultKaptcha getDefaultKaptcha(){
        DefaultKaptcha defaultKaptcha=new DefaultKaptcha();
        Properties properties=new Properties();
        //是否有边框
        properties.setProperty(Constants.KAPTCHA_BORDER,"yes");
        //验证码文本颜色
        properties.setProperty(Constants.KAPTCHA_TEXTPRODUCER_FONT_COLOR,"red");
        //验证码图片宽度
        properties.setProperty(Constants.KAPTCHA_IMAGE_WIDTH,"180");
        //验证码图片高度
        properties.setProperty(Constants.KAPTCHA_IMAGE_HEIGHT,"80");
        //文本字符大小
        properties.setProperty(Constants.KAPTCHA_TEXTPRODUCER_FONT_SIZE,"39");
        //验证码session的值
        properties.setProperty(Constants.KAPTCHA_SESSION_CONFIG_KEY,"kaptchaCode");
        //验证码文本长度
        properties.setProperty(Constants.KAPTCHA_TEXTPRODUCER_CHAR_LENGTH,"4");
        //字体
        properties.setProperty(Constants.KAPTCHA_TEXTPRODUCER_FONT_NAMES, "宋体,楷体,微软雅黑");
        Config config=new Config(properties);
        defaultKaptcha.setConfig(config);
        return defaultKaptcha;
    }
}
springcloud_k8s_panzhihuazhihuishequ/auth/src/main/java/com/panzhihua/auth/handel/UserAuthenticationProvider.java
@@ -54,7 +54,7 @@
        // 获取表单输入中返回的用户名
        String userName = (String)authentication.getPrincipal();
        String password =(String)authentication.getCredentials();
        if(!userName.contains("_1")){
        if(!userName.contains("_1")&&!userName.contains("_6")){
            try {
                password = MyAESUtil.Decrypt((String)authentication.getCredentials(),"Ryo7M3n8loC5Abcd");
            } catch (Exception e) {
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
@@ -9677,6 +9677,9 @@
    @GetMapping("/comActAcidRecord/statics")
    R comActAcidRecordStatics(@RequestParam("date")String date);
    @GetMapping("/comActAcidRecord/test")
    R test();
    /**
     * 分页查询所有数据
     *
@@ -9882,4 +9885,7 @@
     */
    @GetMapping("/neighbor/institutionalUnitServiceAnalysis")
    R institutionalUnitServiceAnalysis(@RequestParam(value = "year") Integer year,@RequestParam("communityId") Long communityId);
    @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/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActAcidRecordApi.java
@@ -279,4 +279,9 @@
    public R statics(@RequestParam("date")String date){
        return this.communityService.comActAcidRecordStatics(date);
    }
    @GetMapping("/test")
    public R test(){
        return this.communityService.test();
    }
}
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/api/ComActAcidRecordApi.java
@@ -161,4 +161,8 @@
    public R detailByApp(@RequestParam("id")Long id,@RequestParam("localCity")String localCity){
        return this.comActAcidRecordService.detailByApp(id,localCity);
    }
    @GetMapping("/test")
    public R test(){
        return this.comActAcidRecordService.test();
    }
}
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/dao/ComCunDao.java
New file
@@ -0,0 +1,18 @@
package com.panzhihua.service_community.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import com.panzhihua.service_community.entity.ComCun;
/**
 * (ComCun)表数据库访问层
 * projectName 成都呐喊信息技术有限公司-智慧社区项目
 * description: 相关功能
 *
 * @author zzj
 * @since 2022-06-10 15:12:40
 */
@Mapper
public interface ComCunDao extends BaseMapper<ComCun> {
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/SysUserDao.java
New file
@@ -0,0 +1,18 @@
package com.panzhihua.service_community.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import com.panzhihua.service_community.entity.SysUser;
/**
 * 用户表 后台用户+小程序用户(SysUser)表数据库访问层
 * projectName 成都呐喊信息技术有限公司-智慧社区项目
 * description: 用户表 后台用户+小程序用户相关功能
 *
 * @author zzj
 * @since 2022-06-10 15:34:17
 */
@Mapper
public interface SysUserDao extends BaseMapper<SysUser> {
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComAreaTownCommunity.java
@@ -51,4 +51,6 @@
    @ApiModelProperty(value = "社区")
    private String community;
    private Long communityId;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComCun.java
New file
@@ -0,0 +1,45 @@
package com.panzhihua.service_community.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
 * (ComCun)表实体类
 * projectName 成都呐喊信息技术有限公司-智慧社区项目
 * description: 相关功能
 *
 * @author zzj
 * @since 2022-06-10 15:12:39
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("")
public class ComCun implements Serializable {
    private static final long serialVersionUID = -52058950684473753L;
    private String area;
    private String town;
    private String community;
    private String account;
    private String name;
    private String phone;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/SysUser.java
New file
@@ -0,0 +1,269 @@
package com.panzhihua.service_community.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
 * 用户表 后台用户+小程序用户(SysUser)表实体类
 * projectName 成都呐喊信息技术有限公司-智慧社区项目
 * description: 用户表 后台用户+小程序用户相关功能
 *
 * @author zzj
 * @since 2022-06-10 15:34:16
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("用户表 后台用户+小程序用户")
public class SysUser implements Serializable {
    private static final long serialVersionUID = -70884515430727555L;
    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    private Long userId;
    /**
     * 登录账户
     */
    @ApiModelProperty(value = "登录账户")
    private String account;
    /**
     * 登录密码
     */
    @ApiModelProperty(value = "登录密码")
    private String password;
    /**
     * 微信小程序唯一标识
     */
    @ApiModelProperty(value = "微信小程序唯一标识")
    private String openid;
    /**
     * 会话密钥
     */
    @ApiModelProperty(value = "会话密钥")
    private String sessionKey;
    /**
     * 用户在开放平台的唯一标识符
     */
    @ApiModelProperty(value = "用户在开放平台的唯一标识符")
    private String unionid;
    /**
     * 手机号
     */
    @ApiModelProperty(value = "手机号")
    private String phone;
    /**
     * 昵称
     */
    @ApiModelProperty(value = "昵称")
    private String nickName;
    /**
     * 真实名字
     */
    @ApiModelProperty(value = "真实名字")
    private String name;
    /**
     * 社区ID
     */
    @ApiModelProperty(value = "社区ID")
    private Long communityId;
    /**
     * 性别 1 男 2 女
     */
    @ApiModelProperty(value = "性别 1 男 2 女")
    private Object sex;
    /**
     * 身份证号
     */
    @ApiModelProperty(value = "身份证号")
    private String idCard;
    /**
     * 生日
     */
    @ApiModelProperty(value = "生日")
    private Date birthday;
    /**
     * 头像
     */
    @ApiModelProperty(value = "头像")
    private String imageUrl;
    /**
     * 用户类型 1 小程序 2 运营平台 3 社区平台 5 商家后台 6 网格综治APP 7 网格综治后台 8大屏 9城管后台 10 便民服务商家后台
     */
    @ApiModelProperty(value = "用户类型 1 小程序 2 运营平台 3 社区平台 5 商家后台 6 网格综治APP 7 网格综治后台 8大屏 9城管后台 10 便民服务商家后台")
    private Object type;
    /**
     * 职业
     */
    @ApiModelProperty(value = "职业")
    private String job;
    /**
     * 是否志愿者 0 否 1 是
     */
    @ApiModelProperty(value = "是否志愿者 0 否 1 是")
    private Object isVolunteer;
    /**
     * 是否党员 0 否 1 是
     */
    @ApiModelProperty(value = "是否党员 0 否 1 是")
    private Object isPartymember;
    /**
     * 1 启用 2 禁用
     */
    @ApiModelProperty(value = "1 启用 2 禁用")
    private Object status;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createAt;
    /**
     * 最后登录时间
     */
    @ApiModelProperty(value = "最后登录时间")
    private Date lastLoginTime;
    /**
     * 标签多个用,隔开
     */
    @ApiModelProperty(value = "标签多个用,隔开")
    private String tags;
    /**
     * 家庭id
     */
    @ApiModelProperty(value = "家庭id")
    private Long familyId;
    /**
     * 人脸采集照片url
     */
    @ApiModelProperty(value = "人脸采集照片url")
    private String faceUrl;
    /**
     * 人脸采集审核状态 0 待审核 1 审核通过 2驳回
     */
    @ApiModelProperty(value = "人脸采集审核状态 0 待审核 1 审核通过 2驳回")
    private Integer faceState;
    /**
     * 驳回原因
     */
    @ApiModelProperty(value = "驳回原因")
    private String rejectReson;
    /**
     * 小区id
     */
    @ApiModelProperty(value = "小区id")
    private Object areaId;
    /**
     * 证件照(人相面)照片
     */
    @ApiModelProperty(value = "证件照(人相面)照片")
    private String cardPhotoFront;
    /**
     * 证件照(国徽面)照片
     */
    @ApiModelProperty(value = "证件照(国徽面)照片")
    private String cardPhotoBack;
    /**
     * 户口本
     */
    @ApiModelProperty(value = "户口本")
    private String familyBook;
    /**
     * 连续登陆天数 每天凌晨定时任务更新
     */
    @ApiModelProperty(value = "连续登陆天数 每天凌晨定时任务更新")
    private Integer continuousLandingDays;
    /**
     * 小程序首页是否显示公告(1.是 2.否)
     */
    @ApiModelProperty(value = "小程序首页是否显示公告(1.是 2.否)")
    private Integer isTips;
    /**
     * 网格员工作状态(1.在岗 2.脱岗 3.已下班)
     */
    @ApiModelProperty(value = "网格员工作状态(1.在岗 2.脱岗 3.已下班)")
    private Integer workStatus;
    /**
     * 网格员上班开始时间
     */
    @ApiModelProperty(value = "网格员上班开始时间")
    private Integer workStartTime;
    /**
     * 网格员上班结束时间
     */
    @ApiModelProperty(value = "网格员上班结束时间")
    private Integer workEndTime;
    /**
     * 高龄认证显示提示(1.是 2.否)
     */
    @ApiModelProperty(value = "高龄认证显示提示(1.是 2.否)")
    private Integer bigAgeTips;
    /**
     * 明文密码
     */
    @ApiModelProperty(value = "明文密码")
    private String plaintextPassword;
    /**
     * 街道id
     */
    @ApiModelProperty(value = "街道id")
    private Long streetId;
    /**
     * 绑定单位
     */
    @ApiModelProperty(value = "绑定单位")
    private String relationName;
}
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/ComActAcidRecordService.java
@@ -104,4 +104,6 @@
     * @return
     */
    R detailByCommunity(Long id);
    R test();
}
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
@@ -15,9 +15,9 @@
import com.panzhihua.common.utlis.DateUtils;
import com.panzhihua.common.utlis.StringUtils;
import com.panzhihua.service_community.dao.*;
import com.panzhihua.service_community.entity.ComActAcidDangerMember;
import com.panzhihua.service_community.entity.ComActAcidRecord;
import com.panzhihua.service_community.entity.ComActAcidUpdateRecord;
import com.panzhihua.service_community.entity.*;
import com.panzhihua.service_community.model.dos.ComActDO;
import com.panzhihua.service_community.model.dos.ComStreetDO;
import com.panzhihua.service_community.service.ComActAcidRecordService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
@@ -60,6 +60,12 @@
    private ComActAcidUpdateRecordDao comActAcidUpdateRecordDao;
    @Resource
    private ComAreaTownCommunityDao comAreaTownCommunityDao;
    @Resource
    private ComCunDao comCunDao;
    @Resource
    private ComStreetDAO comStreetDAO;
    @Resource
    private SysUserDao sysUserDao;
    @Override
    public R pageList(ComActAcidRecordDTO comActAcidRecordDTO) {
@@ -68,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());
@@ -480,4 +492,63 @@
        }
        return R.ok(comActAcidRecordVO);
    }
    @Override
    public R test() {
        List<ComCun> comCuns=comCunDao.selectList(new QueryWrapper<ComCun>());
        comCuns.forEach(comCun->{
           ComActDO comActDO= comActDAO.selectOne(new QueryWrapper<ComActDO>().lambda().eq(ComActDO::getName,comCun.getCommunity()));
            if(comActDO==null){
                ComStreetDO comStreetDO = comStreetDAO.selectOne(new QueryWrapper<ComStreetDO>().lambda().eq(ComStreetDO::getName,comCun.getTown()));
                if(comStreetDO==null){
                    comStreetDO=new ComStreetDO();
                    comStreetDO.setName(comCun.getTown());
                    areaCheck(comCun,comStreetDO);
                    comStreetDO.setAccount(comCun.getAccount());
                    comStreetDAO.insert(comStreetDO);
                }
                comActDO=new ComActDO();
                comActDO.setStreetId(comStreetDO.getStreetId());
                comActDO.setAreaCode(comStreetDO.getAreaCode().toString());
                comActDO.setName(comCun.getCommunity());
                comActDO.setContacts(comCun.getName());
                comActDO.setContactsPhone(comCun.getPhone());
                comActDAO.insert(comActDO);
            }
            ComAreaTownCommunity community=comAreaTownCommunityDao.selectOne(new QueryWrapper<ComAreaTownCommunity>().lambda().eq(ComAreaTownCommunity::getArea,comCun.getArea()).eq(ComAreaTownCommunity::getTown,comCun.getTown()).eq(ComAreaTownCommunity::getCommunity,comCun.getCommunity()));
            if(community==null){
                community=new ComAreaTownCommunity();
                community.setArea(comCun.getArea());
                community.setTown(comCun.getTown());
                community.setCommunity(comCun.getCommunity());
                comAreaTownCommunityDao.insert(community);
            }else {
                community.setCommunityId(comActDO.getCommunityId());
                comAreaTownCommunityDao.updateById(community);
            }
            SysUser sysUser=sysUserDao.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getAccount,comCun.getAccount()));
            if(sysUser!=null){
                System.out.println(comCun.getAccount()+","+comCun.getCommunity());
            }
            else {
                sysUser=new SysUser();
                sysUser.setAccount(comCun.getAccount());
                sysUser.setPassword("$2a$10$F/2lE2NMhKNHJfi5.FLmfu7jIr7ImRWgCTTeO6m3IRNR2V4sv8YR.");
                sysUser.setName(comCun.getCommunity());
                sysUser.setType(9);
                sysUserDao.insert(sysUser);
            }
        });
        return null;
    }
    public static void areaCheck(ComCun area,ComStreetDO comStreetDO){
        switch (area.getArea()){
            case "西区": comStreetDO.setAreaCode(510423); break;
            case "东区": comStreetDO.setAreaCode(510402); break;
            case "仁和区": comStreetDO.setAreaCode(510411); break;
            case "米易县": comStreetDO.setAreaCode(510421); break;
            case "盐边县": comStreetDO.setAreaCode(510422); break;
        }
    }
}
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_community/src/main/resources/mapper/ComCunMapper.xml
New file
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.panzhihua.service_community.dao.ComCunDao">
    <resultMap type="com.panzhihua.service_community.entity.ComCun" id="ComCunBaseResultMap">
        <result property="area" column="area"/>
        <result property="town" column="town"/>
        <result property="community" column="community"/>
        <result property="account" column="account"/>
        <result property="name" column="name"/>
        <result property="phone" column="phone"/>
    </resultMap>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/SysUserMapper.xml
New file
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.panzhihua.service_community.dao.SysUserDao">
    <resultMap type="com.panzhihua.service_community.entity.SysUser" id="SysUserBaseResultMap">
        <result property="userId" column="user_id"/>
        <result property="account" column="account"/>
        <result property="password" column="password"/>
        <result property="openid" column="openid"/>
        <result property="sessionKey" column="session_key"/>
        <result property="unionid" column="unionid"/>
        <result property="phone" column="phone"/>
        <result property="nickName" column="nick_name"/>
        <result property="name" column="name"/>
        <result property="communityId" column="community_id"/>
        <result property="sex" column="sex"/>
        <result property="idCard" column="id_card"/>
        <result property="birthday" column="birthday"/>
        <result property="imageUrl" column="image_url"/>
        <result property="type" column="type"/>
        <result property="job" column="job"/>
        <result property="isVolunteer" column="is_volunteer"/>
        <result property="isPartymember" column="is_partymember"/>
        <result property="status" column="status"/>
        <result property="createAt" column="create_at"/>
        <result property="lastLoginTime" column="last_login_time"/>
        <result property="tags" column="tags"/>
        <result property="familyId" column="family_id"/>
        <result property="faceUrl" column="face_url"/>
        <result property="faceState" column="face_state"/>
        <result property="rejectReson" column="reject_reson"/>
        <result property="areaId" column="area_id"/>
        <result property="cardPhotoFront" column="card_photo_front"/>
        <result property="cardPhotoBack" column="card_photo_back"/>
        <result property="familyBook" column="family_book"/>
        <result property="continuousLandingDays" column="continuous_landing_days"/>
        <result property="isTips" column="is_tips"/>
        <result property="workStatus" column="work_status"/>
        <result property="workStartTime" column="work_start_time"/>
        <result property="workEndTime" column="work_end_time"/>
        <result property="bigAgeTips" column="big_age_tips"/>
        <result property="plaintextPassword" column="plaintext_password"/>
        <result property="streetId" column="street_id"/>
        <result property="relationName" column="relation_name"/>
    </resultMap>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -250,11 +250,12 @@
     */
    @Override
    public R updateUserWeiXinPhone(Long userId, String purePhoneNumber) {
        SysUserDO sysUserDO = new SysUserDO();
        SysUserDO sysUserDO=userDao.selectById(userId);
        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);
@@ -262,6 +263,8 @@
            return R.fail("维护微信手机号失败");
        }
    }
        return R.ok(sysUserDO.getPhone());
    }
    /**
     * 认证中心获取平台用户信息