Browse Source

Merge remote-tracking branch 'origin/feature/lc_volunteerBanner' into feature/syp_special_user

# Conflicts:
#	esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/CustomFeignClient.java
#	esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/CustomFeignClientFallback.java
#	esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/CustomService.java
#	esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java
feature/syp_points
songyunpeng 5 years ago
parent
commit
115e5d9875
  1. 13
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAppActInfoController.java
  2. 56
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiCustomInfoController.java
  3. 13
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/ActInfoFeignClient.java
  4. 35
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/CustomFeignClient.java
  5. 5
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/ActInfoFeignClientFallback.java
  6. 15
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/CustomFeignClientFallback.java
  7. 9
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/ActInfoService.java
  8. 33
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/CustomService.java
  9. 5
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/ActInfoServiceImpl.java
  10. 41
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java
  11. 15
      esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/constant/CustomImageConstant.java
  12. 86
      esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/CustomImgDTO.java
  13. 156
      esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/ReportIssueDTO.java
  14. 39
      esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/ReportIssueListFormDTO.java
  15. 31
      esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/ReportIssueShieldFormDTO.java
  16. 100
      esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/ReportIssueSubmitFormDTO.java
  17. 50
      esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/ReportIssueResultDTO.java
  18. 71
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/controller/AppReportIssueController.java
  19. 94
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/controller/CustomImgController.java
  20. 109
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/controller/ReportIssueController.java
  21. 33
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/dao/CustomImgDao.java
  22. 57
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/dao/ReportIssueDao.java
  23. 54
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/entity/CustomImgEntity.java
  24. 124
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/entity/ReportIssueEntity.java
  25. 65
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/excel/CustomImgExcel.java
  26. 101
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/excel/ReportIssueExcel.java
  27. 47
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/redis/CustomImgRedis.java
  28. 47
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/redis/ReportIssueRedis.java
  29. 107
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/service/CustomImgService.java
  30. 140
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/service/ReportIssueService.java
  31. 119
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/service/impl/CustomImgServiceImpl.java
  32. 164
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/service/impl/ReportIssueServiceImpl.java
  33. 20
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/reportissue/CustomImgDao.xml
  34. 64
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/reportissue/ReportIssueDao.xml
  35. 5
      esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActBannerDTO.java
  36. 33
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/EpdcActBannerController.java
  37. 11
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActBannerDao.java
  38. 5
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActBannerEntity.java
  39. 11
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActBannerService.java
  40. 6
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActBannerServiceImpl.java
  41. 24
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActBannerDao.xml

13
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAppActInfoController.java

@ -114,4 +114,17 @@ public class ApiAppActInfoController {
public Result<List<ActBannerDTO>> bannerList(EpdcAppBannerFormDTO dto) {
return actInfoService.getBannerList(dto);
}
/**
* 志愿者banner详情
*
* @param id
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.activity.ActBannerDTO>
* @author Liuchuang
* @since 2020/11/5 10:57
*/
@GetMapping("banner/detail/{id}")
public Result<ActBannerDTO> bannerDetail(@PathVariable String id) {
return actInfoService.getBannerDetail(id);
}
}

56
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiCustomInfoController.java

@ -1,16 +1,14 @@
package com.elink.esua.epdc.controller;
import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.annotation.LoginUser;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.form.ArchiveDeptFormDTO;
import com.elink.esua.epdc.dto.form.ArchiveFormDTO;
import com.elink.esua.epdc.dto.form.EpdcDeptInfoFormDTO;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.dto.form.*;
import com.elink.esua.epdc.dto.result.*;
import com.elink.esua.epdc.service.CustomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -103,4 +101,48 @@ public class ApiCustomInfoController {
public Result<ArchiveDetailResultDTO> getArchiveDetail(@PathVariable("id") String id) {
return customService.getArchiveDetail(id);
}
/**
* 用户举报问题提交
*
* @param formDto 提交信息
* @return com.elink.esua.epdc.commons.tools.utils.Result
* @author Liuchuang
* @since 2020/10/22 17:58
*/
@PostMapping("reportissue/submit")
public Result reportIssueSubmit(@RequestBody ReportIssueSubmitFormDTO formDto, @LoginUser TokenDto tokenDto) {
ValidatorUtils.validateEntity(formDto);
return customService.reportIssueSubmit(formDto, tokenDto);
}
/**
* 用户举报问题列表
*
* @param formDto 参数
* @param tokenDto 用户信息
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.result.ReportIssueResultDTO>>
* @author Liuchuang
* @since 2020/10/23 11:03
*/
@GetMapping("reportissue/list")
public Result<List<ReportIssueResultDTO>> reportIssueList(ReportIssueListFormDTO formDto, @LoginUser TokenDto tokenDto) {
ValidatorUtils.validateEntity(formDto);
return customService.listReportIssue(formDto, tokenDto);
}
/**
* 举报问题详情
*
* @param id 记录ID
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.ReportIssueResultDTO>
* @author Liuchuang
* @since 2020/10/23 10:39
*/
@GetMapping("reportissue/detail/{id}")
public Result<ReportIssueResultDTO> reportIssueDetail(@PathVariable("id") String id) {
return customService.getReportIssueById(id);
}
}

13
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/ActInfoFeignClient.java

@ -62,7 +62,7 @@ public interface ActInfoFeignClient {
@GetMapping(value = "heart/appactinfo/canceldetail/{id}", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<ActInfoDetailAppResultDTO> getCancelDetail(@PathVariable String id);
@GetMapping(value = "heart/actbanner/bannerlist", consumes = MediaType.APPLICATION_JSON_VALUE)
@GetMapping(value = "heart/epdc-app/actbanner/list", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<List<ActBannerDTO>> getBannerList(EpdcAppBannerFormDTO dto);
/**
@ -76,4 +76,15 @@ public interface ActInfoFeignClient {
@GetMapping(value = "heart/appactinfo/unreadactnums", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<Integer> getUserUnreadSignUpActCount(String userId);
/**
* 志愿者banner详情
*
* @param id
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.activity.ActBannerDTO>>
* @author Liuchuang
* @since 2020/11/5 10:34
*/
@GetMapping(value = "heart/epdc-app/actbanner/detail/{id}", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<ActBannerDTO> getBannerDetail(@PathVariable("id") String id);
}

35
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/CustomFeignClient.java

@ -1,5 +1,7 @@
package com.elink.esua.epdc.feign;
import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.annotation.LoginUser;
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
@ -125,4 +127,37 @@ public interface CustomFeignClient {
**/
@PostMapping(value = "custom/screenSpecialUser/selectMonthlySubsidy", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<PageData<SpecialUserMonthlySubsidyResultDTO>> selectMonthlySubsidy(@RequestBody SpecialUserMonthlySubsidyFormDTO dto);
/**
* 用户举报问题提交
*
* @param formDto 提交信息
* @return com.elink.esua.epdc.commons.tools.utils.Result
* @author Liuchuang
* @since 2020/10/22 18:04
*/
@PostMapping(value = "custom/epdc-app/reportissue/submit", consumes = MediaType.APPLICATION_JSON_VALUE)
Result reportIssueSubmit(ReportIssueSubmitFormDTO formDto);
/**
* 用户举报问题列表
*
* @param formDto 参数
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.result.ReportIssueSubmitResultDTO>>
* @author Liuchuang
* @since 2020/10/23 10:06
*/
@GetMapping(value = "custom/epdc-app/reportissue/list", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<List<ReportIssueResultDTO>> reportIssueList(ReportIssueListFormDTO formDto);
/**
* 举报问题详情
*
* @param id 记录ID
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.ReportIssueResultDTO>
* @author Liuchuang
* @since 2020/10/23 10:39
*/
@GetMapping(value = "custom/epdc-app/reportissue/detail/{id}", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<ReportIssueResultDTO> reportIssueDetail(@PathVariable("id") String id);
}

5
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/ActInfoFeignClientFallback.java

@ -52,4 +52,9 @@ public class ActInfoFeignClientFallback implements ActInfoFeignClient {
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "getUserUnreadSignUpActCount", userId);
}
@Override
public Result<ActBannerDTO> getBannerDetail(String id) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "getBannerDetail", id);
}
}

15
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/CustomFeignClientFallback.java

@ -78,4 +78,19 @@ public class CustomFeignClientFallback implements CustomFeignClient {
public Result<PageData<SpecialUserMonthlySubsidyResultDTO>> selectMonthlySubsidy(SpecialUserMonthlySubsidyFormDTO dto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "selectMonthlySubsidy", dto);
}
@Override
public Result reportIssueSubmit(ReportIssueSubmitFormDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "reportIssueSubmit", formDto);
}
@Override
public Result<List<ReportIssueResultDTO>> reportIssueList(ReportIssueListFormDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "reportIssueList", formDto);
}
@Override
public Result<ReportIssueResultDTO> reportIssueDetail(String id) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "reportIssueDetail", id);
}
}

9
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/ActInfoService.java

@ -48,5 +48,14 @@ public interface ActInfoService {
Result<List<ActBannerDTO>> getBannerList(EpdcAppBannerFormDTO dto);
/**
* 志愿者banner详情
*
* @param id
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.activity.ActBannerDTO>
* @author Liuchuang
* @since 2020/11/5 10:56
*/
Result<ActBannerDTO> getBannerDetail(String id);
}

33
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/CustomService.java

@ -1,6 +1,7 @@
package com.elink.esua.epdc.service;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.DeptOption;
import com.elink.esua.epdc.dto.form.*;
@ -129,4 +130,36 @@ public interface CustomService {
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.result.SpecialUserMonthlySubsidyResultDTO>>
**/
Result<PageData<SpecialUserMonthlySubsidyResultDTO>> selectMonthlySubsidy(SpecialUserMonthlySubsidyFormDTO dto);
/**
* 用户举报问题提交
*
* @param formDto 提交信息
* @param tokenDto 用户信息
* @return com.elink.esua.epdc.commons.tools.utils.Result
* @author Liuchuang
* @since 2020/10/22 18:01
*/
Result reportIssueSubmit(ReportIssueSubmitFormDTO formDto, TokenDto tokenDto);
/**
* 用户举报问题列表
*
* @param formDto 参数
* @param tokenDto 用户信息
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.result.ReportIssueResultDTO>>
* @author Liuchuang
* @since 2020/10/23 11:03
*/
Result<List<ReportIssueResultDTO>> listReportIssue(ReportIssueListFormDTO formDto, TokenDto tokenDto);
/**
* 举报问题详情
*
* @param id 记录ID
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.ReportIssueResultDTO>
* @author Liuchuang
* @since 2020/10/23 10:40
*/
Result<ReportIssueResultDTO> getReportIssueById(String id);
}

5
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/ActInfoServiceImpl.java

@ -51,4 +51,9 @@ public class ActInfoServiceImpl implements ActInfoService {
public Result<List<ActBannerDTO>> getBannerList(EpdcAppBannerFormDTO dto) {
return actInfoFeignClient.getBannerList(dto);
}
@Override
public Result<ActBannerDTO> getBannerDetail(String id) {
return actInfoFeignClient.getBannerDetail(id);
}
}

41
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java

@ -1,7 +1,9 @@
package com.elink.esua.epdc.service.impl;
import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.exception.RenException;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.DeptOption;
import com.elink.esua.epdc.dto.ParentAndAllDeptDTO;
@ -136,4 +138,43 @@ public class CustomServiceImpl implements CustomService {
public Result<PageData<SpecialUserMonthlySubsidyResultDTO>> selectMonthlySubsidy(SpecialUserMonthlySubsidyFormDTO dto) {
return customFeignClient.selectMonthlySubsidy(dto);
}
@Override
public Result reportIssueSubmit(ReportIssueSubmitFormDTO formDto, TokenDto tokenDto) {
if (null == tokenDto) {
return new Result().error("无效的token");
}
// 用户信息
formDto.setUserId(tokenDto.getUserId());
formDto.setRealName(tokenDto.getRealName());
formDto.setUserFace(tokenDto.getFaceImg());
formDto.setNickname(tokenDto.getNickname());
formDto.setMobile(tokenDto.getMobile());
// 机构信息
Result<ParentAndAllDeptDTO> dtoResult = adminFeignClient.getParentAndAllDept(tokenDto.getGridId());
ParentAndAllDeptDTO deptDTO = dtoResult.getData();
// 父所有部门
formDto.setParentDeptIds(deptDTO.getParentDeptIds());
formDto.setParentDeptNames(deptDTO.getParentDeptNames());
// 所有部门
formDto.setAllDeptIds(deptDTO.getAllDeptIds());
formDto.setAllDeptNames(deptDTO.getAllDeptNames());
// 网格
formDto.setDeptName(deptDTO.getGrid());
formDto.setDeptId(deptDTO.getGridId());
return customFeignClient.reportIssueSubmit(formDto);
}
@Override
public Result<List<ReportIssueResultDTO>> listReportIssue(ReportIssueListFormDTO formDto, TokenDto tokenDto) {
formDto.setUserId(tokenDto.getUserId());
return customFeignClient.reportIssueList(formDto);
}
@Override
public Result<ReportIssueResultDTO> getReportIssueById(String id) {
return customFeignClient.reportIssueDetail(id);
}
}

15
esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/constant/CustomImageConstant.java

@ -0,0 +1,15 @@
package com.elink.esua.epdc.constant;
/**
* 定制模块图片常量
*
* @author Liuchuang
* @since 2020/10/22 17:51
*/
public interface CustomImageConstant {
/**
* 一键服务-锦水清风-举报问题
*/
String IMAGE_TYPE_YJFW_JSQF_JBWT = "yjfw_jsqf_jbwt";
}

86
esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/CustomImgDTO.java

@ -0,0 +1,86 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 定制模块图片表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
@Data
public class CustomImgDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 引用ID
*/
private String referenceId;
/**
* 图片地址
*/
private String imgUrl;
/**
* 图片类型 yjfw_jsqf_wyjb一键服务-锦水清风-我要举报
*/
private String imgType;
/**
* 删除标识 0-1-
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

156
esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/ReportIssueDTO.java

@ -0,0 +1,156 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 用户举报问题表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
@Data
public class ReportIssueDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 问题描述
*/
private String content;
/**
* 举报人
*/
private String reportUser;
/**
* 举报人联系电话
*/
private String reportUserMobile;
/**
* 是否匿名 0-1-
*/
private String anonymousFlag;
/**
* 真实姓名
*/
private String realName;
/**
* 用户ID
*/
private String userId;
/**
* 用户昵称
*/
private String nickname;
/**
* 用户头像
*/
private String userFace;
/**
* 用户电话
*/
private String mobile;
/**
* 屏蔽标识 0未屏蔽1已屏蔽
*/
private String shieldFlag;
/**
* 屏蔽原因
*/
private String shieldReason;
/**
* 所属部门ID
*/
private Long deptId;
/**
* 所属部门名称
*/
private String deptName;
/**
* 父所有部门ID
*/
private String parentDeptIds;
/**
* 父所有部门名称
*/
private String parentDeptNames;
/**
* 所有部门ID
*/
private String allDeptIds;
/**
* 所有部门名称
*/
private String allDeptNames;
/**
* 删除标识 0-1-
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

39
esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/ReportIssueListFormDTO.java

@ -0,0 +1,39 @@
package com.elink.esua.epdc.dto.form;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* 举报问题列表查询参数
*
* @author Liuchuang
* @since 2020/10/23 10:59
*/
@Data
public class ReportIssueListFormDTO implements Serializable {
private static final long serialVersionUID = 2105013928295376961L;
/**
* 页码
*/
@NotNull(message = "页码不能为空")
private Integer pageIndex;
/**
* 页容量
*/
@NotNull(message = "页容量不能为空")
private Integer pageSize;
/**
* 用户ID
*/
private String userId;
/**
* 图片类型
*/
private String imgType;
}

31
esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/ReportIssueShieldFormDTO.java

@ -0,0 +1,31 @@
package com.elink.esua.epdc.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
/**
* 屏蔽用户举报问题表单
*
* @author Liuchuang
* @since 2020/10/23 17:01
*/
@Data
public class ReportIssueShieldFormDTO implements Serializable {
private static final long serialVersionUID = -3686477439903152467L;
/**
* 举报问题ID
*/
@NotBlank(message = "记录ID不能为空")
private String id;
/**
* 屏蔽原因
*/
@NotBlank(message = "屏蔽原因不能为空")
@Size(min = 1, max = 100, message = "屏蔽原因不能为空且在100个字以内")
private String shieldReason;
}

100
esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/ReportIssueSubmitFormDTO.java

@ -0,0 +1,100 @@
package com.elink.esua.epdc.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;
/**
* 用户举报问题提交表单
*
* @author Liuchuang
* @since 2020/10/22 17:12
*/
@Data
public class ReportIssueSubmitFormDTO implements Serializable {
private static final long serialVersionUID = -4805817350334564137L;
/**
* 问题描述500字符以内
*/
@NotBlank(message = "问题描述不能为空")
@Size(min = 1, max = 500, message = "问题描述不能为空且在500个字以内")
private String content;
/**
* 是否匿名0-1-
*/
@NotBlank(message = "是否匿名不能为空")
private String anonymousFlag;
/**
* 举报人
*/
@Size(max = 20, message = "举报人信息超出字数限制")
private String reportUser;
/**
* 举报人电话
*/
@Size(max = 20, message = "举报人电话超出字数限制")
private String reportUserMobile;
/**
* 图片
*/
private List<String> images;
/**
* 用户ID
*/
private String userId;
/**
* 昵称
*/
private String nickname;
/**
* 用户头像
*/
private String userFace;
/**
* 手机号
*/
private String mobile;
/**
* 真实姓名
*/
private String realName;
/**
* 部门名称
*/
private String deptName;
/**
* 部门ID
*/
private Long deptId;
/**
* 父所有部门ID
*/
private String parentDeptIds;
/**
* 父所有部门
*/
private String parentDeptNames;
/**
* 所有部门ID
*/
private String allDeptIds;
/**
* 所有部门
*/
private String allDeptNames;
}

50
esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/ReportIssueResultDTO.java

@ -0,0 +1,50 @@
package com.elink.esua.epdc.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 用户举报问题
*
* @author Liuchuang
* @since 2020/10/22 17:12
*/
@Data
public class ReportIssueResultDTO implements Serializable {
private static final long serialVersionUID = -4805817350334564137L;
private String id;
/**
* 问题描述
*/
private String content;
/**
* 是否匿名
*/
private String anonymousFlag;
/**
* 举报人
*/
private String reportUser;
/**
* 举报人电话
*/
private String reportUserMobile;
/**
* 提交时间
*/
private Date createdTime;
/**
* 图片
*/
private List<String> images;
}

71
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/controller/AppReportIssueController.java

@ -0,0 +1,71 @@
package com.elink.esua.epdc.modules.reportissue.controller;
import com.elink.esua.epdc.commons.tools.constant.Constant;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.dto.form.ReportIssueListFormDTO;
import com.elink.esua.epdc.dto.form.ReportIssueSubmitFormDTO;
import com.elink.esua.epdc.dto.result.ReportIssueResultDTO;
import com.elink.esua.epdc.modules.reportissue.service.ReportIssueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 用户举报问题-移动端接口
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
@RestController
@RequestMapping(Constant.EPDC_APP + "reportissue")
public class AppReportIssueController {
@Autowired
private ReportIssueService reportIssueService;
/**
* 用户举报问题提交
*
* @param formDto 提交信息
* @return com.elink.esua.epdc.commons.tools.utils.Result
* @author Liuchuang
* @since 2020/10/22 17:28
*/
@PostMapping("submit")
public Result reportIssueSubmit(@RequestBody ReportIssueSubmitFormDTO formDto) {
ValidatorUtils.validateEntity(formDto);
return reportIssueService.saveReportIssue(formDto);
}
/**
* 用户举报问题列表
*
* @param formDto 参数
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.result.ReportIssueSubmitResultDTO>>
* @author Liuchuang
* @since 2020/10/23 10:06
*/
@GetMapping("list")
public Result<List<ReportIssueResultDTO>> reportIssueList(@RequestBody ReportIssueListFormDTO formDto) {
List<ReportIssueResultDTO> data = reportIssueService.listReportIssue(formDto);
return new Result<List<ReportIssueResultDTO>>().ok(data);
}
/**
* 举报问题详情
*
* @param id 记录ID
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.ReportIssueResultDTO>
* @author Liuchuang
* @since 2020/10/23 10:39
*/
@GetMapping("detail/{id}")
public Result<ReportIssueResultDTO> reportIssueDetail(@PathVariable("id") String id) {
ReportIssueResultDTO data = reportIssueService.getReportIssueById(id);
return new Result<ReportIssueResultDTO>().ok(data);
}
}

94
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/controller/CustomImgController.java

@ -0,0 +1,94 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.reportissue.controller;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.dto.CustomImgDTO;
import com.elink.esua.epdc.modules.reportissue.excel.CustomImgExcel;
import com.elink.esua.epdc.modules.reportissue.service.CustomImgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 定制模块图片表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
@RestController
@RequestMapping("customimg")
public class CustomImgController {
@Autowired
private CustomImgService customImgService;
@GetMapping("page")
public Result<PageData<CustomImgDTO>> page(@RequestParam Map<String, Object> params){
PageData<CustomImgDTO> page = customImgService.page(params);
return new Result<PageData<CustomImgDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<CustomImgDTO> get(@PathVariable("id") String id){
CustomImgDTO data = customImgService.get(id);
return new Result<CustomImgDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody CustomImgDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
customImgService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody CustomImgDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
customImgService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
customImgService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<CustomImgDTO> list = customImgService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, CustomImgExcel.class);
}
}

109
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/controller/ReportIssueController.java

@ -0,0 +1,109 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.reportissue.controller;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.dto.ReportIssueDTO;
import com.elink.esua.epdc.dto.form.ReportIssueShieldFormDTO;
import com.elink.esua.epdc.modules.reportissue.excel.ReportIssueExcel;
import com.elink.esua.epdc.modules.reportissue.service.ReportIssueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 用户举报问题表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
@RestController
@RequestMapping("reportissue")
public class ReportIssueController {
@Autowired
private ReportIssueService reportIssueService;
@GetMapping("page")
public Result<PageData<ReportIssueDTO>> page(@RequestParam Map<String, Object> params){
PageData<ReportIssueDTO> page = reportIssueService.page(params);
return new Result<PageData<ReportIssueDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<ReportIssueDTO> get(@PathVariable("id") String id){
ReportIssueDTO data = reportIssueService.get(id);
return new Result<ReportIssueDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody ReportIssueDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
reportIssueService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody ReportIssueDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
reportIssueService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
reportIssueService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<ReportIssueDTO> list = reportIssueService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, ReportIssueExcel.class);
}
/**
* 屏蔽举报问题
*
* @param formDto 屏蔽提交信息
* @return com.elink.esua.epdc.commons.tools.utils.Result
* @author Liuchuang
* @since 2020/10/23 16:41
*/
@PostMapping("shield")
public Result shieldReportIssue(@RequestBody ReportIssueShieldFormDTO formDto) {
ValidatorUtils.validateEntity(formDto);
return reportIssueService.modifyReportIssueShieldFlag(formDto);
}
}

33
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/dao/CustomImgDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.reportissue.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.modules.reportissue.entity.CustomImgEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 定制模块图片表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
@Mapper
public interface CustomImgDao extends BaseDao<CustomImgEntity> {
}

57
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/dao/ReportIssueDao.java

@ -0,0 +1,57 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.reportissue.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.dto.form.ReportIssueListFormDTO;
import com.elink.esua.epdc.dto.result.ReportIssueResultDTO;
import com.elink.esua.epdc.modules.reportissue.entity.ReportIssueEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 用户举报问题表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
@Mapper
public interface ReportIssueDao extends BaseDao<ReportIssueEntity> {
/**
* 用户举报问题列表
*
* @param formDto 参数
* @return java.util.List<com.elink.esua.epdc.dto.result.ReportIssueResultDTO>
* @author Liuchuang
* @since 2020/10/23 11:08
*/
List<ReportIssueResultDTO> selectListReportIssue(ReportIssueListFormDTO formDto);
/**
* 举报问题详情
*
* @param id 记录ID
* @return com.elink.esua.epdc.dto.result.ReportIssueResultDTO
* @author Liuchuang
* @since 2020/10/23 16:23
*/
ReportIssueResultDTO selectOneReportIssue(String id);
}

54
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/entity/CustomImgEntity.java

@ -0,0 +1,54 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.reportissue.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 定制模块图片表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("epdc_custom_img")
public class CustomImgEntity extends BaseEpdcEntity {
private static final long serialVersionUID = 1L;
/**
* 引用ID
*/
private String referenceId;
/**
* 图片地址
*/
private String imgUrl;
/**
* 图片类型 yjfw_jsqf_wyjb一键服务-锦水清风-我要举报
*/
private String imgType;
}

124
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/entity/ReportIssueEntity.java

@ -0,0 +1,124 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.reportissue.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 用户举报问题表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("epdc_report_issue")
public class ReportIssueEntity extends BaseEpdcEntity {
private static final long serialVersionUID = 1L;
/**
* 问题描述
*/
private String content;
/**
* 举报人
*/
private String reportUser;
/**
* 举报人联系电话
*/
private String reportUserMobile;
/**
* 是否匿名 0-1-
*/
private String anonymousFlag;
/**
* 真实姓名
*/
private String realName;
/**
* 用户ID
*/
private String userId;
/**
* 用户昵称
*/
private String nickname;
/**
* 用户头像
*/
private String userFace;
/**
* 用户电话
*/
private String mobile;
/**
* 屏蔽标识 0未屏蔽1已屏蔽
*/
private String shieldFlag;
/**
* 屏蔽原因
*/
private String shieldReason;
/**
* 所属部门ID
*/
private Long deptId;
/**
* 所属部门名称
*/
private String deptName;
/**
* 父所有部门ID
*/
private String parentDeptIds;
/**
* 父所有部门名称
*/
private String parentDeptNames;
/**
* 所有部门ID
*/
private String allDeptIds;
/**
* 所有部门名称
*/
private String allDeptNames;
}

65
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/excel/CustomImgExcel.java

@ -0,0 +1,65 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.reportissue.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 定制模块图片表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
@Data
public class CustomImgExcel {
@Excel(name = "主键")
private String id;
@Excel(name = "引用ID")
private String referenceId;
@Excel(name = "图片地址")
private String imgUrl;
@Excel(name = "图片类型 yjfw_jsqf_wyjb:一键服务-锦水清风-我要举报")
private String imgType;
@Excel(name = "删除标识 0-否,1-是")
private String delFlag;
@Excel(name = "乐观锁")
private Integer revision;
@Excel(name = "创建人")
private String createdBy;
@Excel(name = "创建时间")
private Date createdTime;
@Excel(name = "更新人")
private String updatedBy;
@Excel(name = "更新时间")
private Date updatedTime;
}

101
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/excel/ReportIssueExcel.java

@ -0,0 +1,101 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.reportissue.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 用户举报问题表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
@Data
public class ReportIssueExcel {
@Excel(name = "主键")
private String id;
@Excel(name = "问题描述")
private String content;
@Excel(name = "举报人")
private String reportUser;
@Excel(name = "举报人联系电话")
private String reportUserMobile;
@Excel(name = "是否匿名 0-否,1-是")
private String anonymousFlag;
@Excel(name = "真实姓名")
private String realName;
@Excel(name = "用户ID")
private String userId;
@Excel(name = "用户昵称")
private String nickname;
@Excel(name = "用户头像")
private String userFace;
@Excel(name = "用户电话")
private String mobile;
@Excel(name = "所属部门ID")
private Long deptId;
@Excel(name = "所属部门名称")
private String deptName;
@Excel(name = "父所有部门ID")
private String parentDeptIds;
@Excel(name = "父所有部门名称")
private String parentDeptNames;
@Excel(name = "所有部门ID")
private String allDeptIds;
@Excel(name = "所有部门名称")
private String allDeptNames;
@Excel(name = "删除标识 0-否,1-是")
private String delFlag;
@Excel(name = "乐观锁")
private Integer revision;
@Excel(name = "创建人")
private String createdBy;
@Excel(name = "创建时间")
private Date createdTime;
@Excel(name = "更新人")
private String updatedBy;
@Excel(name = "更新时间")
private Date updatedTime;
}

47
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/redis/CustomImgRedis.java

@ -0,0 +1,47 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.reportissue.redis;
import com.elink.esua.epdc.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 定制模块图片表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
@Component
public class CustomImgRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

47
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/redis/ReportIssueRedis.java

@ -0,0 +1,47 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.reportissue.redis;
import com.elink.esua.epdc.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 用户举报问题表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
@Component
public class ReportIssueRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

107
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/service/CustomImgService.java

@ -0,0 +1,107 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.reportissue.service;
import com.elink.esua.epdc.commons.mybatis.service.BaseService;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.dto.CustomImgDTO;
import com.elink.esua.epdc.modules.reportissue.entity.CustomImgEntity;
import java.util.List;
import java.util.Map;
/**
* 定制模块图片表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
public interface CustomImgService extends BaseService<CustomImgEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<CustomImgDTO>
* @author generator
* @date 2020-10-22
*/
PageData<CustomImgDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<CustomImgDTO>
* @author generator
* @date 2020-10-22
*/
List<CustomImgDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return CustomImgDTO
* @author generator
* @date 2020-10-22
*/
CustomImgDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2020-10-22
*/
void save(CustomImgDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2020-10-22
*/
void update(CustomImgDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2020-10-22
*/
void delete(String[] ids);
/**
* 保存图片
*
* @param images 图片
* @param referenceId 引用ID
* @param imgType 图片类型
* @return boolean
* @author Liuchuang
* @since 2020/10/22 17:42
*/
boolean saveImages(List<String> images, String referenceId, String imgType);
}

140
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/service/ReportIssueService.java

@ -0,0 +1,140 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.reportissue.service;
import com.elink.esua.epdc.commons.mybatis.service.BaseService;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.ReportIssueDTO;
import com.elink.esua.epdc.dto.form.ReportIssueListFormDTO;
import com.elink.esua.epdc.dto.form.ReportIssueShieldFormDTO;
import com.elink.esua.epdc.dto.form.ReportIssueSubmitFormDTO;
import com.elink.esua.epdc.dto.result.ReportIssueResultDTO;
import com.elink.esua.epdc.modules.reportissue.entity.ReportIssueEntity;
import java.util.List;
import java.util.Map;
/**
* 用户举报问题表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
public interface ReportIssueService extends BaseService<ReportIssueEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<ReportIssueDTO>
* @author generator
* @date 2020-10-22
*/
PageData<ReportIssueDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<ReportIssueDTO>
* @author generator
* @date 2020-10-22
*/
List<ReportIssueDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return ReportIssueDTO
* @author generator
* @date 2020-10-22
*/
ReportIssueDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2020-10-22
*/
void save(ReportIssueDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2020-10-22
*/
void update(ReportIssueDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2020-10-22
*/
void delete(String[] ids);
/**
* 保存用户举报问题
*
* @param formDto 提交信息
* @return com.elink.esua.epdc.commons.tools.utils.Result
* @author Liuchuang
* @since 2020/10/22 17:32
*/
Result saveReportIssue(ReportIssueSubmitFormDTO formDto);
/**
* 用户举报问题列表
*
* @param formDto 参数
* @return java.util.List<com.elink.esua.epdc.dto.result.ReportIssueSubmitResultDTO>
* @author Liuchuang
* @since 2020/10/23 10:06
*/
List<ReportIssueResultDTO> listReportIssue(ReportIssueListFormDTO formDto);
/**
* 举报问题详情
*
* @param id 记录ID
* @return com.elink.esua.epdc.dto.result.ReportIssueResultDTO
* @author Liuchuang
* @since 2020/10/23 10:40
*/
ReportIssueResultDTO getReportIssueById(String id);
/**
* 屏蔽举报问题
*
* @param formDto 屏蔽提交信息
* @return com.elink.esua.epdc.commons.tools.utils.Result
* @author Liuchuang
* @since 2020/10/23 16:41
*/
Result modifyReportIssueShieldFlag(ReportIssueShieldFormDTO formDto);
}

119
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/service/impl/CustomImgServiceImpl.java

@ -0,0 +1,119 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.reportissue.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.dto.CustomImgDTO;
import com.elink.esua.epdc.modules.reportissue.dao.CustomImgDao;
import com.elink.esua.epdc.modules.reportissue.entity.CustomImgEntity;
import com.elink.esua.epdc.modules.reportissue.service.CustomImgService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 定制模块图片表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
@Service
public class CustomImgServiceImpl extends BaseServiceImpl<CustomImgDao, CustomImgEntity> implements CustomImgService {
@Override
public PageData<CustomImgDTO> page(Map<String, Object> params) {
IPage<CustomImgEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, CustomImgDTO.class);
}
@Override
public List<CustomImgDTO> list(Map<String, Object> params) {
List<CustomImgEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, CustomImgDTO.class);
}
private QueryWrapper<CustomImgEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<CustomImgEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public CustomImgDTO get(String id) {
CustomImgEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, CustomImgDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(CustomImgDTO dto) {
CustomImgEntity entity = ConvertUtils.sourceToTarget(dto, CustomImgEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(CustomImgDTO dto) {
CustomImgEntity entity = ConvertUtils.sourceToTarget(dto, CustomImgEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@Override
@Transactional(rollbackFor = Exception.class)
public boolean saveImages(List<String> images, String referenceId, String imgType) {
if (images.isEmpty()) {
return true;
}
List<CustomImgEntity> entities = new ArrayList<>();
for (String imgUrl:
images) {
CustomImgEntity entity = new CustomImgEntity();
entity.setReferenceId(referenceId);
entity.setImgType(imgType);
entity.setImgUrl(imgUrl);
entities.add(entity);
}
return insertBatch(entities);
}
}

164
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/service/impl/ReportIssueServiceImpl.java

@ -0,0 +1,164 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.reportissue.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
import com.elink.esua.epdc.commons.tools.constant.NumConstant;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.constant.CustomImageConstant;
import com.elink.esua.epdc.dto.ReportIssueDTO;
import com.elink.esua.epdc.dto.form.ReportIssueListFormDTO;
import com.elink.esua.epdc.dto.form.ReportIssueShieldFormDTO;
import com.elink.esua.epdc.dto.form.ReportIssueSubmitFormDTO;
import com.elink.esua.epdc.dto.result.ReportIssueResultDTO;
import com.elink.esua.epdc.modules.reportissue.dao.ReportIssueDao;
import com.elink.esua.epdc.modules.reportissue.entity.ReportIssueEntity;
import com.elink.esua.epdc.modules.reportissue.service.CustomImgService;
import com.elink.esua.epdc.modules.reportissue.service.ReportIssueService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 用户举报问题表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
@Service
public class ReportIssueServiceImpl extends BaseServiceImpl<ReportIssueDao, ReportIssueEntity> implements ReportIssueService {
@Autowired
private CustomImgService customImgService;
@Override
public PageData<ReportIssueDTO> page(Map<String, Object> params) {
// 检索条件
String content = "";
if (null != params && null != params.get("content")) {
content = (String)params.get("content");
}
String anonymousFlag = (String)params.get("anonymousFlag");
String startTime = (String)params.get("startTime");
String endTime = (String)params.get("endTime");
QueryWrapper<ReportIssueEntity> wrapper = new QueryWrapper<>();
wrapper.like(StringUtils.isNotBlank(content), "CONTENT", content.trim());
wrapper.eq(StringUtils.isNotBlank(anonymousFlag), "ANONYMOUS_FLAG", anonymousFlag);
wrapper.ge(StringUtils.isNotBlank(startTime), "DATE_FORMAT(CREATED_TIME, '%Y-%m-%d' )", startTime);
wrapper.le(StringUtils.isNotBlank(endTime), "DATE_FORMAT(CREATED_TIME, '%Y-%m-%d' )", endTime);
wrapper.eq(FieldConstant.DEL_FLAG, NumConstant.ZERO_STR);
IPage<ReportIssueEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
wrapper
);
return getPageData(page, ReportIssueDTO.class);
}
@Override
public List<ReportIssueDTO> list(Map<String, Object> params) {
List<ReportIssueEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, ReportIssueDTO.class);
}
private QueryWrapper<ReportIssueEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<ReportIssueEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public ReportIssueDTO get(String id) {
ReportIssueEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, ReportIssueDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(ReportIssueDTO dto) {
ReportIssueEntity entity = ConvertUtils.sourceToTarget(dto, ReportIssueEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(ReportIssueDTO dto) {
ReportIssueEntity entity = ConvertUtils.sourceToTarget(dto, ReportIssueEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@Override
@Transactional(rollbackFor = Exception.class)
public Result saveReportIssue(ReportIssueSubmitFormDTO formDto) {
ReportIssueEntity entity = ConvertUtils.sourceToTarget(formDto, ReportIssueEntity.class);
if (insert(entity)) {
// 保存图片
customImgService.saveImages(formDto.getImages(), entity.getId(), CustomImageConstant.IMAGE_TYPE_YJFW_JSQF_JBWT);
}
return new Result();
}
@Override
public List<ReportIssueResultDTO> listReportIssue(ReportIssueListFormDTO formDto) {
int pageIndex = (formDto.getPageIndex() - NumConstant.ONE) * formDto.getPageSize();
formDto.setPageIndex(pageIndex);
return baseDao.selectListReportIssue(formDto);
}
@Override
public ReportIssueResultDTO getReportIssueById(String id) {
return baseDao.selectOneReportIssue(id);
}
@Override
@Transactional(rollbackFor = Exception.class)
public Result modifyReportIssueShieldFlag(ReportIssueShieldFormDTO formDto) {
ReportIssueEntity entity = new ReportIssueEntity();
entity.setId(formDto.getId());
entity.setShieldReason(formDto.getShieldReason());
entity.setShieldFlag(NumConstant.ONE_STR);
updateById(entity);
return new Result();
}
}

20
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/reportissue/CustomImgDao.xml

@ -0,0 +1,20 @@
<?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.elink.esua.epdc.modules.reportissue.dao.CustomImgDao">
<resultMap type="com.elink.esua.epdc.modules.reportissue.entity.CustomImgEntity" id="customImgMap">
<result property="id" column="ID"/>
<result property="referenceId" column="REFERENCE_ID"/>
<result property="imgUrl" column="IMG_URL"/>
<result property="imgType" column="IMG_TYPE"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

64
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/reportissue/ReportIssueDao.xml

@ -0,0 +1,64 @@
<?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.elink.esua.epdc.modules.reportissue.dao.ReportIssueDao">
<resultMap type="com.elink.esua.epdc.dto.result.ReportIssueResultDTO" id="reportIssueMap">
<result property="id" column="ID"/>
<result property="content" column="CONTENT"/>
<result property="reportUser" column="REPORT_USER"/>
<result property="reportUserMobile" column="REPORT_USER_MOBILE"/>
<result property="anonymousFlag" column="ANONYMOUS_FLAG"/>
<result property="createdTime" column="CREATED_TIME"/>
<collection property="images" ofType="java.lang.String">
<result property="image" column="IMG_URL"/>
</collection>
</resultMap>
<select id="selectListReportIssue" resultMap="reportIssueMap">
SELECT
ri.ID,
ri.CONTENT,
ri.ANONYMOUS_FLAG,
ri.REPORT_USER,
ri.REPORT_USER_MOBILE,
ri.CREATED_TIME,
ci.IMG_URL
FROM
epdc_report_issue ri
LEFT JOIN epdc_custom_img ci ON ci.REFERENCE_ID = ri.ID
AND ci.DEL_FLAG = '0'
WHERE
ri.ID IN (
SELECT
t.ID
FROM
( SELECT ID FROM epdc_report_issue WHERE DEL_FLAG = '0' AND SHIELD_FLAG = '0' AND USER_ID = #{userId} ORDER BY CREATED_TIME DESC LIMIT #{pageIndex},#{pageSize} ) t
)
ORDER BY
ri.CREATED_TIME DESC,
ci.IMG_URL
</select>
<select id="selectOneReportIssue" resultMap="reportIssueMap">
SELECT
ri.ID,
ri.CONTENT,
ri.ANONYMOUS_FLAG,
ri.REPORT_USER,
ri.REPORT_USER_MOBILE,
ri.CREATED_TIME,
ci.IMG_URL
FROM
epdc_report_issue ri
LEFT JOIN epdc_custom_img ci ON ci.REFERENCE_ID = ri.ID
AND ci.DEL_FLAG = '0'
WHERE
ri.DEL_FLAG = '0'
AND ri.SHIELD_FLAG = '0'
AND ri.ID = #{id}
ORDER BY
ci.IMG_URL
</select>
</mapper>

5
esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActBannerDTO.java

@ -102,4 +102,9 @@ public class ActBannerDTO implements Serializable {
* banner排序
*/
private String sort;
/**
* 内容
*/
private String content;
}

33
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/EpdcActBannerController.java

@ -17,7 +17,9 @@
package com.elink.esua.epdc.modules.activity.controller;
import com.elink.esua.epdc.activity.ActBannerDTO;
import com.elink.esua.epdc.activity.form.EpdcAppActBannerFormDTO;
import com.elink.esua.epdc.activity.form.EpdcAppBannerFormDTO;
import com.elink.esua.epdc.activity.result.EpdcAppActBannerResultDTO;
import com.elink.esua.epdc.commons.tools.constant.Constant;
import com.elink.esua.epdc.commons.tools.utils.Result;
@ -26,7 +28,9 @@ import com.elink.esua.epdc.modules.activity.service.ActBannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController
@ -44,9 +48,38 @@ public class EpdcActBannerController {
* @Author zhangyong
* @Date 18:27 2020-05-25
**/
@Deprecated
@GetMapping("banner/list")
public Result<List<EpdcAppActBannerResultDTO>> bannerList(@RequestBody EpdcAppActBannerFormDTO formDto) {
ValidatorUtils.validateEntity(formDto);
return actBannerService.getBannerList(formDto);
}
/**
* 志愿者banner列表
*
* @param formDto
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.activity.ActBannerDTO>>
* @author Liuchuang
* @since 2020/11/5 10:20
*/
@GetMapping("list")
public Result<List<ActBannerDTO>> getBannerList(@RequestBody EpdcAppBannerFormDTO formDto){
List<ActBannerDTO> data = actBannerService.listBanners(formDto);
return new Result<List<ActBannerDTO>>().ok(data);
}
/**
* 志愿者banner详情
*
* @param id
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.activity.ActBannerDTO>
* @author Liuchuang
* @since 2020/11/5 10:33
*/
@GetMapping("detail/{id}")
public Result<ActBannerDTO> getBannerDetail(@PathVariable("id") String id){
ActBannerDTO data = actBannerService.get(id);
return new Result<ActBannerDTO>().ok(data);
}
}

11
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActBannerDao.java

@ -19,6 +19,7 @@ package com.elink.esua.epdc.modules.activity.dao;
import com.elink.esua.epdc.activity.ActBannerDTO;
import com.elink.esua.epdc.activity.form.EpdcAppActBannerFormDTO;
import com.elink.esua.epdc.activity.form.EpdcAppBannerFormDTO;
import com.elink.esua.epdc.activity.result.EpdcAppActBannerResultDTO;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.modules.activity.entity.ActBannerEntity;
@ -107,4 +108,14 @@ public interface ActBannerDao extends BaseDao<ActBannerEntity> {
* @return void
*/
void rejectActBannerInfo(@Param("relationId") String relationId);
/**
* 志愿者banner列表
*
* @param formDto
* @return java.util.List<com.elink.esua.epdc.activity.ActBannerDTO>
* @author Liuchuang
* @since 2020/11/5 10:23
*/
List<ActBannerDTO> selectListBanners(EpdcAppBannerFormDTO formDto);
}

5
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActBannerEntity.java

@ -91,4 +91,9 @@ public class ActBannerEntity extends BaseEpdcEntity {
* banner排序
*/
private String sort;
/**
* 内容
*/
private String content;
}

11
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActBannerService.java

@ -19,6 +19,7 @@ package com.elink.esua.epdc.modules.activity.service;
import com.elink.esua.epdc.activity.ActBannerDTO;
import com.elink.esua.epdc.activity.form.EpdcAppActBannerFormDTO;
import com.elink.esua.epdc.activity.form.EpdcAppBannerFormDTO;
import com.elink.esua.epdc.activity.result.EpdcAppActBannerResultDTO;
import com.elink.esua.epdc.commons.mybatis.service.BaseService;
import com.elink.esua.epdc.commons.tools.page.PageData;
@ -153,4 +154,14 @@ public interface ActBannerService extends BaseService<ActBannerEntity> {
* @Date 15:13 2020-06-02
**/
Result<List<SysSimpleDictDTO>> getListSimpleDictInfo(String dictType);
/**
* 志愿者banner列表
*
* @param formDto
* @return java.util.List<com.elink.esua.epdc.activity.ActBannerDTO>
* @author Liuchuang
* @since 2020/11/5 10:22
*/
List<ActBannerDTO> listBanners(EpdcAppBannerFormDTO formDto);
}

6
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActBannerServiceImpl.java

@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.elink.esua.epdc.activity.ActBannerDTO;
import com.elink.esua.epdc.activity.form.EpdcAppActBannerFormDTO;
import com.elink.esua.epdc.activity.form.EpdcAppBannerFormDTO;
import com.elink.esua.epdc.activity.result.EpdcAppActBannerResultDTO;
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
@ -183,4 +184,9 @@ public class ActBannerServiceImpl extends BaseServiceImpl<ActBannerDao, ActBanne
public Result<List<SysSimpleDictDTO>> getListSimpleDictInfo(String dictType) {
return adminFeignClient.getListSimpleDictInfo(dictType);
}
@Override
public List<ActBannerDTO> listBanners(EpdcAppBannerFormDTO formDto) {
return baseDao.selectListBanners(formDto);
}
}

24
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActBannerDao.xml

@ -138,4 +138,28 @@
UPDATE epdc_act_banner SET DEL_FLAG = 1,UPDATED_TIME=NOW()
where ACT_ID=#{relationId}
</update>
<select id="selectListBanners" resultType="com.elink.esua.epdc.activity.ActBannerDTO">
SELECT
ID,
ACT_ID,
TITLE,
BANNER_IMG,
BANNER_TYPE,
URL,
BANNER_POSITION,
SORT,
CREATED_TIME
FROM
epdc_act_banner
WHERE
DEL_FLAG = '0'
AND `STATUS` = '1'
<if test="bannerType != null and bannerType != ''">
AND BANNER_TYPE = #{bannerType}
</if>
ORDER BY
SORT,
CREATED_TIME DESC
</select>
</mapper>

Loading…
Cancel
Save