lidongdong
2022-11-10 8e925f5deae670edf6c62fe6e13ade401cadb564
Merge remote-tracking branch 'origin/huacheng_test' into huacheng_test
48个文件已修改
4个文件已添加
2298 ■■■■ 已修改文件
flower_city/src/main/java/com/dg/core/api/GuideRepairOrderAppletsController.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/controller/CommonController.java 216 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/controller/RoleManagementController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/db/gen/entity/AutomessagePolicyDocuments.java 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/db/gen/mapper/AutomessagePolicyDocumentsMapper.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/db/manual/mapper/util/MapperGenerator.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/task/SendWsListener.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/util/PermissionUtil.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/util/TestDate.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/resources/mapper/AutomessagePolicyDocumentsMapper.xml 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/resources/mapper/OrganizationChartMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/resources/mapper/TransactionEventMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComPropertyRepairApi.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommonApi.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/DiscussApi.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/IndexApi.java 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/auth/src/main/java/com/panzhihua/auth/handel/UserAuthenticationProvider.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComActProceedingsDTO.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageVolunteerDTO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/partybuilding/ComPbServiceTeamDTO.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/partybuilding/PageComPbServiceTeamDTO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/property/PagePropertyWorkerDTO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngVolunteerMngVO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/easyPhoto/BannerVO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java 171 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/property/PropertyService.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPropertyWorkerApi.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityPartyBuildingApi.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ShopFlowerApi.java 283 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/DiscussApi.java 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ShopFlowerApi.java 232 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoDAO.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComActProceedings.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngVolunteerMngDO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActDiscussService.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActEasyPhotoService.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActMicroWishService.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDiscussServiceImpl.java 349 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java 168 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActMicroWishServiceImpl.java 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActEasyPhotoDOMapper.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngVolunteerMngDOMapper.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbServiceTeamDAO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/model/dos/ComPbServiceTeamDO.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/api/ComPropertyRepairApi.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/ComPropertyRepairService.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/impl/ComPropertyRepairServiceImpl.java 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/UserService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/api/GuideRepairOrderAppletsController.java
@@ -27,6 +27,7 @@
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
@@ -328,14 +329,15 @@
    {
        List<String> ids=null;
        String userId=null;
        if(StringUtils.equals("1",sysUser.getIsDivisionHead()))
        if( StringUtils.equals("2",sysUser.getRoleIds()))
        {
            userId=null;
            ids= PermissionUtil.getPermission(sysUser,iOrganizationChartService);
            userId=sysUser.getUserId()+"";
            ids=new ArrayList<>();
            ids.add(sysUser.getDepartmentId());
        }
        else
        {
            userId=sysUser.getUserId()+"";
            ids=PermissionUtil.getPermission(sysUser,iOrganizationChartService);
        }
        List<GuideRepairOrder> list = iGuideRepairOrderService.selectConfigList(null,ids,status,userId,null,null,null);
        int num=iGuideRepairOrderService.countConfigList(null,ids,status,userId);
flower_city/src/main/java/com/dg/core/controller/CommonController.java
@@ -24,10 +24,7 @@
import javax.annotation.Resource;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.UUID;
import java.util.*;
import static com.dg.core.file.FileTypeUploadUtils.assertAllowed;
@@ -37,127 +34,138 @@
@RequestMapping("/common")
public class CommonController extends BaseController {
  private static final String FILE_DELIMETER = ",";
    private static final String FILE_DELIMETER = ",";
  @Autowired
  private CorsConfig corsConfig;
    @Autowired
    private CorsConfig corsConfig;
  // FTP 登录用户名
  @Value("${ftp.username}")
  private String userName;
  // FTP 登录密码
  @Value("${ftp.password}")
  private String password;
  // FTP 服务器地址IP地址
  @Value("${ftp.host}")
  private String host;
  // FTP 端口
  @Value("${ftp.port}")
  private int port;
  @Value("${ftp.url}")
  private String url;
    // FTP 登录用户名
    @Value("${ftp.username}")
    private String userName;
    // FTP 登录密码
    @Value("${ftp.password}")
    private String password;
    // FTP 服务器地址IP地址
    @Value("${ftp.host}")
    private String host;
    // FTP 端口
    @Value("${ftp.port}")
    private int port;
    @Value("${ftp.url}")
    private String url;
  @RequestMapping("/hello")
    @RequestMapping("/hello")
//  @Authorization
  public ResponseEntity<String> hello() {
    return ResponseEntity.ok("hello world");
  }
  /**
   * 通用上传请求(多个)
   */
  @ApiOperation("文件上传接口(通用)")
  @PostMapping("/uploads")
  public ResultData uploadFiles(List<MultipartFile> files) throws Exception
  {
    List<String> urls = new ArrayList<String>();
    List<String> fileNames = new ArrayList<String>();
    List<String> originalFilenames = new ArrayList<String>();
    for (MultipartFile file : files) {
      String extension = FilenameUtils.getExtension(file.getOriginalFilename());
      String name = UUID.randomUUID().toString().replaceAll("-", "") + "." + extension;
      try {
        assertAllowed(file, MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION);
        SFTPUtil sftp = new SFTPUtil(userName, password, host, port);
        sftp.login();
        InputStream is = file.getInputStream();
        sftp.uploadMore(FtpConstants.FTPFILEPATH_IDCARD, name, is);
        sftp.logout();
        urls.add(url + "/idcard/" + name);
        fileNames.add(name);
        originalFilenames.add(file.getOriginalFilename());
      } catch (Exception e) {
        return ResultData.error("上传文件失败 "+e.getMessage());
      }
    public ResponseEntity<String> hello() {
        return ResponseEntity.ok("hello world");
    }
    AjaxResult ajax = new AjaxResult();
    ajax.put("urls", StringUtils.join(urls, FILE_DELIMETER));
    ajax.put("fileNames", StringUtils.join(fileNames, FILE_DELIMETER));
    ajax.put("originalFilenames", StringUtils.join(originalFilenames, FILE_DELIMETER));
    return ResultData.success(ajax);
  }
    /**
     * 通用上传请求(多个)
     */
    @ApiOperation("文件上传接口(通用)")
    @PostMapping("/uploads")
    public ResultData uploadFiles(List<MultipartFile> files) throws Exception {
        List<String> urls = new ArrayList<String>();
        List<String> fileNames = new ArrayList<String>();
        List<String> originalFilenames = new ArrayList<String>();
        for (MultipartFile file : files) {
            String extension = FilenameUtils.getExtension(file.getOriginalFilename());
            String name = UUID.randomUUID().toString().replaceAll("-", "") + "." + extension;
            try {
                assertAllowed(file, MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION);
                SFTPUtil sftp = new SFTPUtil(userName, password, host, port);
                sftp.login();
                InputStream is = file.getInputStream();
                sftp.uploadMore(FtpConstants.FTPFILEPATH_IDCARD, name, is);
                sftp.logout();
  /**
   * 通用上传请求(单个)
   */
  @ApiOperation("文件上传接口(通用)")
  @PostMapping("/upload")
  public ResultData uploadFile(MultipartFile file) throws Exception
  {
    List<String> urls = new ArrayList<String>();
    List<String> fileNames = new ArrayList<String>();
    List<String> originalFilenames = new ArrayList<String>();
                urls.add(url + "/idcard/" + name);
                fileNames.add(name);
                originalFilenames.add(file.getOriginalFilename());
    String extension = FilenameUtils.getExtension(file.getOriginalFilename());
    String name = UUID.randomUUID().toString().replaceAll("-", "") + "." + extension;
    try {
      assertAllowed(file, MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION);
      SFTPUtil sftp = new SFTPUtil(userName, password, host, port);
      sftp.login();
      InputStream is = file.getInputStream();
      sftp.uploadMore(FtpConstants.FTPFILEPATH_IDCARD, name, is);
      sftp.logout();
            } catch (Exception e) {
                return ResultData.error("上传文件失败 " + e.getMessage());
            }
        }
        AjaxResult ajax = new AjaxResult();
        ajax.put("urls", StringUtils.join(urls, FILE_DELIMETER));
        ajax.put("fileNames", StringUtils.join(fileNames, FILE_DELIMETER));
        ajax.put("originalFilenames", StringUtils.join(originalFilenames, FILE_DELIMETER));
        return ResultData.success(ajax);
    }
    /**
     * 通用上传请求(单个)
     */
    @ApiOperation("文件上传接口(通用)")
    @PostMapping("/upload")
    public ResultData uploadFile(MultipartFile file) throws Exception {
        List<String> urls = new ArrayList<String>();
        List<String> fileNames = new ArrayList<String>();
        List<String> originalFilenames = new ArrayList<String>();
        String extension = FilenameUtils.getExtension(file.getOriginalFilename());
        String name = UUID.randomUUID().toString().replaceAll("-", "") + "." + extension;
        try {
            assertAllowed(file, MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION);
            SFTPUtil sftp = new SFTPUtil(userName, password, host, port);
            sftp.login();
            InputStream is = file.getInputStream();
            sftp.uploadMore(FtpConstants.FTPFILEPATH_IDCARD, name, is);
            sftp.logout();
//      urls.add(url + "/idcard/" + name);
//      fileNames.add(name);
//      originalFilenames.add(file.getOriginalFilename());
      return ResultData.success(url + "/idcard/" + name);
    } catch (Exception e) {
      return ResultData.error("上传文件失败 "+e.getMessage());
    }
            return ResultData.success(url + "/idcard/" + name);
        } catch (Exception e) {
            return ResultData.error("上传文件失败 " + e.getMessage());
        }
//    AjaxResult ajax = new AjaxResult();
//    ajax.put("urls", StringUtils.join(urls, FILE_DELIMETER));
//    ajax.put("fileNames", StringUtils.join(fileNames, FILE_DELIMETER));
//    ajax.put("originalFilenames", StringUtils.join(originalFilenames, FILE_DELIMETER));
  }
    }
  /**
   * 判断当前时间是否是工作日,格式为“2022-10-16”,不传默认为今天
   */
  @ApiOperation("判断当前时间是否是工作日,格式为“20221016”,不传默认为今天")
  @GetMapping("/isWeekday")
  public ResultData isWeekday(@RequestParam(value = "dateTime",required = false) String dateTime)
  {
      if (dateTime==null){
        Date date = new Date();
        SimpleDateFormat fmt = new SimpleDateFormat("yyyyMMdd");
        dateTime = fmt.format(date);
      }
      if (WorkUtils.isWorkendDay(dateTime))
         return success("休息日或者周末");
      else
         return success("工作日");
  }
    /**
     * 判断当前时间是否是工作日,格式为“2022-10-16”,不传默认为今天
     */
    @ApiOperation("判断当前时间是否是工作日,格式为“20221016”,不传默认为今天")
    @GetMapping("/isWeekday")
    public ResultData isWeekday(@RequestParam(value = "dateTime", required = false) String dateTime) {
        if (dateTime == null) {
            Date date = new Date();
            SimpleDateFormat fmt = new SimpleDateFormat("yyyyMMdd");
            dateTime = fmt.format(date);
        }
        if (WorkUtils.isWorkendDay(dateTime))
            return success("休息日或者周末");
        else
            return success("工作日");
    }
    /**
     * 获取天气默认为攀枝花
     */
    @ApiOperation("获取天气默认为攀枝花")
    @GetMapping("/getWeather")
    public ResultData getWeather(@RequestParam(value = "code", required = false) String code) {
        TestDate td = new TestDate();
        Map weather;
        if (code == null) {
            weather = td.getWeather("510400");
        } else {
            weather = td.getWeather(code);
        }
        return ResultData.success(weather);
    }
}
flower_city/src/main/java/com/dg/core/controller/RoleManagementController.java
@@ -42,7 +42,6 @@
        {
            return getDataTable("分页不能为空");
        }
        if(pageSize==null)
        {
            return getDataTable("分页条数不能为空");
flower_city/src/main/java/com/dg/core/db/gen/entity/AutomessagePolicyDocuments.java
New file
@@ -0,0 +1,95 @@
package com.dg.core.db.gen.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
 * <p>
 * 法律法规政策文件实体类
 * </p>
 *
 * @author fengjin
 * @since 2022-11-10
 */
@TableName("automessage_policy_documents")
@Data
@ApiModel("法律法规政策文件实体类")
public class AutomessagePolicyDocuments implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 主键id
     */
    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 部门id
     */
    @ApiModelProperty("部门id")
    private Integer departmentId;
    /**
     * 名称
     */
    @ApiModelProperty("名称")
    private String name;
    /**
     * 跳转链接类型(1.富文本2.微信文章)
     */
    @ApiModelProperty("名称")
    private String linkType;
    /**
     * 文章链接
     */
    @ApiModelProperty("文章链接")
    private String articleLink;
    /**
     * 文章富文本
     */
    @ApiModelProperty("文章富文本")
    private String richText;
    /**
     * 类型(1.法律法规2.政策文件)
     */
    @ApiModelProperty("类型(1.法律法规2.政策文件)")
    private Integer type;
    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;
    /**
     * 创建人
     */
    @ApiModelProperty("创建人")
    private Integer createUserId;
    /**
     * 修改时间
     */
    @ApiModelProperty("修改时间")
    private LocalDateTime updateTime;
    /**
     * 修改人
     */
    @ApiModelProperty("修改人")
    private Integer  updateUserId;
}
flower_city/src/main/java/com/dg/core/db/gen/mapper/AutomessagePolicyDocumentsMapper.java
New file
@@ -0,0 +1,20 @@
package com.dg.core.db.gen.mapper;
import com.dg.core.db.gen.entity.AutomessagePolicyDocuments;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;
/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author fengjin
 * @since 2022-11-10
 */
public interface AutomessagePolicyDocumentsMapper extends BaseMapper<AutomessagePolicyDocuments> {
   List<AutomessagePolicyDocuments> selectConfigList();
}
flower_city/src/main/java/com/dg/core/db/manual/mapper/util/MapperGenerator.java
@@ -34,7 +34,7 @@
                })
                .strategyConfig(builder -> {
//                    builder.addInclude("");
                    builder.addInclude("automessage_sys_user_record") // 设置需要生成的表名
                    builder.addInclude("automessage_policy_documents") // 设置需要生成的表名
                            .addTablePrefix("t_", "c_"); // 设置过滤表前缀
                })
                .templateConfig(builder -> {
flower_city/src/main/java/com/dg/core/task/SendWsListener.java
@@ -1,21 +1,24 @@
package com.dg.core.task;
import com.dg.core.service.IGuideRepairOrderService;
import com.dg.core.util.TestDate;
import org.springframework.data.redis.core.RedisTemplate;
import javax.annotation.Resource;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;
import java.util.Calendar;
import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;
import java.util.*;
@WebListener
public class SendWsListener implements ServletContextListener {
    @Resource
    private IGuideRepairOrderService iGuideRepairOrderService;
    @Resource
    RedisTemplate<String, Object> redisTemplate;
    @Override
    public void contextDestroyed(ServletContextEvent arg0) {
        System.out.println("定时发送Xml信息监听--已关闭!");
@@ -57,6 +60,9 @@
                iGuideRepairOrderService.pushOvertimeGuideRepairOrder();
                //定时更新未评价的单据评价状态
                iGuideRepairOrderService.updateEvaluate();
                TestDate td = new TestDate();
                Map weather = td.getWeather("510400");
                redisTemplate.opsForValue().set("weather",weather);
                // TODO 写你的逻辑
            }
        }, defaultdate, 1 * 60 * 1000);// 定时每15分钟
flower_city/src/main/java/com/dg/core/util/PermissionUtil.java
@@ -36,8 +36,25 @@
                }
                return ids;
            }
        }
        else if(StringUtils.equals("2", sysUser.getUserType()))
        } else if (StringUtils.equals("4", sysUser.getUserType())) {
            if (StringUtils.isEmpty(sysUser.getDataPermission())) {
                return null;
            }
            else
            {
                List<String> ids = new ArrayList<>();
                if (sysUser.getDataPermission().indexOf(",")>0)
                {
                    String[] idl=sysUser.getDataPermission().split(",");
                    Collections.addAll(ids,idl);
                }
                else
                {
                    ids.add(sysUser.getDataPermission());
                }
                return ids;
            }
        } else if(StringUtils.equals("2", sysUser.getUserType()))
        {
            //导办人员
            List<String> ids=iOrganizationChartService.getIds(sysUser.getDepartmentId());
flower_city/src/main/java/com/dg/core/util/TestDate.java
@@ -87,6 +87,31 @@
    }
    /**
     * 获取节假日不含周末
     *
     * @return
     */
    public    Map getWeather(String code) {
        String url = "https://restapi.amap.com/v3/weather/weatherInfo?key=9e0d819935da8a01de0e476ba8a9019e&city="+code;
        OkHttpClient client = new OkHttpClient();
        Response response;
        //解密数据
        String rsa = null;
        Request request = new Request.Builder()
                .url(url)
                .get()
                .addHeader("Content-Type", "application/x-www-form-urlencoded")
                .build();
        try {
            response = client.newCall(request).execute();
            rsa = response.body().string();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return JSONObject.parseObject(rsa, Map.class);
    }
    /**
     * 获取周末  月从0开始
     *
     * @param year
flower_city/src/main/resources/mapper/AutomessagePolicyDocumentsMapper.xml
New file
@@ -0,0 +1,50 @@
<?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.dg.core.db.gen.mapper.AutomessagePolicyDocumentsMapper">
    <resultMap type="com.dg.core.db.gen.entity.AutomessagePolicyDocuments" id="AutomessagePolicyDocumentsResult">
        <id     property="id"      column="id"      />
        <id     property="departmentId"      column="department_id"      />
        <id     property="name"      column="name"      />
        <id     property="linkType"      column="link_type"      />
        <id     property="articleLink"      column="article_link"      />
        <id     property="richText"      column="rich_text"      />
        <id     property="type"      column="type"      />
        <id     property="createTime"      column="create_time"      />
        <id     property="createUserId"      column="create_user_id"      />
        <id     property="updateTime"      column="update_time"      />
        <id     property="updateUserId"      column="update_user_id"      />
    </resultMap>
    <sql id="selectAutomessagePolicyDocumentsResult">
        SELECT
            id,
            (select organization_name from  automessage_organization_chart where id=a.department_id )departmentName,
            department_id,
            name,
            link_type,
            type,
            article_link,
            rich_text,
            create_time,
            update_time,
            (select user_name from automessage_sys_user where user_id=a.update_user_id)updateUserName,
            update_user_id,
            (select user_name from automessage_sys_user where user_id=a.create_user_id)createUserName,
            create_user_id
        FROM
            automessage_policy_documents a
    </sql>
    <select id="selectConfigList" resultMap="AutomessagePolicyDocumentsResult">
        <include refid="selectAutomessagePolicyDocumentsResult" />
        <where>
            <if test="name!=null and name!=''">
                and name  like concat('%', #{name}, '%')
            </if>
            <if test="type!=null">
                and type = #{type}
            </if>
        </where>
    </select>
</mapper>
flower_city/src/main/resources/mapper/OrganizationChartMapper.xml
@@ -165,7 +165,7 @@
            <if test="updateUserId != null">update_user_id=#{updateUserId},</if>
            <if test="areaList != null and areaList != '' ">area_list=#{areaList},</if>
            <if test="contactNumber != null and contactNumber != '' ">contact_number=#{contactNumber},</if>
            <if test="departmentalApplication != null and departmentalApplication != '' ">departmental_application=#{departmentalApplication},</if>
            <if test="departmentalApplication != null  ">departmental_application=#{departmentalApplication},</if>
            <if test="updateUserId != null and updateUserId != '' ">update_user_id=#{updateUserId},</if>
            <if test="resume != null and resume != '' ">resume=#{resume},</if>
            update_time=sysdate()
flower_city/src/main/resources/mapper/TransactionEventMapper.xml
@@ -377,7 +377,7 @@
        <include refid="selectTransactionEventEntityVo"/>
        <where>
            <if test="associateNames != null and associateNames != ''">
                AND (associate_names like concat('%', #{associateNames}, '%') or #{associateNames} like concat('%', associate_names, '%'))
                AND (associate_names like concat('%', #{associateNames}, '%') )
            </if>
            <if test="classifyId != null and classifyId != ''">
                and (classify_id= #{classifyId} or classify_id in (select id FROM automessage_classify_administration where parent_id =#{classifyId} ))
@@ -388,7 +388,9 @@
    </select>
    <select id="sumTransactionNum"  resultMap="TransactionEventEntityResult">
        select sum(transaction_num)sumTransactionNum,count(*) counttransaction   FROM automessage_transaction_event
        select sum(TransactionNum)sumTransactionNum,  count(*) counttransaction from (
        SELECT (select count(id) from automessage_guide_repair_order where state in (3,4) and  a.id=matter_id) TransactionNum
        from automessage_transaction_event a)k
    </select>
    <select id="queryByClassifyIdList"  resultMap="TransactionEventEntityResult">
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComPropertyRepairApi.java
@@ -39,6 +39,18 @@
    }
    /**
     * 分页查询所有数据
     * @return 所有数据
     */
    @ApiOperation("小程序列表接口-脱敏")
    @PostMapping("/desensitize/queryAll")
    public R selectAllDesensitize(@RequestBody CommonPage commonPage) {
        commonPage.setUserId(this.getUserId());
        return this.propertyService.comPropertyRepairSelectAllDesensitize(commonPage);
    }
    /**
     * 小程序添加报修
     * @param comPropertyRepairVO
     * @return
@@ -46,6 +58,20 @@
    @ApiOperation("小程序添加报修")
    @PostMapping
    public R insert(@RequestBody ComPropertyRepairVO comPropertyRepairVO) {
        comPropertyRepairVO.setCreateTime(DateUtil.date());
        comPropertyRepairVO.setCreateBy(this.getUserId());
        comPropertyRepairVO.setRepairStatus(ComPropertyRepairVO.status.dcl);
        return this.propertyService.comPropertyRepairInsert(comPropertyRepairVO);
    }
    /**
     * 小程序添加报修 脱敏
     * @param comPropertyRepairVO
     * @return
     */
    @ApiOperation("小程序添加报修-脱敏")
    @PostMapping("desensitizeInsert")
    public R desensitizeInsert(@RequestBody ComPropertyRepairVO comPropertyRepairVO) {
        comPropertyRepairVO.setCreateTime(DateUtil.date());
        comPropertyRepairVO.setCreateBy(this.getUserId());
        comPropertyRepairVO.setRepairStatus(ComPropertyRepairVO.status.dcl);
@@ -103,6 +129,21 @@
        return this.propertyService.comPropertyRepairSelectOne(id);
    }
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @ApiOperation("详情接口")
    @GetMapping("desensitize/{id}")
    public R selectOneDesensitize(@PathVariable("id") Long id) {
        return this.propertyService.comPropertyRepairSelectOneDesensitize(id);
    }
    /**
     * 删除数据
     *
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommonApi.java
@@ -1,18 +1,13 @@
package com.panzhihua.applets.api;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import cn.hutool.core.util.StrUtil;
import com.jcraft.jsch.SftpException;
import com.panzhihua.applets.config.MinioUtil;
import com.panzhihua.applets.umf.UmfPayUtil;
import com.panzhihua.common.controller.BaseController;
@@ -27,7 +22,6 @@
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import com.alibaba.fastjson.JSON;
import com.panzhihua.applets.config.WxMaConfiguration;
import com.panzhihua.common.constants.Constants;
@@ -39,7 +33,6 @@
import com.panzhihua.common.service.community.CommunityService;
import com.panzhihua.common.utlis.HttpUtils;
import com.panzhihua.common.utlis.SFTPUtil;
import cn.binarywang.wx.miniapp.api.WxMaSecCheckService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -184,9 +177,7 @@
            File file1=new File(uuid+"_compress.jpg");
            String imageUrl = minioUtil.uploadFile(file1, uuid+"_compress.jpg");
            //上传完压缩图后把原图清理,防止文件服务器资源爆满
            if (StrUtil.isNotBlank(fileName)){
                minioUtil.removeMinio(fileName);
            }
            minioUtil.removeMinio(fileName);
            return R.ok(imageUrl);
        } catch (Exception e) {
            log.error("上传照片失败【{}】", e.getMessage());
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/DiscussApi.java
@@ -118,6 +118,26 @@
        return communityService.pageDiscussApplets(pageComActDiscussDTO);
    }
    @ApiOperation(value = "一起议-分页查询-脱敏", response = ComActDiscussVO.class)
    @PostMapping("pageDiscussDesensitize")
    public R pageDiscussDesensitize(@RequestBody PageComActDiscussDTO pageComActDiscussDTO) {
        if (Objects.isNull(pageComActDiscussDTO.getType())) {
            return R.fail("查询类型不能为空");
        }
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
        if (loginUserInfo != null) {
            pageComActDiscussDTO.setCommunityId(loginUserInfo.getCommunityId());
            pageComActDiscussDTO.setLoginUserId(loginUserInfo.getUserId());
            Integer isMy = pageComActDiscussDTO.getIsMy();
            if (null != isMy && isMy.intValue() == 1) {
                pageComActDiscussDTO.setUserId(loginUserInfo.getUserId());
            }
        }
        return communityService.pageDiscussAppletsDesensitize(pageComActDiscussDTO);
    }
    @ApiOperation(value = "一起议-回复")
    @PostMapping("discusscomment")
    public R addDiscussComment(@RequestBody ComActDiscussCommentDTO comActDiscussCommentDTO) {
@@ -169,6 +189,18 @@
        return communityService.detailDiscussApplets(id, userId);
    }
    @ApiOperation(value = "一起议-详情-脱敏", response = ComActDiscussVO.class)
    @GetMapping("discussDesensitize")
    @ApiImplicitParam(name = "id", value = "一起议主键", required = true)
    public R detailDiscussDesensitize(@RequestParam("id") Long id) {
        Long userId = 0L;
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
        if (loginUserInfo != null) {
            userId = loginUserInfo.getUserId();
        }
        return communityService.detailDiscussAppletsDesensitize(id, userId);
    }
    @ApiOperation(value = "一起议-评论-分页查询", response = ComActDiscussCommentVO.class)
    @PostMapping("pagediscusscomment")
    public R pageDiscussComment(@RequestBody PageComActDiscussCommentDTO pageComActDiscussCommentDTO) {
@@ -185,6 +217,22 @@
        return communityService.pageDiscussCommentApplets(pageComActDiscussCommentDTO);
    }
    @ApiOperation(value = "一起议-评论-分页查询-脱敏", response = ComActDiscussCommentVO.class)
    @PostMapping("pageDiscussCommentDesensitize")
    public R pageDiscussCommentDesensitize(@RequestBody PageComActDiscussCommentDTO pageComActDiscussCommentDTO) {
        Long id = pageComActDiscussCommentDTO.getId();
        if (null == id || 0 == id) {
            return R.fail("一起议主键不能为空");
        }
        Long userId = 0L;
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
        if (loginUserInfo != null) {
            userId = loginUserInfo.getUserId();
        }
        pageComActDiscussCommentDTO.setLoginUserId(userId);
        return communityService.pageDiscussCommentAppletsDesensitize(pageComActDiscussCommentDTO);
    }
    @ApiOperation(value = "一起议-评论-回复")
    @PostMapping("discusscommentback")
    public R addDiscussCommentBack(@RequestBody ComActDiscussCommentDTO comActDiscussCommentDTO) {
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/IndexApi.java
@@ -68,6 +68,18 @@
        return communityService.pageEasyPhotoApplets(comActEasyPhotoVO);
    }
    @ApiOperation(value = "分页展示社区随手拍-脱敏", response = ComActEasyPhotoVO.class)
    @PostMapping("pageEasyPhotoDesensitize")
    public R pageEasyPhotoDesensitize(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO) {
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
        if (loginUserInfo != null) {
            comActEasyPhotoVO.setCommunityId(loginUserInfo.getCommunityId());
            comActEasyPhotoVO.setLogInUserId(loginUserInfo.getUserId());
            comActEasyPhotoVO.setIsDpcMember(loginUserInfo.getIsDpcMember());
        }
        return communityService.pageEasyPhotoAppletsDesensitize(comActEasyPhotoVO);
    }
    @ApiOperation("上传随手拍")
    @PostMapping("easyphoto")
    public R addEasyPhoto(@RequestBody @Validated(AddGroup.class) ComActEasyPhotoVO comActEasyPhotoVO) {
@@ -160,6 +172,17 @@
        }
        return communityService.detailEasyPhoto(id, userId);
    }
    @ApiOperation(value = "随手拍详情-脱敏", response = ComActEasyPhotoVO.class)
    @GetMapping("detailEasyPhotoDesensitize")
    @ApiImplicitParam(name = "id", value = "随手拍主键")
    public R detailEasyPhotoDesensitize(@RequestParam("id") Long id) {
        Long userId = 0L;
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
        if (loginUserInfo != null) {
            userId = loginUserInfo.getUserId();
        }
        return communityService.detailEasyPhotoDesensitize(id, userId);
    }
    @ApiOperation(value = "随手拍--评论--分页查询", response = ComActEasyPhotoCommentVO.class)
    @PostMapping("pagecomacteasyphotocomment")
@@ -171,6 +194,18 @@
        }
        pageComActEasyPhotoCommentDTO.setUserId(userId);
        return communityService.pageComActEasyPhotoComment(pageComActEasyPhotoCommentDTO);
    }
    @ApiOperation(value = "随手拍--评论--分页查询-脱敏", response = ComActEasyPhotoCommentVO.class)
    @PostMapping("pageComActEasyPhotoCommentDesensitize")
    public R pageComActEasyPhotoCommentDesensitize(@RequestBody PageComActEasyPhotoCommentDTO pageComActEasyPhotoCommentDTO) {
        Long userId = 0L;
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
        if (loginUserInfo != null) {
            userId = loginUserInfo.getUserId();
        }
        pageComActEasyPhotoCommentDTO.setUserId(userId);
        return communityService.pageComActEasyPhotoCommentDesensitize(pageComActEasyPhotoCommentDTO);
    }
    @ApiOperation(value = "随手拍--评论--新增评论")
@@ -227,6 +262,19 @@
        return communityService.pageMicroWishApplets(comActMicroWishVO);
    }
    @ApiOperation(value = "分页展示社区微心愿-脱敏", response = ComActMicroWishVO.class)
    @PostMapping("pageMicroWishDesensitize")
    public R pageMicroWishDesensitize(@RequestBody ComActMicroWishVO comActMicroWishVO) {
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
        if (loginUserInfo != null) {
            comActMicroWishVO.setCommunityId(loginUserInfo.getCommunityId());
            comActMicroWishVO.setResponsibleId(loginUserInfo.getUserId());// 责任人暂时放登录用户id
        }
        comActMicroWishVO.setIsApplets(1);
        comActMicroWishVO.setIsPageMyWish(null);
        return communityService.pageMicroWishAppletsDesensitize(comActMicroWishVO);
    }
    @ApiOperation("发布微心愿")
    @PostMapping("microwish")
    public R addMicroWish(@RequestBody @Validated(AddGroup.class) ComActMicroWishVO comActMicroWishVO) {
@@ -265,6 +313,18 @@
            userId = loginUserInfo.getUserId();
        }
        return communityService.detailMicroWish(id, userId);
    }
    @ApiOperation(value = "心愿详情-脱敏", response = ComActMicroWishVO.class)
    @GetMapping("microwishDesensitize")
    @ApiImplicitParam(name = "id", value = "微心愿主键")
    public R detailMicroWishDesensitize(@RequestParam("id") Long id) {
        Long userId = 0L;
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
        if (loginUserInfo != null) {
            userId = loginUserInfo.getUserId();
        }
        return communityService.detailMicroWishDesensitize(id, userId);
    }
    @ApiOperation("点赞/取消点赞微心愿")
@@ -447,6 +507,18 @@
        return communityService.getUserRewards(userId, communityId);
    }
    @ApiOperation(value = "获取普达首页弹窗接口", response = ComActEasyPhotoRewardVO.class)
    @GetMapping("getUserRewardsNew")
    public R getUserRewardsNew(@RequestParam("communityId") Long communityId) {
        Long userId = 0L;
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
        if (loginUserInfo != null) {
            userId = loginUserInfo.getUserId();
            communityId = loginUserInfo.getCommunityId();
        }
        return communityService.getUserRewardsNew(userId, communityId);
    }
    @ApiOperation(value = "读取用户随手拍奖励")
    @PostMapping("readUserReward")
    public R readUserReward() {
springcloud_k8s_panzhihuazhihuishequ/auth/src/main/java/com/panzhihua/auth/handel/UserAuthenticationProvider.java
@@ -109,6 +109,10 @@
                if (r1.getCode()== Constants.SUCCESS){
                    loginUserInfoVO.setType(13);
                }
                R r2 = userService.propertyCheck(loginUserInfoVO.getPhone());
                if (r2.getCode() == Constants.SUCCESS){
                    loginUserInfoVO.setPropertyId((Long)r2.getData());
                }
            }
            return new UsernamePasswordAuthenticationToken(loginUserInfoVO, password, grantedAuthorityList);
        }
@@ -142,7 +146,7 @@
            //是否为专家登陆
            if (nonNull(loginUserInfoVO.getPhone())){
                R r1 = communityService.isExpert(loginUserInfoVO.getPhone());
                if (r1.getCode()== Constants.SUCCESS){
                if (r1.getCode() == Constants.SUCCESS){
                    loginUserInfoVO.setType(13);
                }
            }
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComActProceedingsDTO.java
@@ -70,6 +70,7 @@
    private Date updateBy;
    private String workTime;
    private String logo;
    private static final long serialVersionUID = 1L;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageVolunteerDTO.java
@@ -31,4 +31,7 @@
    @ApiModelProperty(value = "社区id")
    private Long communityId;
    @ApiModelProperty("物业公司Id")
    private Long propertyId;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/partybuilding/ComPbServiceTeamDTO.java
@@ -59,4 +59,9 @@
    @ApiModelProperty(value = "appid", hidden = true)
    private String appid;
    @ApiModelProperty("物业公司id")
    private Long propertyId;
    @ApiModelProperty("1是社区团队 2党员先锋")
    private Integer type;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/partybuilding/PageComPbServiceTeamDTO.java
@@ -38,4 +38,8 @@
    private Long streetId;
    @ApiModelProperty("关键字")
    private String keyword;
    @ApiModelProperty("物业公司id")
    private Long propertyId;
    @ApiModelProperty("1是社区团队 2党员先锋")
    private Integer type;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/property/PagePropertyWorkerDTO.java
@@ -31,4 +31,6 @@
    @ApiModelProperty(value = "分页-每页记录数", example = "10")
    @NotNull
    private Long pageSize;
    @ApiModelProperty("物业id")
    private Long propertyId;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngVolunteerMngVO.java
@@ -128,4 +128,6 @@
    private String universityName;
    private String communityName;
    @ApiModelProperty("物业公司Id")
    private Long propertyId;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/easyPhoto/BannerVO.java
@@ -28,4 +28,6 @@
    private String jumpUrl;
    @ApiModelProperty("跳转类型")
    private String jumpType;
    @ApiModelProperty("banner图片地址")
    private String imageUrl;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -24,6 +24,7 @@
import com.panzhihua.common.model.dtos.neighbor.*;
import com.panzhihua.common.model.dtos.property.PagePropertyWorkerDTO;
import com.panzhihua.common.model.dtos.property.PropertyWorkerDTO;
import com.panzhihua.common.model.dtos.shop.*;
import com.panzhihua.common.model.vos.civil.ComActSocialWorkerVO;
import com.panzhihua.common.model.vos.community.acid.ComActAcidCheckRecordVO;
import com.panzhihua.common.model.vos.community.acid.ComActAcidMemberVO;
@@ -33,6 +34,7 @@
import com.panzhihua.common.model.vos.community.raffle.ComActRaffleRecordVO;
import com.panzhihua.common.model.vos.community.raffle.ComActRaffleVO;
import com.panzhihua.common.model.vos.community.reserve.ComActReserveDangerAreaVO;
import com.panzhihua.common.model.vos.shop.AddShopFlowerGoodsVO;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.scheduling.annotation.Async;
@@ -203,27 +205,6 @@
import com.panzhihua.common.model.dtos.neighbor.DeleteNeighborCircleAppDTO;
import com.panzhihua.common.model.dtos.neighbor.DetailNeighborAllCommentByAdminDTO;
import com.panzhihua.common.model.dtos.neighbor.DetailNeighborCommentReplyByAdminDTO;
import com.panzhihua.common.model.dtos.shop.ComShopAddressDTO;
import com.panzhihua.common.model.dtos.shop.ComShopCartDTO;
import com.panzhihua.common.model.dtos.shop.ComShopEditNubCartDTO;
import com.panzhihua.common.model.dtos.shop.ComShopFundsExportDTO;
import com.panzhihua.common.model.dtos.shop.ComShopGoodsDTO;
import com.panzhihua.common.model.dtos.shop.ComShopOrderCreateDTO;
import com.panzhihua.common.model.dtos.shop.ComShopOrderDeliverDTO;
import com.panzhihua.common.model.dtos.shop.ComShopOrderExportDTO;
import com.panzhihua.common.model.dtos.shop.ComShopOrderPreviewDTO;
import com.panzhihua.common.model.dtos.shop.ComShopOrderQueryDTO;
import com.panzhihua.common.model.dtos.shop.ComShopOrderShipDTO;
import com.panzhihua.common.model.dtos.shop.ComShopSysConfDTO;
import com.panzhihua.common.model.dtos.shop.OrderPayDTO;
import com.panzhihua.common.model.dtos.shop.PageComOrderListDTO;
import com.panzhihua.common.model.dtos.shop.PageComShopAddressDTO;
import com.panzhihua.common.model.dtos.shop.PageComShopFundsSearchDTO;
import com.panzhihua.common.model.dtos.shop.PageComShopGoodsDTO;
import com.panzhihua.common.model.dtos.shop.PageComShopOrderSearchDTO;
import com.panzhihua.common.model.dtos.shop.PageComShopStoreDTO;
import com.panzhihua.common.model.dtos.shop.PageComShopSysConfDTO;
import com.panzhihua.common.model.dtos.shop.WxPayNotifyOrderDTO;
import com.panzhihua.common.model.dtos.user.PageInputUserDTO;
import com.panzhihua.common.model.dtos.vaccines.VaccinesByAdminDTO;
import com.panzhihua.common.model.dtos.vaccines.VaccinesEnrollByAdminDTO;
@@ -608,6 +589,19 @@
    R detailEasyPhoto(@RequestParam("id") Long id, @RequestParam("userId") Long userId);
    /**
     * 随手拍详情
     *
     * @param id
     *            随手拍主键
     * @param userId
     *            登录用户id
     * @return 详情内容
     */
    @PostMapping("detaileasyphotodesensitize")
    R detailEasyPhotoDesensitize(@RequestParam("id") Long id, @RequestParam("userId") Long userId);
    /**
     * 随手拍删除
     *
     * @param id
@@ -638,6 +632,15 @@
     */
    @PostMapping("pagemicrowish/applets")
    R pageMicroWishApplets(@RequestBody ComActMicroWishVO comActMicroWishVO);
    /**
     * 小程序分页查询微心愿
     *
     * @param comActMicroWishVO
     *            查询参数
     * @return 分页集合
     */
    @PostMapping("pagemicrowish/appletsDesensitize")
    R pageMicroWishAppletsDesensitize(@RequestBody ComActMicroWishVO comActMicroWishVO);
    /**
     * 心愿详情
@@ -650,6 +653,17 @@
     */
    @PostMapping("detailmicrowish")
    R detailMicroWish(@RequestParam("id") Long id, @RequestParam("userId") Long userId);
    /**
     * 心愿详情
     *
     * @param id
     *            查询主键
     * @param userId
     *            登录用户id
     * @return 心愿内容
     */
    @PostMapping("detailmicrowishdesensitize")
    R detailMicroWishDesensitize(@RequestParam("id") Long id, @RequestParam("userId") Long userId);
    /**
     * 审核、分配、反馈心愿
@@ -1332,6 +1346,17 @@
    R pageEasyPhotoApplets(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO);
    /**
     * 小程序分页查询随手拍
     *
     * @param comActEasyPhotoVO
     *            查询参数
     * @return 返回结果
     */
    @PostMapping("pageeasyphotoappletsdesensitize")
    R pageEasyPhotoAppletsDesensitize(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO);
    /**
     * 随手拍评论分页查询
     *
     * @param pageComActEasyPhotoCommentDTO
@@ -1340,6 +1365,16 @@
     */
    @PostMapping("pagecomacteasyphotocomment")
    R pageComActEasyPhotoComment(@RequestBody PageComActEasyPhotoCommentDTO pageComActEasyPhotoCommentDTO);
    /**
     * 随手拍评论分页查询 - 脱敏
     *
     * @param pageComActEasyPhotoCommentDTO
     *            查询参数
     * @return 查询结果
     */
    @PostMapping("pagecomacteasyphotocommentdesensitize")
    R pageComActEasyPhotoCommentDesensitize(@RequestBody PageComActEasyPhotoCommentDTO pageComActEasyPhotoCommentDTO);
    /**
     * 评论点赞/取消点赞
@@ -1506,6 +1541,15 @@
     */
    @PostMapping("pagediscussapplets")
    R pageDiscussApplets(@RequestBody PageComActDiscussDTO pageComActDiscussDTO);
    /**
     * 议事投票-分页查询 小程序 -脱敏
     *
     * @param pageComActDiscussDTO
     *            查询参数
     * @return ComActDiscussVO 分页
     */
    @PostMapping("pagediscussappletsdesensitize")
    R pageDiscussAppletsDesensitize(@RequestBody PageComActDiscussDTO pageComActDiscussDTO);
    /**
     * 议事投票-点赞、取消点赞
@@ -1528,6 +1572,16 @@
    R pageDiscussCommentApplets(@RequestBody PageComActDiscussCommentDTO pageComActDiscussCommentDTO);
    /**
     * 议事投票-评论-分页查询 小程序 脱敏
     *
     * @param pageComActDiscussCommentDTO
     *            分页参数
     * @return ComActDiscussCommentVO
     */
    @PostMapping("pagediscusscommentappletsdesensitize")
    R pageDiscussCommentAppletsDesensitize(@RequestBody PageComActDiscussCommentDTO pageComActDiscussCommentDTO);
    /**
     * 议事投票-详情 小程序
     *
     * @param id
@@ -1538,6 +1592,17 @@
     */
    @PostMapping("detaildiscussapplets")
    R detailDiscussApplets(@RequestParam("id") Long id, @RequestParam("userId") Long userId);
    /**
     * 议事投票-详情 小程序
     *
     * @param id
     *            主键
     * @param userId
     *            登录用户主键
     * @return ComActDiscussVO
     */
    @PostMapping("detaildiscussappletsdesensitize")
    R detailDiscussAppletsDesensitize(@RequestParam("id") Long id, @RequestParam("userId") Long userId);
    /**
     * 议事投票-投票
@@ -2866,6 +2931,63 @@
     */
    @GetMapping("/shop/changeShopGoodsStatus")
    R changeStatus(@RequestParam("id") Long id, @RequestParam("status") Integer status);
    /**
     * 商品列表-分页查询
     *
     * @param pageComShopGoodsDTO
     *            添加数据
     */
    @PostMapping("/shopFlower/pageGoods")
    R pageFlowerGoodsList(@RequestBody PageComShopFlowerGoodsDTO pageComShopGoodsDTO);
    /**
     * 商品列表-分页查询
     *
     * @param comShopFlowerGoodsDTO
     *            添加数据
     */
    @PostMapping("/shopFlower/pageShopFlowerGoodsByApp")
    R pageShopFlowerGoodsByApp(@RequestBody  ComShopFlowerGoodsDTO comShopFlowerGoodsDTO);
    /**
     * 新增商品
     *
     * @param addShopGoodsVO
     * @return
     */
    @PostMapping("/shopFlower/saveShopGoods")
    R saveFlowerShopGoods(@RequestBody AddShopFlowerGoodsVO addShopGoodsVO);
    /**
     * 编辑商品
     *
     * @param id
     * @param addShopGoodsVO
     * @return
     */
    @PostMapping("/shopFlower/editShopGoods/{id}")
    R editFlowerShopGoods(@PathVariable("id") Long id, @RequestBody AddShopFlowerGoodsVO addShopGoodsVO);
    /**
     * 删除商品
     *
     * @param id
     * @return
     */
    @PostMapping("/shopFlower/deleteShopGoods")
    R deleteFlowerShopGoods(@RequestBody Long[] id);
    /**
     * 修改商品状态
     *
     * @param id
     * @return
     */
    @GetMapping("/shopFlower/changeShopGoodsStatus")
    R changeFlowerStatus(@RequestParam("id") Long id, @RequestParam("status") Integer status);
    /**
     * 结果
@@ -10572,4 +10694,11 @@
     * */
    @GetMapping("comProperty/noticeList")
    R noticeList(@RequestParam("page")Integer page,@RequestParam("size")Integer size,@RequestParam("propertyId")Long propertyId);
    /**
     * 获取社区动态置顶banner
     * @param communityId  社区id
     * */
    @PostMapping("/easyphoto/getUserRewardsNew")
    R getUserRewardsNew(@RequestParam("userId") Long userId, @RequestParam("communityId") Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/property/PropertyService.java
@@ -21,6 +21,13 @@
    R comPropertyRepairSelectAll(@RequestBody CommonPage commonPage);
    /**
     * 分页查询所有数据 脱敏
     * @return 所有数据
     */
    @PostMapping("/comPropertyRepair/queryAllDesensitize")
    R comPropertyRepairSelectAllDesensitize(@RequestBody CommonPage commonPage);
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
@@ -30,6 +37,15 @@
    R comPropertyRepairSelectOne(@PathVariable("id") Long id);
    /**
     * 通过主键查询单条数据 脱敏
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("/comPropertyRepair/desensitize/{id}")
    R comPropertyRepairSelectOneDesensitize(@PathVariable("id") Long id);
    /**
     * 新增数据
     *
     * @param comPropertyRepair 实体对象
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java
@@ -1333,4 +1333,7 @@
    @GetMapping("/getAllCommunityList")
    R getAllCommunityList();
    @GetMapping("/propertyCheck")
    R propertyCheck(@RequestParam("phone") String phone);
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPropertyWorkerApi.java
@@ -27,6 +27,8 @@
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import static java.util.Objects.nonNull;
/**
 * 物业公司工作人员(ComPropertyWorker)表控制层
 *
@@ -67,6 +69,9 @@
    @ApiOperation(value = "分页查询物业工作人员", response = ComPropertyWorkerVO.class)
    @PostMapping("/page")
    public R pagePropertyWorker(@RequestBody @Valid PagePropertyWorkerDTO pagePropertyWorkerDTO) {
        if(nonNull(getLoginUserInfo().getPropertyId())){
            pagePropertyWorkerDTO.setRefId(getLoginUserInfo().getPropertyId());
        }
        return communityService.pagePropertyWorker(pagePropertyWorkerDTO);
    }
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityPartyBuildingApi.java
@@ -616,6 +616,10 @@
    public R addServiceTeam(@RequestBody @Validated(AddGroup.class) ComPbServiceTeamDTO comPbServiceTeamDTO) {
        comPbServiceTeamDTO.setCommunityId(this.getCommunityId());
        comPbServiceTeamDTO.setAppid(this.getAppId());
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
        if (nonNull(loginUserInfo.getPropertyId())){
            comPbServiceTeamDTO.setPropertyId(loginUserInfo.getPropertyId());
        }
        return partyBuildingService.addServiceTeam(comPbServiceTeamDTO);
    }
@@ -650,6 +654,11 @@
        } else {
            pageComPbServiceTeamDTO.setCommunityId(this.getCommunityId());
        }
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
        if (nonNull(loginUserInfo.getPropertyId())){
            pageComPbServiceTeamDTO.setPropertyId(loginUserInfo.getPropertyId());
        }
        log.info("==============物业公司id"+loginUserInfo.getPropertyId());
        return partyBuildingService.pageServiceTeam(pageComPbServiceTeamDTO);
    }
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ShopFlowerApi.java
New file
@@ -0,0 +1,283 @@
package com.panzhihua.community_backstage.api;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.community.convenient.ConvenientMerchantDTO;
import com.panzhihua.common.model.dtos.shop.PageComShopFlowerGoodsDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.shop.AddShopFlowerGoodsVO;
import com.panzhihua.common.model.vos.shop.PageShopGoodsVO;
import com.panzhihua.common.service.community.CommunityService;
import com.panzhihua.common.service.user.UserService;
import com.panzhihua.common.validated.AddGroup;
import com.panzhihua.common.validated.PutGroup;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
 * @auther yh
 * @describe 商城管理
 */
@Slf4j
@Api(tags = {"商城管理模块"})
@RestController("/shopFlower")
public class ShopFlowerApi extends BaseController {
    @Value("${excel.userurl}")
    private String excelUrl;
    // FTP 登录用户名
    @Value("${ftp.username}")
    private String userName;
    // FTP 登录密码
    @Value("${ftp.password}")
    private String password;
    // FTP 服务器地址IP地址
    @Value("${ftp.host}")
    private String host;
    // FTP 端口
    @Value("${ftp.port}")
    private int port;
    @Resource
    private CommunityService communityService;
    @Resource
    private UserService userService;
    @ApiOperation(value = "编辑便民服务商家")
    @PutMapping("/merchant/put")
    public R putMerchant(@RequestBody @Validated(PutGroup.class) ConvenientMerchantDTO convenientMerchantDTO) {
        convenientMerchantDTO.setUpdatedBy(this.getUserId());
        convenientMerchantDTO.setCreatedBy(this.getUserId());
        return communityService.putMerchant(convenientMerchantDTO);
    }
    @ApiOperation(value = "分页查询商品", response = PageShopGoodsVO.class)
    @PostMapping("/goods/page")
    public R pageGoodsList(@RequestBody PageComShopFlowerGoodsDTO pageComShopGoodsDTO) {
        return communityService.pageFlowerGoodsList(pageComShopGoodsDTO);
    }
    @ApiOperation(value = "新增商品")
    @PostMapping("/goods/save")
    public R saveShopGoods(@RequestBody @Validated(AddGroup.class) AddShopFlowerGoodsVO addShopGoodsVO) {
        return communityService.saveFlowerShopGoods(addShopGoodsVO);
    }
    @ApiOperation(value = "编辑商品")
    @PostMapping("/goods/edit/{id}")
    public R editShopGoods(@PathVariable("id") Long id,
                           @RequestBody @Validated(AddGroup.class) AddShopFlowerGoodsVO addShopGoodsVO) {
        return communityService.editFlowerShopGoods(id, addShopGoodsVO);
    }
    @ApiOperation(value = "删除商品")
    @PostMapping("/goods/delete")
    public R deleteShopGoods(@RequestBody Long[] id) {
        return communityService.deleteFlowerShopGoods(id);
    }
    @ApiOperation(value = "商品上下架")
    @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "商品Id"),
            @ApiImplicitParam(name = "status", value = "1.上架  2.下架 ")})
    @GetMapping("/goods/changeStatus")
    public R changeStatus(@RequestParam("id") Long id, @RequestParam("status") Integer status) {
        return communityService.changeFlowerStatus(id, status);
    }
    /*@ApiOperation(value = "订单_分页列表", response = ComShopOrderSearchVO.class)
    @PostMapping("/order/page")
    public R page(@RequestBody @Validated PageComShopOrderSearchDTO pageComShopOrderSearchDTO) {
        // pageComShopOrderSearchDTO.setUserId(this.getUserId());
        ClazzUtils.setIfStringIsEmpty(pageComShopOrderSearchDTO);
        return communityService.pageShopOrder(pageComShopOrderSearchDTO);
    }
    @ApiOperation(value = "订单_详细", response = ComShopOrderPageVO.class)
    @GetMapping("/order/detail")
    @ShopOperLog(operType = 11)
    public R detail(@RequestParam("orderId") Long orderId) {
        return communityService.orderDetail(orderId);
    }
    @ApiOperation(value = "订单_导出表格")
    @PostMapping("/order/export")
    @ShopOperLog(operType = 12)
    public R export(@RequestBody ComShopOrderExportDTO comShopOrderExportDTO) {
        ClazzUtils.setIfStringIsEmpty(comShopOrderExportDTO);
        String url = excelUrl;
        String uuid = UUID.randomUUID().toString().replace("-", "");
        // String name=uuid+".xlsx";
        String ftpUrl = "/mnt/data/web/excel/";
        R r = communityService.shopOrderExportData(comShopOrderExportDTO);
        if (R.isOk(r)) {
            List<ExcelShopOrderDTO> excelShopOrderDTO =
                JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ExcelShopOrderDTO.class);
            if (excelShopOrderDTO == null || excelShopOrderDTO.size() == 0) {
                return R.ok("未找到数据");
            }
            try {
                SFTPUtil sftp = new SFTPUtil(userName, password, host, port);
                sftp.login();
                String name = "商城订单-" + new SimpleDateFormat("yyyyMMddhhmmss").format(new Date()) + ".xlsx";
                boolean existDir = sftp.isExistDir(ftpUrl + name);
                if (!existDir) {
                    String property = System.getProperty("user.dir");
                    String fileName = property + File.separator + name;
                    // 这里 需要指定写用哪个class去写
                    ExcelWriter excelWriter = null;
                    InputStream inputStream = null;
                    try {
                        excelWriter = EasyExcel.write(fileName, ExcelShopOrderDTO.class)
                            .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy())
                            .registerWriteHandler(new CustomSheetWriteHandler()).build();
                        WriteSheet writeSheet = EasyExcel.writerSheet("订单").build();
                        excelWriter.write(excelShopOrderDTO, writeSheet);
                        excelWriter.finish();
                        File file = new File(fileName);
                        inputStream = new FileInputStream(file);
                        sftp.uploadMore(ftpUrl, name, inputStream);
                        sftp.logout();
                        inputStream.close();
                        String absolutePath = file.getAbsolutePath();
                        boolean delete = file.delete();
                        log.info("删除excel【{}】结果【{}】", absolutePath, delete);
                    } finally {
                        // 千万别忘记finish 会帮忙关闭流
                        if (inputStream != null) {
                            inputStream.close();
                        }
                        if (excelWriter != null) {
                            excelWriter.finish();
                        }
                    }
                }
                return R.ok(url + URLEncoder.encode(name, "UTF-8"));
            } catch (Exception e) {
                e.printStackTrace();
                log.error("文件传输失败【{}】", e.getMessage());
                return R.fail();
            }
        }
        return R.fail("导出数据失败");
    }
    @ApiOperation(value = "资金_统计信息")
    @GetMapping("/capital/stat")
    public R stat() {
        Long userId = 0L;
        return communityService.getFundsStat(userId);
    }
    @ApiOperation(value = "资金_分页列表")
    @PostMapping("/capital/page")
    public R page(@RequestBody PageComShopFundsSearchDTO pageComShopFundsSearchDTO) {
        pageComShopFundsSearchDTO.setUserId(getUserId());
        ClazzUtils.setIfStringIsEmpty(pageComShopFundsSearchDTO);
        return communityService.pageShopFunds(pageComShopFundsSearchDTO);
    }
    @ApiOperation(value = "资金_详情", response = CapitalDetailVO.class)
    @ApiImplicitParam(name = "orderId", value = "订单Id")
    @GetMapping("/capital/capitalDetailByStore")
    R capitalDetailByStore(@RequestParam("orderId") Long orderId) {
        return communityService.capitalDetailByStore(orderId);
    }
    @ApiOperation(value = "资金_导出表格")
    @PostMapping("/capital/export")
    @ShopOperLog(operType = 12)
    public R export(@RequestBody ComShopFundsExportDTO comShopFundsExportDTO) {
        ClazzUtils.setIfStringIsEmpty(comShopFundsExportDTO);
        String url = excelUrl;
        String uuid = UUID.randomUUID().toString().replace("-", "");
        // String name=uuid+".xlsx";
        String ftpUrl = "/mnt/data/web/excel/";
        Long userId = this.getUserId();
        comShopFundsExportDTO.setUserId(userId);
        R r = communityService.shopOrderFundsExportData(comShopFundsExportDTO);
        if (R.isOk(r)) {
            List<ExcelShopFundsDTO> excelShopFundsDTO =
                JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ExcelShopFundsDTO.class);
            if (excelShopFundsDTO == null || excelShopFundsDTO.size() == 0) {
                return R.ok("未找到数据");
            }
            try {
                SFTPUtil sftp = new SFTPUtil(userName, password, host, port);
                sftp.login();
                String name = "商家资金流水-" + new SimpleDateFormat("yyyyMMddhhmmss").format(new Date()) + ".xlsx";
                boolean existDir = sftp.isExistDir(ftpUrl + name);
                if (!existDir) {
                    String property = System.getProperty("user.dir");
                    String fileName = property + File.separator + name;
                    // 这里 需要指定写用哪个class去写
                    ExcelWriter excelWriter = null;
                    InputStream inputStream = null;
                    try {
                        excelWriter = EasyExcel.write(fileName, ExcelShopFundsDTO.class)
                            .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy())
                            .registerWriteHandler(new CustomSheetWriteHandler()).build();
                        WriteSheet writeSheet = EasyExcel.writerSheet("订单").build();
                        excelWriter.write(excelShopFundsDTO, writeSheet);
                        excelWriter.finish();
                        File file = new File(fileName);
                        inputStream = new FileInputStream(file);
                        sftp.uploadMore(ftpUrl, name, inputStream);
                        sftp.logout();
                        inputStream.close();
                        String absolutePath = file.getAbsolutePath();
                        boolean delete = file.delete();
                        log.info("删除excel【{}】结果【{}】", absolutePath, delete);
                    } finally {
                        // 千万别忘记finish 会帮忙关闭流
                        if (inputStream != null) {
                            inputStream.close();
                        }
                        if (excelWriter != null) {
                            excelWriter.finish();
                        }
                    }
                }
                return R.ok(url + URLEncoder.encode(name, "UTF-8"));
            } catch (Exception e) {
                e.printStackTrace();
                log.error("文件传输失败【{}】", e.getMessage());
                return R.fail();
            }
        }
        return R.fail("导出数据失败");
    }
    @ApiOperation(value = "商家配置修改")
    @PutMapping("/shop/conf")
    public R editConf(@RequestBody ComShopSysConfDTO comShopSysConfDTO) {
        return communityService.editShopSysConf(comShopSysConfDTO);
    }
    @ApiOperation(value = "商家配置查询", response = ComShopHiddenConfVO.class)
    @GetMapping("/shop/conf")
    public R getConf() {
        PageComShopSysConfDTO pageComShopSysConfDTO = new PageComShopSysConfDTO();
        R r = communityService.pageShopSysConf(pageComShopSysConfDTO);
        if (R.isOk(r) && r.getData() != null) {
            ComShopSysConfVO comShopSysConfVO =
                JSONObject.parseObject(JSONObject.toJSONString(r.getData()), ComShopSysConfVO.class);
            if (comShopSysConfVO != null) {
                ComShopHiddenConfVO comShopHiddenConfVO = new ComShopHiddenConfVO();
                comShopHiddenConfVO.setId(comShopSysConfVO.getId());
                comShopHiddenConfVO.setHidden(comShopSysConfVO.getVal());
                return R.ok(comShopHiddenConfVO);
            }
        }
        return r;
    }*/
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java
@@ -807,6 +807,20 @@
    }
    /**
     * 随手拍详情-脱敏
     *
     * @param id
     *            随手拍主键
     * @param userId
     *            登录用户
     * @return 详情内容
     */
    @PostMapping("detaileasyphotodesensitize")
    public R detailEasyPhotoDesensitize(@RequestParam("id") Long id, @RequestParam("userId") Long userId) {
        return comActEasyPhotoService.detailEasyPhotoDesensitize(id, userId);
    }
    /**
     * 随手拍详情
     *
     * @param id
@@ -860,6 +874,11 @@
        return comActMicroWishService.pageMicroWishApplets(comActMicroWishVO);
    }
    @PostMapping("pagemicrowish/appletsDesensitize")
    public R pageMicroWishAppletsDesensitize(@RequestBody ComActMicroWishVO comActMicroWishVO) {
        return comActMicroWishService.pageMicroWishAppletsDesensitize(comActMicroWishVO);
    }
    /**
     * 心愿详情
     *
@@ -872,6 +891,19 @@
    @PostMapping("detailmicrowish")
    public R detailMicroWish(@RequestParam("id") Long id, @RequestParam("userId") Long userId) {
        return comActMicroWishService.detailMicroWish(id, userId);
    }
    /**
     * 心愿详情 - 脱敏
     *
     * @param id
     *            查询主键
     * @param userId
     *            登录用户id
     * @return 心愿内容
     */
    @PostMapping("detailmicrowishdesensitize")
    public R detailMicroWishDesensitize(@RequestParam("id") Long id, @RequestParam("userId") Long userId) {
        return comActMicroWishService.detailMicroWishDesensitize(id, userId);
    }
    /**
@@ -1689,6 +1721,19 @@
        return comActEasyPhotoService.pageEasyPhotoApplets(comActEasyPhotoVO);
    }
    /**
     * 小程序分页查询随手拍 脱敏
     *
     * @param comActEasyPhotoVO
     *            查询参数
     * @return 返回结果
     */
    @PostMapping("pageeasyphotoappletsdesensitize")
    public R pageEasyPhotoAppletsDesensitize(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO) {
        return comActEasyPhotoService.pageEasyPhotoAppletsDesensitize(comActEasyPhotoVO);
    }
    /**
     * 随手拍评论分页查询
     * 
@@ -1699,6 +1744,18 @@
    @PostMapping("pagecomacteasyphotocomment")
    public R pageComActEasyPhotoComment(@RequestBody PageComActEasyPhotoCommentDTO pageComActEasyPhotoCommentDTO) {
        return comActEasyPhotoService.pageComActEasyPhotoComment(pageComActEasyPhotoCommentDTO);
    }
    /**
     * 随手拍评论分页查询 - 脱敏
     *
     * @param pageComActEasyPhotoCommentDTO
     *            查询参数
     * @return 查询结果
     */
    @PostMapping("pagecomacteasyphotocommentdesensitize")
    public R pageComActEasyPhotoCommentDesensitize(@RequestBody PageComActEasyPhotoCommentDTO pageComActEasyPhotoCommentDTO) {
        return comActEasyPhotoService.pageComActEasyPhotoCommentDesensitize(pageComActEasyPhotoCommentDTO);
    }
    /**
@@ -2388,6 +2445,10 @@
        return comActEasyPhotoService.getUserReward(userId, communityId);
    }
    @PostMapping("easyphoto/getUserRewardsNew")
    public R getUserRewardsNew(@RequestParam("userId") Long userId, @RequestParam("communityId") Long communityId) {
        return comActEasyPhotoService.getUserRewardNew(userId, communityId);
    }
    /**
     * 读取用户随手拍奖励
     * 
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/DiscussApi.java
@@ -60,6 +60,18 @@
    }
    /**
     * 议事投票-详情 脱敏
     *
     * @param discussDetailDTO
     *            请求参数
     * @return ComActDiscussVO
     */
    @PostMapping("detaildiscussdesensitize")
    public R detailDiscussDesensitize(@RequestBody ComActDiscussDetailDTO discussDetailDTO) {
        return comActDiscussService.detailDiscussDesensitize(discussDetailDTO);
    }
    /**
     * 分页查询评论下回复列表
     * @param discussDetailDTO  请求参数
     * @return  回复列表
@@ -209,7 +221,7 @@
    /**
     * 议事投票-分页查询 小程序
     *
     *
     * @param pageComActDiscussDTO
     *            查询参数
     * @return ComActDiscussVO 分页
@@ -217,6 +229,18 @@
    @PostMapping("pagediscussapplets")
    public R pageDiscussApplets(@RequestBody PageComActDiscussDTO pageComActDiscussDTO) {
        return comActDiscussService.pageDiscussApplets(pageComActDiscussDTO);
    }
    /**
     * 议事投票-分页查询 小程序 脱敏
     *
     * @param pageComActDiscussDTO
     *            查询参数
     * @return ComActDiscussVO 分页
     */
    @PostMapping("pagediscussappletsdesensitize")
    public R pageDiscussAppletsDesensitize(@RequestBody PageComActDiscussDTO pageComActDiscussDTO) {
        return comActDiscussService.pageDiscussAppletsDesensitize(pageComActDiscussDTO);
    }
    /**
@@ -242,6 +266,17 @@
    public R pageDiscussCommentApplets(@RequestBody PageComActDiscussCommentDTO pageComActDiscussCommentDTO) {
        return comActDiscussService.pageDiscussCommentApplets(pageComActDiscussCommentDTO);
    }
    /**
     * 议事投票-评论-分页查询 小程序
     *
     * @param pageComActDiscussCommentDTO
     *            分页参数
     * @return ComActDiscussCommentVO
     */
    @PostMapping("pagediscusscommentappletsdesensitize")
    public R pageDiscussCommentAppletsDesensitize(@RequestBody PageComActDiscussCommentDTO pageComActDiscussCommentDTO) {
        return comActDiscussService.pageDiscussCommentAppletsDesensitize(pageComActDiscussCommentDTO);
    }
    /**
     * 议事投票-详情 小程序
@@ -258,6 +293,20 @@
    }
    /**
     * 议事投票-详情 小程序 脱敏
     *
     * @param id
     *            主键
     * @param userId
     *            用户主键
     * @return ComActDiscussVO
     */
    @PostMapping("detaildiscussappletsdesensitize")
    public R detailDiscussAppletsDesensitize(@RequestParam("id") Long id, @RequestParam("userId") Long userId) {
        return comActDiscussService.detailDiscussAppletsDesensitize(id, userId);
    }
    /**
     * 议事投票-投票
     * 
     * @param discussVoteOptionDTO
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ShopFlowerApi.java
@@ -1,53 +1,17 @@
package com.panzhihua.service_community.api;
import java.util.List;
import com.panzhihua.common.model.dtos.shop.ComShopFlowerGoodsDTO;
import com.panzhihua.common.model.dtos.shop.PageComShopFlowerGoodsDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.shop.AddShopFlowerGoodsVO;
import com.panzhihua.common.service.user.UserService;
import com.panzhihua.service_community.service.ComShopFlowerGoodsService;
import com.panzhihua.service_community.service.ConvenientMerchantService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO;
import com.panzhihua.service_community.service.*;
import org.springframework.beans.BeanUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.panzhihua.common.model.dtos.PageDTO;
import com.panzhihua.common.model.dtos.shop.ComShopAddressDTO;
import com.panzhihua.common.model.dtos.shop.ComShopCartDTO;
import com.panzhihua.common.model.dtos.shop.ComShopEditNubCartDTO;
import com.panzhihua.common.model.dtos.shop.ComShopFundsExportDTO;
import com.panzhihua.common.model.dtos.shop.ComShopGoodsDTO;
import com.panzhihua.common.model.dtos.shop.ComShopOrderCreateDTO;
import com.panzhihua.common.model.dtos.shop.ComShopOrderDeliverDTO;
import com.panzhihua.common.model.dtos.shop.ComShopOrderExportDTO;
import com.panzhihua.common.model.dtos.shop.ComShopOrderPreviewDTO;
import com.panzhihua.common.model.dtos.shop.ComShopOrderQueryDTO;
import com.panzhihua.common.model.dtos.shop.ComShopOrderShipDTO;
import com.panzhihua.common.model.dtos.shop.ComShopSysConfDTO;
import com.panzhihua.common.model.dtos.shop.OrderPayDTO;
import com.panzhihua.common.model.dtos.shop.PageComOrderListDTO;
import com.panzhihua.common.model.dtos.shop.PageComShopAddressDTO;
import com.panzhihua.common.model.dtos.shop.PageComShopFundsSearchDTO;
import com.panzhihua.common.model.dtos.shop.PageComShopGoodsDTO;
import com.panzhihua.common.model.dtos.shop.PageComShopOrderSearchDTO;
import com.panzhihua.common.model.dtos.shop.PageComShopStoreDTO;
import com.panzhihua.common.model.dtos.shop.PageComShopSysConfDTO;
import com.panzhihua.common.model.dtos.shop.WxPayNotifyOrderDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.shop.AddShopGoodsVO;
import com.panzhihua.common.model.vos.shop.ComShopSysConfVO;
import com.panzhihua.common.model.vos.shop.ShopOperLogVO;
import com.panzhihua.common.model.vos.shop.ShopStoreVO;
import com.panzhihua.common.service.user.UserService;
import com.panzhihua.service_community.model.dos.ComShopSysConfDO;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@RestController
@@ -70,8 +34,77 @@
    @Resource
    private UserService userService;
    /**
     * 商品列表-分页查询
     *
     * @param pageComShopGoodsDTO 查询参数
     * @return PageShopStoreVO
     */
    @PostMapping("pageGoods")
    public R pageFlowerGoodsList(@RequestBody PageComShopFlowerGoodsDTO pageComShopGoodsDTO) {
        return comShopFlowerGoodsService.pageFlowerGoodsList(pageComShopGoodsDTO);
    }
    /**
     * 商品列表-APP分页查询
     *
     * @param comShopFlowerGoodsDTO 查询参数
     * @return PageShopStoreVO
     */
    @PostMapping("pageShopFlowerGoodsByApp")
    public R pageShopFlowerGoodsByApp(@RequestBody ComShopFlowerGoodsDTO comShopFlowerGoodsDTO) {
        return comShopFlowerGoodsService.pageShopFlowerGoodsByApp(comShopFlowerGoodsDTO);
    }
    /**
     * 新增商品
     *
     * @param addShopGoodsVO
     * @return
     */
    @PostMapping("saveShopGoods")
    public R saveFlowerShopGoods(@RequestBody AddShopFlowerGoodsVO addShopGoodsVO) {
        return comShopFlowerGoodsService.saveShopFlowerGoods(addShopGoodsVO);
    }
    /**
     * 编辑商品
     *
     * @param addShopGoodsVO
     * @param id             商铺Id
     * @return
     */
    @Transactional(rollbackFor = Exception.class)
    @PostMapping("editShopGoods/{id}")
    public R editFlowerShopGoods(@PathVariable("id") Long id, @RequestBody AddShopFlowerGoodsVO addShopGoodsVO) {
        return comShopFlowerGoodsService.editFlowerShopGoods(id, addShopGoodsVO);
    }
    /**
     * 删除商品
     *
     * @param id
     * @return
     */
    @PostMapping("deleteShopGoods")
    public R deleteFlowerShopGoods(@RequestBody Long[] id) {
        return comShopFlowerGoodsService.deleteShopFlowerGoods(id);
    }
    /**
     * 修改商品状态
     *
     * @param id
     * @return
     */
    @GetMapping("changeShopGoodsStatus")
    public R changeFlowerStatus(@RequestParam("id") Long id, @RequestParam("status") Integer status) {
        return comShopFlowerGoodsService.changeStatus(id, status);
    }
    /*
    *//**
     *//**
     * 分页查询 商家订单
     *
     * @param pageComShopOrderSearchDTO
@@ -130,54 +163,6 @@
    @PostMapping("shopCartList")
    public R shopCartList(@RequestParam("userId") Long userId) {
        return comShopCartService.shopCartList(userId);
    }
    *//**
     * 查询用户购物车数量
     *
     * @param userId
     *            用户id
     * @return 用户购物车商品数量
     *//*
    @PostMapping("shopCartUserTotal")
    public R shopCartUserTotal(@RequestParam("userId") Long userId) {
        return comShopCartService.shopCartUserTotal(userId);
    }
    *//**
     * 购物车添加
     *
     * @param comShopCartDTO
     *            请求参数
     * @return 添加结果
     *//*
    @PostMapping("shopAddCart")
    public R shopAddCart(@RequestBody ComShopCartDTO comShopCartDTO) {
        return comShopCartService.shopAddCart(comShopCartDTO);
    }
    *//**
     * 购物车内商品数量添加
     *
     * @param shopEditNubCartDTO
     *            请求参数
     * @return 修改结果
     *//*
    @PostMapping("shopEditNubCart")
    public R shopEditNubCart(@RequestBody ComShopEditNubCartDTO shopEditNubCartDTO) {
        return comShopCartService.shopEditNubCart(shopEditNubCartDTO);
    }
    *//**
     * 删除购物车记录
     *
     * @param Ids
     *            购物车id集合
     * @return 删除结果
     *//*
    @PostMapping("shopDelCart")
    public R shopDelCart(@RequestBody List<Long> Ids) {
        return comShopCartService.shopDelCart(Ids);
    }
    *//**
@@ -324,64 +309,7 @@
        return comShopOrderService.orderStatistics(userId);
    }
    *//**
     * 商品列表-分页查询
     *
     * @param pageComShopGoodsDTO
     *            查询参数
     * @return PageShopStoreVO
     *//*
    @PostMapping("pageGoods")
    public R pageShopStore(@RequestBody PageComShopGoodsDTO pageComShopGoodsDTO) {
        return comShopFlowerGoodsService.pageGoodsList(pageComShopGoodsDTO);
    }
    *//**
     * 新增商品
     *
     * @param addShopGoodsVO
     * @return
     *//*
    @PostMapping("saveShopGoods")
    public R saveStore(@RequestBody AddShopGoodsVO addShopGoodsVO) {
        return comShopFlowerGoodsService.saveShopGoods(addShopGoodsVO);
    }
    *//**
     * 编辑商品
     *
     * @param addShopGoodsVO
     * @param id
     *            商铺Id
     * @return
     *//*
    @Transactional(rollbackFor = Exception.class)
    @PostMapping("editShopGoods/{id}")
    public R editShopGoods(@PathVariable("id") Long id, @RequestBody AddShopGoodsVO addShopGoodsVO) {
        return comShopFlowerGoodsService.editShopGoods(id, addShopGoodsVO);
    }
    *//**
     * 删除商品
     *
     * @param id
     * @return
     *//*
    @PostMapping("deleteShopGoods")
    public R deleteShopGoods(@RequestBody Long[] id) {
        return comShopFlowerGoodsService.deleteShopGoods(id);
    }
    *//**
     * 修改商品状态
     *
     * @param id
     * @return
     *//*
    @GetMapping("changeShopGoodsStatus")
    public R changeStatus(@RequestParam("id") Long id, @RequestParam("status") Integer status) {
        return comShopFlowerGoodsService.changeStatus(id, status);
    }
    *//**
     * 商家资金的订单详情
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoDAO.java
@@ -453,4 +453,10 @@
     * @return
     */
    BigScreenDpcStatisticsInfo selectDpcBaseData(@Param("communityId") Long communityId);
    /**
     * 获取社区动态置顶banner
     * */
    List<BannerVO> getBanner(@Param("communityId") Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComActProceedings.java
@@ -70,6 +70,7 @@
    * 工作时间
    * */
    private String workTime;
    private String logo;
    private static final long serialVersionUID = 1L;
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngVolunteerMngDO.java
@@ -113,4 +113,8 @@
     * 大学名称
     */
    private String universityName;
    /**
     * 所属物业公司id
     * */
    private Long propertyId;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActDiscussService.java
@@ -37,6 +37,14 @@
     * @return ComActDiscussVO
     */
    R detailDiscuss(ComActDiscussDetailDTO discussDetailDTO);
    /**
     * 议事投票-详情 脱敏
     *
     * @param discussDetailDTO
     *            请求参数
     * @return ComActDiscussVO
     */
    R detailDiscussDesensitize(ComActDiscussDetailDTO discussDetailDTO);
    /**
     * 议事投票-删除
@@ -132,6 +140,14 @@
     * @return ComActDiscussVO 分页
     */
    R pageDiscussApplets(PageComActDiscussDTO pageComActDiscussDTO);
    /**
     * 议事投票-分页查询 小程序 脱敏
     *
     * @param pageComActDiscussDTO
     *            查询参数
     * @return ComActDiscussVO 分页
     */
    R pageDiscussAppletsDesensitize(PageComActDiscussDTO pageComActDiscussDTO);
    /**
     * 议事投票-点赞、取消点赞
@@ -150,6 +166,14 @@
     * @return ComActDiscussCommentVO
     */
    R pageDiscussCommentApplets(PageComActDiscussCommentDTO pageComActDiscussCommentDTO);
    /**
     * 议事投票-评论-分页查询 小程序 脱敏
     *
     * @param pageComActDiscussCommentDTO
     *            分页参数
     * @return ComActDiscussCommentVO
     */
    R pageDiscussCommentAppletsDesensitize(PageComActDiscussCommentDTO pageComActDiscussCommentDTO);
    /**
     * 议事投票-详情 小程序
@@ -161,6 +185,16 @@
     * @return ComActDiscussVO
     */
    R detailDiscussApplets(Long id, Long userId);
    /**
     * 议事投票-详情 小程序
     *
     * @param id
     *            主键
     * @param userId
     *            用户主键
     * @return ComActDiscussVO
     */
    R detailDiscussAppletsDesensitize(Long id, Long userId);
    /**
     * 议事投票-投票
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActEasyPhotoService.java
@@ -39,6 +39,16 @@
     * @return 详情内容
     */
    R detailEasyPhoto(Long id, Long userId);
    /**
     * 随手拍详情 - 脱敏
     *
     * @param id
     *            随手拍主键
     * @param userId
     *            登录用户id
     * @return 详情内容
     */
    R detailEasyPhotoDesensitize(Long id, Long userId);
    /**
     * 上传随手拍
@@ -88,6 +98,15 @@
    R pageEasyPhotoApplets(ComActEasyPhotoVO comActEasyPhotoVO);
    /**
     * 小程序分页查询随手拍
     *
     * @param comActEasyPhotoVO
     *            查询参数
     * @return 返回结果
     */
    R pageEasyPhotoAppletsDesensitize(ComActEasyPhotoVO comActEasyPhotoVO);
    /**
     * 随手拍评论分页查询
     * 
     * @param pageComActEasyPhotoCommentDTO
@@ -95,6 +114,15 @@
     * @return 查询结果
     */
    R pageComActEasyPhotoComment(PageComActEasyPhotoCommentDTO pageComActEasyPhotoCommentDTO);
    /**
     * 随手拍评论分页查询 - 脱敏
     *
     * @param pageComActEasyPhotoCommentDTO
     *            查询参数
     * @return 查询结果
     */
    R pageComActEasyPhotoCommentDesensitize(PageComActEasyPhotoCommentDTO pageComActEasyPhotoCommentDTO);
    /**
     * 评论点赞/取消点赞
@@ -200,4 +228,9 @@
     * @return
     */
    R addEasyPhotoFeedbackForDpc(ComActEasyPhotoVO comActEasyPhotoVO);
    /**
     * 获取社区置顶动态banner
     * */
    R getUserRewardNew(Long userId, Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActMicroWishService.java
@@ -27,6 +27,8 @@
    R pageMicroWishApplets(ComActMicroWishVO comActMicroWishVO);
    R pageMicroWishAppletsDesensitize(ComActMicroWishVO comActMicroWishVO);
    /**
     * 心愿详情
     * 
@@ -39,6 +41,17 @@
    R detailMicroWish(Long id, Long userId);
    /**
     * 心愿详情 - 脱敏
     *
     * @param id
     *            查询主键
     * @param userId
     *            登录用户id
     * @return 心愿内容
     */
    R detailMicroWishDesensitize(Long id, Long userId);
    /**
     * 审核、分配、反馈心愿
     * 
     * @param comActMicroWishVO
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDiscussServiceImpl.java
@@ -19,6 +19,7 @@
import javax.annotation.Resource;
import javax.validation.constraints.NotEmpty;
import cn.hutool.core.util.DesensitizedUtil;
import com.panzhihua.common.model.dtos.community.ComActDiscussVoteOptionDTO;
import com.panzhihua.common.model.dtos.community.DiscussVoteOptionDTO;
import com.panzhihua.common.model.dtos.community.PageVoteSituationDTO;
@@ -309,6 +310,55 @@
        Long userId = comActDiscussDO.getUserId();
        LoginUserInfoVO loginUserInfoVO = comActDiscussDAO.selectUserByUserId(userId);
        comActDiscussVO.setUserName(loginUserInfoVO.getName());
        comActDiscussVO.setUserNickName(loginUserInfoVO.getNickName());
        comActDiscussVO.setImageUrl(loginUserInfoVO.getImageUrl());
        //分页查询评论列表
        PageComActDiscussCommentDTO pageComActDiscussCommentDTO = new PageComActDiscussCommentDTO();
        BeanUtils.copyProperties(discussDetailDTO, pageComActDiscussCommentDTO);
        IPage<ComActDiscussCommentVO> discussComments = comActDiscussDAO.pageDiscussCommentAdmin(new Page<>(pageComActDiscussCommentDTO.getPageNum(), pageComActDiscussCommentDTO.getPageSize()), pageComActDiscussCommentDTO);
        discussComments.getRecords().forEach(comment -> {
            if (comment.getReplyNum() > 0) {
                List<ComActDiscussCommentVO> childList = comActDiscussDAO.getDiscussCommentReplyList(comment.getId());
                if (!childList.isEmpty()) {
                    comment.setComActDiscussCommentVOList(childList);
                }
            }
        });
        comActDiscussVO.setDiscussCommentList(discussComments.getRecords());
        String viewNumKey = String.join("_", DISCUSS_VIEW_NUM_PREFIX, id.toString());
        if (stringRedisTemplate.hasKey(viewNumKey)) {
            ValueOperations<String, String> opsForValue = stringRedisTemplate.opsForValue();
            comActDiscussVO.setViewsNum(Integer.parseInt(opsForValue.get(viewNumKey)));
        }
        return R.ok(comActDiscussVO);
    }
    /**
     * 议事投票-详情 脱敏
     *
     * @param discussDetailDTO 请求参数
     * @return ComActDiscussVO
     */
    @Override
    public R detailDiscussDesensitize(ComActDiscussDetailDTO discussDetailDTO) {
        Long id = discussDetailDTO.getId();
        ComActDiscussDO comActDiscussDO = comActDiscussDAO.selectById(id);
        if (ObjectUtils.isEmpty(comActDiscussDO)) {
            return R.fail("议事投票不存在");
        }
        ComActDiscussVO comActDiscussVO = new ComActDiscussVO();
        BeanUtils.copyProperties(comActDiscussDO, comActDiscussVO);
        comActDiscussVO.setSignNum(comActDiscussDO.getFabulousNum());
        Integer type = comActDiscussVO.getType();
        if (type.equals(ComActDiscussVO.type.tp)) {
            //查询选项列表
            List<ComActDiscussOptionVO> comActDiscussOptionList = comActDiscussOptionDAO.getDiscussOptionList(id);
            comActDiscussVO.setComActDiscussOptionVOS(comActDiscussOptionList);
        }
        Long userId = comActDiscussDO.getUserId();
        LoginUserInfoVO loginUserInfoVO = comActDiscussDAO.selectUserByUserId(userId);
        comActDiscussVO.setUserName(DesensitizedUtil.chineseName(loginUserInfoVO.getName()));
        comActDiscussVO.setUserNickName(loginUserInfoVO.getNickName());
        comActDiscussVO.setImageUrl(loginUserInfoVO.getImageUrl());
@@ -708,6 +758,111 @@
    }
    /**
     * 议事投票-分页查询 小程序
     *
     * @param pageComActDiscussDTO 查询参数
     * @return ComActDiscussVO 分页
     */
    @Override
    public R pageDiscussAppletsDesensitize(PageComActDiscussDTO pageComActDiscussDTO) {
        Page page = new Page<>();
        Long pageNum = pageComActDiscussDTO.getPageNum();
        Long pageSize = pageComActDiscussDTO.getPageSize();
        Long loginUserId = pageComActDiscussDTO.getLoginUserId();
        if (null == pageNum || 0 == pageNum) {
            pageNum = 1l;
        }
        if (null == pageSize || 0 == pageSize) {
            pageSize = 10l;
        }
        page.setSize(pageSize);
        page.setCurrent(pageNum);
        pageComActDiscussDTO.setIsPbMember(0);
        pageComActDiscussDTO.setIsVolunteer(0);
        if (nonNull(loginUserId)) {
            pageComActDiscussDTO.setIsPbMember(pbMemberDAO.checkIsPbMember(loginUserId) > 0 ? 1 : 0);
            pageComActDiscussDTO.setIsVolunteer(pbMemberDAO.checkIsVolunteer(loginUserId) > 0 ? 1 : 0);
        }
        IPage<ComActDiscussVO> iPage = comActDiscussDAO.pageDiscussApplets(page, pageComActDiscussDTO);
        List<ComActDiscussVO> records = iPage.getRecords();
        if (!ObjectUtils.isEmpty(records)) {
            records.forEach(comActDiscussVO -> {
                Integer type = comActDiscussVO.getType();
                Long id = comActDiscussVO.getId();
                String viewNumKey = String.join("_", DISCUSS_VIEW_NUM_PREFIX, id.toString());
                if (stringRedisTemplate.hasKey(viewNumKey)) {
                    ValueOperations<String, String> opsForValue = stringRedisTemplate.opsForValue();
                    comActDiscussVO.setViewsNum(Integer.parseInt(opsForValue.get(viewNumKey)));
                }
                if (type.equals(2)) {
                    List<ComActDiscussOptionDO> comActDiscussOptionDOS = comActDiscussOptionDAO.selectList(
                            new QueryWrapper<ComActDiscussOptionDO>().lambda().eq(ComActDiscussOptionDO::getDiscussId, id));
                    List<ComActDiscussOptionVO> comActDiscussOptionVOS = new ArrayList<>();
                    List<Integer> votes = new ArrayList<>();
                    comActDiscussOptionDOS.forEach(comActDiscussOptionDO -> {
                        Long discussOptionDOId = comActDiscussOptionDO.getId();
                        Integer selectCount =
                                comActDiscussOptionUserDAO.selectCount(new QueryWrapper<ComActDiscussOptionUserDO>()
                                        .lambda().eq(ComActDiscussOptionUserDO::getDiscussOptionId, discussOptionDOId));
                        ComActDiscussOptionVO comActDiscussOptionVO = new ComActDiscussOptionVO();
                        BeanUtils.copyProperties(comActDiscussOptionDO, comActDiscussOptionVO);
                        comActDiscussOptionVO.setNum(selectCount);
                        if (loginUserId != null) {
                            // 判断选项是否已投票
                            int haveVote =
                                    comActDiscussOptionUserDAO.selectHaveVotes(comActDiscussOptionDO.getId(), loginUserId);
                            votes.add(haveVote);
                            comActDiscussOptionVO.setHaveVote(haveVote > 0 ? 1 : 0);
                        }
                        comActDiscussOptionVOS.add(comActDiscussOptionVO);
                    });
                    fillThePercentAndSort(comActDiscussOptionVOS);
                    checkDiscussStatusIsCorrect(comActDiscussVO);
                    comActDiscussVO.setComActDiscussOptionVOS(comActDiscussOptionVOS);
                    //填充剩余可投票数
                    if (loginUserId != null && !loginUserId.equals(0L)) {
                        if (comActDiscussVO.getIsRepeat().intValue() == 1) {
                            //可重复投票
                            int votedVotesInToday = comActDiscussOptionUserDAO.selectVotedVotesInToday(id, loginUserId);
                            int remainingVotes = comActDiscussVO.getCount().intValue() - votedVotesInToday;
                            comActDiscussVO.setRemainingVotes(remainingVotes >= 0 ? remainingVotes : 0);
                        } else {
                            //不可重复投票
                            int alreadyVotedVotes = votes.stream().mapToInt(Integer::intValue).sum();
                            int remainingVotes = comActDiscussVO.getCount().intValue() - alreadyVotedVotes;
                            comActDiscussVO.setRemainingVotes(remainingVotes >= 0 ? remainingVotes : 0);
                        }
                    }
                    comActDiscussVO.setUserName(DesensitizedUtil.chineseName(comActDiscussVO.getUserName()));
                    //填充投票记录列表
                    List<ComActDiscussOptionUserVO> comActDiscussOptionUserVOList = comActDiscussOptionUserDAO
                            .selectVotedRecords(comActDiscussVO.getId());
                    comActDiscussVO.setComActDiscussOptionUserVOList(comActDiscussOptionUserVOList);
                    //填充已参与投票人数
                    int votedPersonNum = comActDiscussOptionUserDAO.selectVotedPersonNum(comActDiscussVO.getId());
                    comActDiscussVO.setVotedPersonNum(votedPersonNum);
                }
                if (loginUserId != null) {
                    Integer integer = comActDiscussUserDAO.selectCount(new QueryWrapper<ComActDiscussUserDO>().lambda()
                            .eq(ComActDiscussUserDO::getDiscussId, comActDiscussVO.getId())
                            .eq(ComActDiscussUserDO::getUserId, loginUserId));
                    if (integer > 0) {
                        comActDiscussVO.setHaveSign(1);
                    } else {
                        comActDiscussVO.setHaveSign(0);
                    }
                    // 判断是否已经投票
                    int haveVote = comActDiscussOptionUserDAO.selectHaveVote(id, loginUserId);
                    comActDiscussVO.setHaveVote(haveVote > 0 ? 1 : 0);
                }
            });
        }
        return R.ok(iPage);
    }
    /**
     * 判断discuss状态是否正确
     * @param comActDiscussVO
     */
@@ -843,6 +998,104 @@
        return R.ok(iPage);
    }
 /**
     * 议事投票-评论-分页查询 小程序
     *
     * @param pageComActDiscussCommentDTO 分页参数
     * @return ComActDiscussCommentVO
     */
    @Override
    public R pageDiscussCommentAppletsDesensitize(PageComActDiscussCommentDTO pageComActDiscussCommentDTO) {
        Page page = new Page<>();
        Long pageNum = pageComActDiscussCommentDTO.getPageNum();
        Long pageSize = pageComActDiscussCommentDTO.getPageSize();
        if (null == pageNum || 0 == pageNum) {
            pageNum = 1l;
        }
        if (null == pageSize || 0 == pageSize) {
            pageSize = 10l;
        }
        page.setSize(pageSize);
        page.setCurrent(pageNum);
        IPage<ComActDiscussCommentVO> iPage =
                comActDiscussDAO.pageDiscussCommentApplets(page, pageComActDiscussCommentDTO);
        List<ComActDiscussCommentVO> records = iPage.getRecords();
        if (!ObjectUtils.isEmpty(records)) {
            records.forEach(comActDiscussCommentVO -> {
                List<ComActDiscussCommentVO> comActDiscussCommentVOList = new ArrayList<>();
                Long id = comActDiscussCommentVO.getId();
                comActDiscussCommentVO.setPhone(DesensitizedUtil.mobilePhone(comActDiscussCommentVO.getPhone()));
                comActDiscussCommentVO.setUserName(DesensitizedUtil.chineseName(comActDiscussCommentVO.getUserName()));
                comActDiscussCommentVO.setUserNameBack(DesensitizedUtil.chineseName(comActDiscussCommentVO.getUserNameBack()));
                comActDiscussCommentVOList = comActDiscussCommentDAO.selectChilds(id);
                if (!ObjectUtils.isEmpty(comActDiscussCommentVOList)) {
                    List<ComActDiscussCommentVO> comActDiscussCommentVOS = comActDiscussCommentVOList;
                    comActDiscussCommentVOList.forEach(comActDiscussCommentVO1 -> {
                        Long parentId = comActDiscussCommentVO1.getParentId();
                        List<ComActDiscussCommentVO> collect = comActDiscussCommentVOS.stream()
                                .filter(comActDiscussCommentVO2 -> comActDiscussCommentVO2.getId().equals(parentId))
                                .collect(Collectors.toList());
                        if (!ObjectUtils.isEmpty(collect)) {
                            String userName = collect.get(0).getUserName();
                            String userNickName = collect.get(0).getUserNickName();
                            comActDiscussCommentVO1.setUserNameBack(userName);
                            comActDiscussCommentVO1.setUserNickNameBack(userNickName);
                        }
                        List<ComActDiscussCommentVO> collect1 = records.stream()
                                .filter(comActDiscussCommentVO2 -> comActDiscussCommentVO2.getId().equals(parentId))
                                .collect(Collectors.toList());
                        if (!ObjectUtils.isEmpty(collect1)) {
                            ComActDiscussCommentVO comActDiscussCommentVOFirst = collect1.get(0);
                            String userName = comActDiscussCommentVOFirst.getUserName();
                            String userNickName = comActDiscussCommentVOFirst.getUserNickName();
                            comActDiscussCommentVO1.setUserNameBack(userName);
                            comActDiscussCommentVO1.setUserNickNameBack(userNickName);
                        }
                        comActDiscussCommentVO1.setPhone(DesensitizedUtil.mobilePhone(comActDiscussCommentVO1.getPhone()));
                        comActDiscussCommentVO1.setUserName(DesensitizedUtil.chineseName(comActDiscussCommentVO1.getUserName()));
                        comActDiscussCommentVO1.setUserNameBack(DesensitizedUtil.chineseName(comActDiscussCommentVO1.getUserNameBack()));
                        if (pageComActDiscussCommentDTO.getLoginUserId() != null
                                && !pageComActDiscussCommentDTO.getLoginUserId().equals(0L)) {
                            Integer integer = comActDiscussCommentUserDAO
                                    .selectCount(new QueryWrapper<ComActDiscussCommentUserDO>().lambda()
                                            .eq(ComActDiscussCommentUserDO::getDisscussCommentId,
                                                    comActDiscussCommentVO1.getId())
                                            .eq(ComActDiscussCommentUserDO::getUserId,
                                                    pageComActDiscussCommentDTO.getLoginUserId()));
                            if (integer > 0) {
                                comActDiscussCommentVO1.setHaveSign(1);
                            } else {
                                comActDiscussCommentVO1.setHaveSign(0);
                            }
                        }
//                        if(StringUtils.isEmpty(comActDiscussCommentVO1.getUserNickNameBack())){
//                            comActDiscussCommentVO1.setUserNickNameBack("社区管理员");
//                        }
                    });
                    comActDiscussCommentVO.setComActDiscussCommentVOList(comActDiscussCommentVOList);
                }
                if (pageComActDiscussCommentDTO.getLoginUserId() != null
                        && !pageComActDiscussCommentDTO.getLoginUserId().equals(0L)) {
                    Integer integer =
                            comActDiscussCommentUserDAO.selectCount(new QueryWrapper<ComActDiscussCommentUserDO>().lambda()
                                    .eq(ComActDiscussCommentUserDO::getDisscussCommentId, comActDiscussCommentVO.getId())
                                    .eq(ComActDiscussCommentUserDO::getUserId, pageComActDiscussCommentDTO.getLoginUserId()));
                    if (integer > 0) {
                        comActDiscussCommentVO.setHaveSign(1);
                    } else {
                        comActDiscussCommentVO.setHaveSign(0);
                    }
                }
                // 判断当前评论是否是社区管理员评论
                if (!comActDiscussCommentVO.getUserType().equals(1)) {
                    comActDiscussCommentVO.setUserNickName("社区管理员");
                }
            });
        }
        return R.ok(iPage);
    }
    /**
     * 议事投票-详情 小程序
     *
@@ -939,6 +1192,102 @@
        }
        return R.ok(comActDiscussVO);
    }
    /**
     * 议事投票-详情 小程序 脱敏
     *
     * @param id          主键
     * @param loginUserId 登录用户主键
     * @return ComActDiscussVO
     */
    @Override
    public R detailDiscussAppletsDesensitize(Long id, Long loginUserId) {
        ComActDiscussDO comActDiscussDO = comActDiscussDAO.selectById(id);
        if (ObjectUtils.isEmpty(comActDiscussDO)) {
            return R.fail("议事投票不存在");
        }
        ComActDiscussVO comActDiscussVO = new ComActDiscussVO();
        BeanUtils.copyProperties(comActDiscussDO, comActDiscussVO);
        comActDiscussVO.setSignNum(comActDiscussDO.getFabulousNum());
        Integer type = comActDiscussVO.getType();
        if (type.equals(2)) {
            List<ComActDiscussOptionDO> comActDiscussOptionDOS = comActDiscussOptionDAO.selectList(
                    new QueryWrapper<ComActDiscussOptionDO>().lambda().eq(ComActDiscussOptionDO::getDiscussId, id));
            List<ComActDiscussOptionVO> comActDiscussOptionVOS = new ArrayList<>();
            ArrayList<Integer> votes = new ArrayList<>();
            comActDiscussOptionDOS.forEach(comActDiscussOptionDO -> {
                Long discussOptionDOId = comActDiscussOptionDO.getId();
                Integer selectCount =
                        comActDiscussOptionUserDAO.selectCount(new QueryWrapper<ComActDiscussOptionUserDO>().lambda()
                                .eq(ComActDiscussOptionUserDO::getDiscussOptionId, discussOptionDOId));
                ComActDiscussOptionVO comActDiscussOptionVO = new ComActDiscussOptionVO();
                BeanUtils.copyProperties(comActDiscussOptionDO, comActDiscussOptionVO);
                comActDiscussOptionVO.setNum(selectCount);
                if (loginUserId != null && !loginUserId.equals(0L)) {
                    // 判断选项是否已投票
                    int haveVote =
                            comActDiscussOptionUserDAO.selectHaveVotes(comActDiscussOptionDO.getId(), loginUserId);
                    votes.add(haveVote);
                    comActDiscussOptionVO.setHaveVote(haveVote > 0 ? 1 : 0);
                }
                comActDiscussOptionVOS.add(comActDiscussOptionVO);
            });
            fillThePercentAndSort(comActDiscussOptionVOS);
            comActDiscussVO.setComActDiscussOptionVOS(comActDiscussOptionVOS);
            //填充剩余可投票数
            if (loginUserId != null && !loginUserId.equals(0L)) {
                if (comActDiscussVO.getIsRepeat().intValue() == 1) {
                    //可重复投票
                    int votedVotesInToday = comActDiscussOptionUserDAO.selectVotedVotesInToday(id, loginUserId);
                    int remainingVotes = comActDiscussVO.getCount().intValue() - votedVotesInToday;
                    comActDiscussVO.setRemainingVotes(remainingVotes >= 0 ? remainingVotes : 0);
                } else {
                    //不可重复投票
                    int alreadyVotedVotes = votes.stream().mapToInt(Integer::intValue).sum();
                    int remainingVotes = comActDiscussVO.getCount().intValue() - alreadyVotedVotes;
                    comActDiscussVO.setRemainingVotes(remainingVotes >= 0 ? remainingVotes : 0);
                }
            }
            checkDiscussStatusIsCorrect(comActDiscussVO);
            //填充投票记录列表
            List<ComActDiscussOptionUserVO> comActDiscussOptionUserVOList = comActDiscussOptionUserDAO
                    .selectVotedRecords(comActDiscussVO.getId());
            comActDiscussVO.setComActDiscussOptionUserVOList(comActDiscussOptionUserVOList);
            //填充已参与投票人数
            int votedPersonNum = comActDiscussOptionUserDAO.selectVotedPersonNum(comActDiscussVO.getId());
            comActDiscussVO.setVotedPersonNum(votedPersonNum);
        }
        Long userId = comActDiscussDO.getUserId();
        LoginUserInfoVO loginUserInfoVO = comActDiscussDAO.selectUserByUserId(userId);
        if (loginUserInfoVO != null) {
            comActDiscussVO.setUserName(DesensitizedUtil.chineseName(loginUserInfoVO.getName()));
            if (StringUtils.isEmpty(loginUserInfoVO.getNickName())) {
                comActDiscussVO.setUserNickName(DesensitizedUtil.chineseName(loginUserInfoVO.getName()));
            } else {
                comActDiscussVO.setUserNickName(loginUserInfoVO.getNickName());
            }
            comActDiscussVO.setImageUrl(loginUserInfoVO.getImageUrl());
            comActDiscussVO.setUserType(loginUserInfoVO.getType());
        }
        Long communityId = comActDiscussDO.getCommunityId();
        Integer type1 = loginUserInfoVO.getType();
        if (type1.intValue() > 1) {
            ComActVO comActVO = comActDiscussDAO.selectCommunity(communityId);
            comActDiscussVO.setUserName(comActVO.getName());
            comActDiscussVO.setUserNickName(comActVO.getName());
        }
        if (loginUserId != null && !loginUserId.equals(0L)) {
            ComActDiscussVO comActDiscussVO1 = comActDiscussDAO.selectHaveSignAndHaveVote(id, loginUserId);
            comActDiscussVO.setHaveSign(comActDiscussVO1.getHaveSign());
            comActDiscussVO.setHaveVote(comActDiscussVO1.getHaveVote());
        }
        String viewNumKey = String.join("_", DISCUSS_VIEW_NUM_PREFIX, id.toString());
        if (stringRedisTemplate.hasKey(viewNumKey)) {
            ValueOperations opsForValue = stringRedisTemplate.opsForValue();
            int viewNum = Integer.parseInt((String) opsForValue.get(viewNumKey));
            comActDiscussVO.setViewsNum(viewNum);
        }
        return R.ok(comActDiscussVO);
    }
    /**
     * 计算投票占比以及排序
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java
@@ -7,6 +7,8 @@
import javax.annotation.Resource;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.DesensitizedUtil;
import com.panzhihua.common.model.dtos.common.PageComActEasyPhotoEvaluateDto;
import com.panzhihua.common.model.vos.common.ComActEasyPhotoHandlerVo;
import com.panzhihua.common.model.vos.community.easyPhoto.BannerVO;
@@ -193,6 +195,66 @@
        if (comActEasyPhotoVO.getActivityId() != null) {
            ComActEasyPhotoActivityDO photoActivityDO =
                comActEasyPhotoActivityMapper.selectById(comActEasyPhotoVO.getActivityId());
            if (photoActivityDO != null) {
                ComActEasyPhotoActivityVO easyPhotoActivityVO = new ComActEasyPhotoActivityVO();
                BeanUtils.copyProperties(photoActivityDO, easyPhotoActivityVO);
                comActEasyPhotoVO.setEasyPhotoActivityVO(easyPhotoActivityVO);
            }
        }
        PageComActEasyPhotoEvaluateDto evaluateDto = new PageComActEasyPhotoEvaluateDto();
        evaluateDto.setServiceId(id);
        evaluateDto.setServiceType(ComActEasyPhotoEvaluate.ServiceType.SSP);
        comActEasyPhotoVO.setEvaluateList(comActEasyPhotoEvaluateMapper.queryAllByList(evaluateDto));
        return R.ok(comActEasyPhotoVO);
    }
    /**
     * 随手拍详情 - 脱敏
     *
     * @param id
     *            随手拍主键
     * @param userId
     * @return 详情内容
     */
    @Override
    public R detailEasyPhotoDesensitize(Long id, Long userId) {
        ComActEasyPhotoVO comActEasyPhotoVO = comActEasyPhotoDAO.detailEasyPhoto(id);
        Integer status = comActEasyPhotoVO.getStatus();
        if (ObjectUtils.isEmpty(comActEasyPhotoVO) || null == status) {
            return R.fail("随手拍不存在");
        }
        if (!userId.equals(0L)) {
            ComActEasyPhotoUserDO comActEasyPhotoUserDO =
                    comActEasyPhotoUserDAO.selectOne(new QueryWrapper<ComActEasyPhotoUserDO>().lambda()
                            .eq(ComActEasyPhotoUserDO::getEasyPhotoId, id).eq(ComActEasyPhotoUserDO::getUserId, userId));
            if (ObjectUtils.isEmpty(comActEasyPhotoUserDO)) {
                comActEasyPhotoVO.setHaveGiveThumbsUp(0);
            } else {
                comActEasyPhotoVO.setHaveGiveThumbsUp(1);
            }
        }
        comActEasyPhotoVO.setSponsorName(DesensitizedUtil.chineseName(comActEasyPhotoVO.getSponsorName()));
        comActEasyPhotoVO.setHandlerName(DesensitizedUtil.chineseName(comActEasyPhotoVO.getHandlerName()));
        comActEasyPhotoVO.setCompleteName(DesensitizedUtil.chineseName(comActEasyPhotoVO.getCompleteName()));
        comActEasyPhotoVO.setPhone(DesensitizedUtil.mobilePhone(comActEasyPhotoVO.getPhone()));
        // 查询反馈信息
        List<ComActEasyPhotoFeedbackVO> photoFeedbackList = comActEasyPhotoFeedbackMapper.getPhotoFeedbackList(id);
        if (!photoFeedbackList.isEmpty()) {
            if (CollUtil.isNotEmpty(photoFeedbackList)){
                for (ComActEasyPhotoFeedbackVO comActEasyPhotoFeedbackVO : photoFeedbackList) {
                    comActEasyPhotoFeedbackVO.setCreateByName(DesensitizedUtil.chineseName(comActEasyPhotoFeedbackVO.getCreateByName()));
                }
            }
            comActEasyPhotoVO.setPhotoFeedbackList(photoFeedbackList);
        }
        if (comActEasyPhotoVO.getAddrRemark() == null) {
            comActEasyPhotoVO.setAddrRemark("");
        }
        if (comActEasyPhotoVO.getActivityId() != null) {
            ComActEasyPhotoActivityDO photoActivityDO =
                    comActEasyPhotoActivityMapper.selectById(comActEasyPhotoVO.getActivityId());
            if (photoActivityDO != null) {
                ComActEasyPhotoActivityVO easyPhotoActivityVO = new ComActEasyPhotoActivityVO();
                BeanUtils.copyProperties(photoActivityDO, easyPhotoActivityVO);
@@ -467,6 +529,65 @@
    }
    /**
     * 小程序分页查询随手拍 脱敏
     *
     * @param comActEasyPhotoVO
     *            查询参数
     * @return 返回结果
     */
    @Override
    public R pageEasyPhotoAppletsDesensitize(ComActEasyPhotoVO comActEasyPhotoVO) {
        Page page = new Page<>();
        Long pageNum = comActEasyPhotoVO.getPageNum();
        Long pageSize = comActEasyPhotoVO.getPageSize();
        Long userId = comActEasyPhotoVO.getLogInUserId();
        if (null == pageNum || 0 == pageNum) {
            pageNum = 1l;
        }
        if (null == pageSize || 0 == pageSize) {
            pageSize = 10l;
        }
        page.setSize(pageSize);
        page.setCurrent(pageNum);
        IPage<ComActEasyPhotoVO> iPage = comActEasyPhotoDAO.pageEasyPhotoApplets(page, comActEasyPhotoVO);
        List<ComActEasyPhotoVO> records = iPage.getRecords();
        if (userId != null) {
            if (!ObjectUtils.isEmpty(records)) {
                records.forEach(comActEasyPhotoVO1 -> {
                    Long id = comActEasyPhotoVO1.getId();
                    Integer status = comActEasyPhotoVO1.getStatus();
                    Date feedbackAt = comActEasyPhotoVO1.getFeedbackAt();
                    comActEasyPhotoVO1.setSponsorName(DesensitizedUtil.chineseName(comActEasyPhotoVO1.getSponsorName()));
                    comActEasyPhotoVO1.setHandlerName(DesensitizedUtil.chineseName(comActEasyPhotoVO1.getHandlerName()));
                    comActEasyPhotoVO1.setCompleteName(DesensitizedUtil.chineseName(comActEasyPhotoVO1.getCompleteName()));
                    comActEasyPhotoVO1.setPhone(DesensitizedUtil.mobilePhone(comActEasyPhotoVO1.getPhone()));
                    List<ComActEasyPhotoUserDO> comActEasyPhotoUserDO = comActEasyPhotoUserDAO.selectList(
                            new QueryWrapper<ComActEasyPhotoUserDO>().lambda().eq(ComActEasyPhotoUserDO::getEasyPhotoId, id)
                                    .eq(ComActEasyPhotoUserDO::getUserId, userId));
                    if (comActEasyPhotoUserDO == null || comActEasyPhotoUserDO.size() == 0) {
                        comActEasyPhotoVO1.setHaveGiveThumbsUp(0);
                    } else {
                        comActEasyPhotoVO1.setHaveGiveThumbsUp(1);
                    }
                    if (status.intValue() == 4 && null == feedbackAt) {
                        comActEasyPhotoVO1.setFeedbackAt(comActEasyPhotoVO1.getExamineAt());
                    }
                    //反馈信息列表
                    List<ComActEasyPhotoFeedbackVO> photoFeedbackList = comActEasyPhotoVO1.getPhotoFeedbackList();
                    if (CollUtil.isNotEmpty(photoFeedbackList)){
                        for (ComActEasyPhotoFeedbackVO comActEasyPhotoFeedbackVO : photoFeedbackList) {
                            comActEasyPhotoFeedbackVO.setCreateByName(DesensitizedUtil.chineseName(comActEasyPhotoFeedbackVO.getCreateByName()));
                        }
                    }
                    comActEasyPhotoVO1.setPhotoFeedbackList(photoFeedbackList);
                });
                iPage.setRecords(records);
            }
        }
        return R.ok(iPage);
    }
    /**
     * 随手拍评论分页查询
     *
     * @param pageComActEasyPhotoCommentDTO
@@ -490,6 +611,39 @@
            comActEasyPhotoCommentDAO.pageComActEasyPhotoComment(page, pageComActEasyPhotoCommentDTO);
        if (!iPage.getRecords().isEmpty()) {
            for (ComActEasyPhotoCommentVO commentVO : iPage.getRecords()) {
                if (StringUtils.isEmpty(commentVO.getName())) {
                    commentVO.setName(commentVO.getNickName());
                }
            }
        }
        return R.ok(iPage);
    }
    /**
     * 随手拍评论分页查询 - 脱敏
     *
     * @param pageComActEasyPhotoCommentDTO
     *            查询参数
     * @return 查询结果
     */
    @Override
    public R pageComActEasyPhotoCommentDesensitize(PageComActEasyPhotoCommentDTO pageComActEasyPhotoCommentDTO) {
        Page page = new Page<>();
        Long pageNum = pageComActEasyPhotoCommentDTO.getPageNum();
        Long pageSize = pageComActEasyPhotoCommentDTO.getPageSize();
        if (null == pageNum || 0 == pageNum) {
            pageNum = 1l;
        }
        if (null == pageSize || 0 == pageSize) {
            pageSize = 10l;
        }
        page.setSize(pageSize);
        page.setCurrent(pageNum);
        IPage<ComActEasyPhotoCommentVO> iPage =
                comActEasyPhotoCommentDAO.pageComActEasyPhotoComment(page, pageComActEasyPhotoCommentDTO);
        if (!iPage.getRecords().isEmpty()) {
            for (ComActEasyPhotoCommentVO commentVO : iPage.getRecords()) {
                commentVO.setNickName(DesensitizedUtil.chineseName(commentVO.getNickName()));
                if (StringUtils.isEmpty(commentVO.getName())) {
                    commentVO.setName(commentVO.getNickName());
                }
@@ -925,4 +1079,18 @@
        return R.fail();
    }
    /**
     * 获取社区置顶动态banner
     * @param communityId
     * */
    @Override
    public R getUserRewardNew(Long userId, Long communityId) {
        ComActEasyPhotoRewardVO easyPhotoRewardVO=new ComActEasyPhotoRewardVO();
        List<BannerVO> bannerVOS=this.comActEasyPhotoDAO.getBanner(communityId);
        if(!bannerVOS.isEmpty()){
            easyPhotoRewardVO.setBannerVOS(bannerVOS);
        }
        return R.ok(easyPhotoRewardVO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActMicroWishServiceImpl.java
@@ -1,6 +1,7 @@
package com.panzhihua.service_community.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.DesensitizedUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -128,6 +129,32 @@
        }
        return R.ok(iPage);
    }
    @Override
    public R pageMicroWishAppletsDesensitize(ComActMicroWishVO comActMicroWishVO) {
        Long userId = comActMicroWishVO.getResponsibleId();
        IPage<ComActMicroWishVO> iPage = comActMicroWishDAO.pageMicroWishApplets(new Page(comActMicroWishVO.getPageNum()
                ,comActMicroWishVO.getPageSize()), comActMicroWishVO);
        List<ComActMicroWishVO> records = iPage.getRecords();
        if (!ObjectUtils.isEmpty(records)) {
            records.forEach(comActMicroWishVO1 -> {
                if(userId != null){
                    Long id = comActMicroWishVO1.getId();
                    ComActMicroWishUserDO comActMicroWishUserDO = comActMicroWishUserDAO.selectOne(new QueryWrapper<ComActMicroWishUserDO>().lambda().eq(ComActMicroWishUserDO::getMicroWishId, id)
                            .eq(ComActMicroWishUserDO::getUserId, userId));
                    if (ObjectUtils.isEmpty(comActMicroWishUserDO)) {
                        comActMicroWishVO1.setHaveGiveThumbsUp(0);
                    } else {
                        comActMicroWishVO1.setHaveGiveThumbsUp(1);
                    }
                }
                comActMicroWishVO1.setSponsorPhone(SensitiveUtil.desensitizedPhoneNumber(comActMicroWishVO1.getSponsorPhone()));
                comActMicroWishVO1.setSponsorName(DesensitizedUtil.chineseName(comActMicroWishVO1.getSponsorName()));
                comActMicroWishVO1.setResponsibleName(DesensitizedUtil.chineseName(comActMicroWishVO1.getResponsibleName()));
            });
            iPage.setRecords(records);
        }
        return R.ok(iPage);
    }
    /**
     * 心愿详情
@@ -177,6 +204,59 @@
        comActMicroWishVO.setResponsibleName(this.getWishHandleName(comActMicroWishVO.getHandleId()));
        return R.ok(comActMicroWishVO);
    }
    /**
     * 心愿详情 - 脱敏
     *
     * @param id 查询主键
     * @param userId 登录用户id
     * @return 心愿内容
     */
    @Override
    public R detailMicroWishDesensitize(Long id, Long userId) {
        ComActMicroWishVO comActMicroWishVO = comActMicroWishDAO.detailMicroWish(id);
        if (ObjectUtils.isEmpty(comActMicroWishVO)) {
            return R.fail("微心愿不存在");
        }
        Integer starNum = comActMicroWishVO.getStarNum();
        if (null==starNum) {
            comActMicroWishVO.setStarNum(0);
        }
        if (ObjectUtils.isEmpty(comActMicroWishVO)) {
            return R.fail("心愿不存在");
        }
        if(userId != null){
            ComActMicroWishUserDO comActMicroWishUserDO = comActMicroWishUserDAO.selectOne(new QueryWrapper<ComActMicroWishUserDO>().lambda().eq(ComActMicroWishUserDO::getUserId, userId).eq(ComActMicroWishUserDO::getMicroWishId, id));
            if (ObjectUtils.isEmpty(comActMicroWishUserDO)) {
                comActMicroWishVO.setHaveGiveThumbsUp(0);
            }else {
                comActMicroWishVO.setHaveGiveThumbsUp(1);
            }
        }
        //查询反馈列表
        List<ComActMicroWishFeedbackVO> feedList=comActMicroWishFeedbackMapper.selectByWishId(id);
        if(!feedList.isEmpty()){
            for (ComActMicroWishFeedbackVO comActMicroWishFeedbackVO : feedList) {
                comActMicroWishFeedbackVO.setName(DesensitizedUtil.chineseName(comActMicroWishFeedbackVO.getName()));
            }
            comActMicroWishVO.setFeedbackVOList(feedList);
        }
        //查询操作记录
        List<ComActMicroWishOperationRecordVO> operationList=comActMicroWishOperationRecordMapper.getByWishId(id);
        if(!operationList.isEmpty()){
            comActMicroWishVO.setOperationRecordVOList(operationList);
        }
        comActMicroWishVO.setSponsorPhone(SensitiveUtil.desensitizedPhoneNumber(comActMicroWishVO.getSponsorPhone()));
        comActMicroWishVO.setSponsorName(DesensitizedUtil.chineseName(comActMicroWishVO.getSponsorName()));
        comActMicroWishVO.setResponsibleName(DesensitizedUtil.chineseName(comActMicroWishVO.getResponsibleName()));
        //查询同类型id数组
        List<Long> idList=comActMicroWishOperationRecordMapper.selectId(comActMicroWishVO);
        if(!idList.isEmpty()){
            comActMicroWishVO.setIdList(idList);
        }
        //查询处理人
        comActMicroWishVO.setResponsibleName(DesensitizedUtil.chineseName(this.getWishHandleName(comActMicroWishVO.getHandleId())));
        return R.ok(comActMicroWishVO);
    }
    /**
     * 审核、分配、反馈心愿
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActEasyPhotoDOMapper.xml
@@ -607,5 +607,8 @@
        SELECT
        (select count(id) from com_act_dpc where community_id = ${communityId} AND is_del = 0) AS dpcNum
    </select>
    <select id="getBanner" resultType="com.panzhihua.common.model.vos.community.easyPhoto.BannerVO">
        select *  from com_act_dyn where type=1 AND on_top=1
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngVolunteerMngDOMapper.xml
@@ -95,6 +95,9 @@
        <if test='comMngVolunteerMngVO.phone != null and comMngVolunteerMngVO.phone != &quot;&quot;'>
            AND cmvm.phone like concat(#{comMngVolunteerMngVO.phone},'%')
        </if>
        <if test="comMngVolunteerMngVO.propertyId != null and comMngVolunteerMngVO.propertyId != ''">
            AND cmvm.property_id=#{comMngVolunteerMngVO.propertyId}
        </if>
        ORDER BY
        integral DESC,
        cmvm.create_at DESC
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbServiceTeamDAO.java
@@ -26,6 +26,10 @@
        + " where community_id = ${pageComPbServiceTeamDTO.communityId}"
        + "<if test='pageComPbServiceTeamDTO.name != null and pageComPbServiceTeamDTO.name.trim() != &quot;&quot;'>"
        + " and name LIKE concat( #{pageComPbServiceTeamDTO.name}, '%' ) \n" + " </if> "
            + "<if test='pageComPbServiceTeamDTO.propertyId != null and pageComPbServiceTeamDTO.propertyId != &quot;&quot;'>"
            + " and property_id = #{pageComPbServiceTeamDTO.propertyId} </if> "
            + "<if test='pageComPbServiceTeamDTO.type != null and pageComPbServiceTeamDTO.type != &quot;&quot;'>"
            + " and type = #{pageComPbServiceTeamDTO.type} </if> "
        + "<if test='pageComPbServiceTeamDTO.job != null and pageComPbServiceTeamDTO.job.trim() != &quot;&quot;'>"
        + "AND job LIKE concat(\n" + "#{pageComPbServiceTeamDTO.job},\n" + "'%')" + " </if> " + "</script>")
    IPage<ComPbServiceTeamVO> PageComPbServiceTeamDTO(Page page,
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/model/dos/ComPbServiceTeamDO.java
@@ -70,4 +70,9 @@
     * 身份证号码
     */
    private String cardNo;
    /**
     * 所属物业公司Id
     * */
    private Long propertyId;
    private Integer type;
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/api/ComPropertyRepairApi.java
@@ -37,6 +37,15 @@
        return this.comPropertyRepairService.pageList(commonPage);
    }
    /**
     * 分页查询所有数据 脱敏
     * @return 所有数据
     */
    @PostMapping("queryAllDesensitize")
    public R selectAllDesensitize(@RequestBody CommonPage commonPage) {
        return this.comPropertyRepairService.pageListDesensitize(commonPage);
    }
    /**
@@ -50,6 +59,19 @@
        return this.comPropertyRepairService.selectDetail(id);
    }
    /**
     * 通过主键查询单条数据 脱敏
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("desensitize/{id}")
    public R selectOneDesensitize(@PathVariable("id") Long id) {
        return this.comPropertyRepairService.selectDetailDesensitize(id);
    }
    /**
     * 新增数据
     *
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/ComPropertyRepairService.java
@@ -19,9 +19,21 @@
     * @return
     */
    R pageList(CommonPage commonPage);
    /**
     * 多条件查询维修列表
     * @param commonPage
     * @return
     */
    R pageListDesensitize(CommonPage commonPage);
    /**
     * 详情查询
     */
    R selectDetail(Long id);
    /**
     * 详情查询脱敏
     */
    R selectDetailDesensitize(Long id);
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/impl/ComPropertyRepairServiceImpl.java
@@ -9,14 +9,13 @@
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.property.ComPropertyRepairVO;
import com.panzhihua.common.utlis.RSAUtils;
import com.panzhihua.service_property.entity.ComPropertyRepair;
import com.panzhihua.service_property.dao.ComPropertyRepairDao;
import com.panzhihua.service_property.entity.ComPropertyRepair;
import com.panzhihua.service_property.service.ComPropertyRepairService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
 * (ComPropertyRepair)表服务实现类
@@ -29,23 +28,42 @@
public class ComPropertyRepairServiceImpl extends ServiceImpl<ComPropertyRepairDao, ComPropertyRepair> implements ComPropertyRepairService {
    @Resource
    private ComPropertyRepairDao comPropertyRepairDao;
    @Override
    public R pageList(CommonPage commonPage) {
//        try {
//            commonPage.setUsername(RSAUtils.decrypt(commonPage.getUsername(), Constants.PRIVATE_KEY));
//            commonPage.setPhone(RSAUtils.decrypt(commonPage.getPhone(), Constants.PRIVATE_KEY));
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
        IPage<ComPropertyRepairVO> list=comPropertyRepairDao.pageList(new Page(commonPage.getPage(), commonPage.getSize()),commonPage);
        IPage<ComPropertyRepairVO> list = comPropertyRepairDao.pageList(new Page(commonPage.getPage(), commonPage.getSize()), commonPage);
        return R.ok(list);
    }
    @Override
    public R pageListDesensitize(CommonPage commonPage) {
        try {
            commonPage.setUsername(RSAUtils.decrypt(commonPage.getUsername(), Constants.PRIVATE_KEY));
            commonPage.setPhone(RSAUtils.decrypt(commonPage.getPhone(), Constants.PRIVATE_KEY));
        } catch (Exception e) {
            e.printStackTrace();
        }
        IPage<ComPropertyRepairVO> list = comPropertyRepairDao.pageList(new Page(commonPage.getPage(), commonPage.getSize()), commonPage);
        for (ComPropertyRepairVO record : list.getRecords()) {
            record.setRepairName(DesensitizedUtil.mobilePhone(record.getRepairPhone()));
            record.setRepairName(DesensitizedUtil.chineseName(record.getRepairName()));
            record.setFeedback(DesensitizedUtil.chineseName(record.getFeedback()));
        }
        return R.ok(list);
    }
    @Override
    public R selectDetail(Long id) {
        ComPropertyRepairVO vo = comPropertyRepairDao.selectDetail(id);
        return R.ok(vo);
    }
    @Override
    public R selectDetailDesensitize(Long id) {
        ComPropertyRepairVO vo = comPropertyRepairDao.selectDetail(id);
        vo.setRepairPhone(DesensitizedUtil.mobilePhone(vo.getRepairPhone()));
        vo.setRepairName(DesensitizedUtil.chineseName(vo.getRepairName()));
        vo.setFeedback(DesensitizedUtil.chineseName(vo.getFeedback()));
        return R.ok(vo);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java
@@ -1517,4 +1517,9 @@
        return userService.myFeedBack(id,type);
    }
    @GetMapping("/propertyCheck")
    public R propertyCheck(@RequestParam String phone){
        return userService.propertyCheck(phone);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/UserService.java
@@ -969,4 +969,9 @@
     * 查看我的问题留言或者问题留言记录
     * */
    R myFeedBack(Long id,Integer type);
    /**
     * 是否为物业公司登录
     * */
    R propertyCheck(String phone);
}
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -371,6 +371,13 @@
                loginUserInfoVO.setIsDpcMember(1);
            }
        }
        //是否为物业公司账号
        if (nonNull(sysUserDO.getPhone())){
            Long propertyAccount = userDao.isPropertyAccount(sysUserDO.getPhone());
            if (nonNull(propertyAccount)){
                loginUserInfoVO.setPropertyId(propertyAccount);
            }
        }
        return R.ok(loginUserInfoVO);
    }
@@ -523,6 +530,13 @@
            int i = userDao.isDpcMember(phone, sysUserDO.getName());
            if (i>0){
                loginUserInfoVO.setIsDpcMember(1);
            }
        }
        //是否为物业公司账号
        if (nonNull(sysUserDO.getPhone())){
            Long propertyAccount = userDao.isPropertyAccount(sysUserDO.getPhone());
            if (nonNull(propertyAccount)){
                loginUserInfoVO.setPropertyId(propertyAccount);
            }
        }
        return R.ok(loginUserInfoVO);
@@ -1364,6 +1378,7 @@
        log.info("======================type"+administratorsUserVO.getType());
        if (administratorsUserVO.getType().equals(20)){
            roleId=1559112102373756548L;
            administratorsUserVO.setType(3);
        }
        log.info("=======================roleId"+roleId);
        SysRoleDO roleDO = roleDAO.selectById(roleId);
@@ -3973,6 +3988,16 @@
        return R.ok(sysUserFeedbackDOS);
    }
    @Override
    public R propertyCheck(String phone) {
        Long propertyAccount = userDao.isPropertyAccount(phone);
        log.info("==============物业公司id"+propertyAccount);
        if (isNull(propertyAccount)){
            return R.fail();
        }
        return R.ok(propertyAccount);
    }
    @Override
    public R getAreaAndStreet() {