Browse Source

顺道捎和拼团购接口开发

feature/syp_points
songyunpeng 5 years ago
parent
commit
54f01bcf28
  1. 8
      esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/constant/RocketMqConstant.java
  2. 4
      esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/security/content/ModuleName.java
  3. 126
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiCustomInfoController.java
  4. 103
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/CustomFeignClient.java
  5. 51
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/CustomFeignClientFallback.java
  6. 85
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/CustomService.java
  7. 98
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java
  8. 8
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/service/impl/CheckResultServiceImpl.java
  9. 180
      esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/GroupBuyInfoDTO.java
  10. 191
      esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/SdsInfoDTO.java
  11. 128
      esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAddGroupBuyInfoFormDTO.java
  12. 144
      esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAddSdsFormDTO.java
  13. 57
      esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcSelectGroupBuyInfoListFormDTO.java
  14. 55
      esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcSelectSdsInfoListFormDTO.java
  15. 62
      esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSelectGroupBuyDetailResultDTO.java
  16. 65
      esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSelectGroupBuyInfoListResultDTO.java
  17. 71
      esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSelectSdsInfoDetailResultDTO.java
  18. 56
      esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSelectSdsInfoListResultDTO.java
  19. 108
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/controller/EpdcAppGroupBuyInfoController.java
  20. 94
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/controller/GroupBuyInfoController.java
  21. 70
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/dao/GroupBuyInfoDao.java
  22. 148
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/entity/GroupBuyInfoEntity.java
  23. 113
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/excel/GroupBuyInfoExcel.java
  24. 47
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/redis/GroupBuyInfoRedis.java
  25. 158
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/service/GroupBuyInfoService.java
  26. 279
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/service/impl/GroupBuyInfoServiceImpl.java
  27. 6
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/service/impl/ReportIssueServiceImpl.java
  28. 13
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/consumer/OrganizationModifyConsumer.java
  29. 15
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/consumer/RejectCheckRecordConsumer.java
  30. 108
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/controller/EpdcAppSdsInfoController.java
  31. 94
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/controller/SdsInfoController.java
  32. 71
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/dao/SdsInfoDao.java
  33. 158
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/entity/SdsInfoEntity.java
  34. 122
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/excel/SdsInfoExcel.java
  35. 47
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/redis/SdsInfoRedis.java
  36. 158
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/service/SdsInfoService.java
  37. 278
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/service/impl/SdsInfoServiceImpl.java
  38. 82
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/groupBuy/GroupBuyInfoDao.xml
  39. 84
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/sds/SdsInfoDao.xml
  40. 6
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActApplyInfoServiceImpl.java

8
esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/constant/RocketMqConstant.java

@ -108,6 +108,14 @@ public interface RocketMqConstant {
* 内容安全审核 我要举报tag
*/
String MQ_TAG_REPORT_ISSUE_CONTENTSECURITY = "js_reportIssue_topic_contentSecurityTag";
/**
* 内容安全审核 顺道捎tag
*/
String MQ_TAG_SDS_CONTENTSECURITY = "js_sds_contentSecurityTag";
/**
* 内容安全审核 拼团购tag
*/
String MQ_TAG_GROUP_BUY_CONTENTSECURITY = "js_GROUP_BUY_contentSecurityTag";
}

4
esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/security/content/ModuleName.java

@ -17,7 +17,9 @@ public enum ModuleName {
PARTY_GROUP_TOPIC_COMMENT("party_group_topic_comment","党群1+1-评论"),
HELP_SIGNIN("help_signIn","初心互助-已报名活动-我要打卡"),
ACT_APPLY("act_apply","初心互助-申请发单"),
REPORT_ISSUE("report_issue","我要举报")
REPORT_ISSUE("report_issue","我要举报"),
SDS_CONTENT("sds_content","顺道捎"),
GROUP_BUY_CONTENT("group_buy_content","拼团购"),
;
private String name;

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

@ -145,4 +145,130 @@ public class ApiCustomInfoController {
public Result<ReportIssueResultDTO> reportIssueDetail(@PathVariable("id") String id) {
return customService.getReportIssueById(id);
}
/**
* @Description 拼团购-获取首页列表
* @Author songyunpeng
* @Date 2020/12/2
* @Param [formDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyInfoListResultDTO>>
**/
@GetMapping("groupBuy/getGroupBuyList")
public Result<List<EpdcSelectGroupBuyInfoListResultDTO>> getGroupBuyList( @LoginUser TokenDto tokenDto, EpdcSelectGroupBuyInfoListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return customService.getGroupBuyList(tokenDto,formDTO);
}
/**
* @Description 拼团购-详情
* @Author songyunpeng
* @Date 2020/12/2
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO>
**/
@GetMapping("groupBuy/getGroupBuyDetail/{id}")
public Result<EpdcSelectGroupBuyDetailResultDTO> getGroupBuyDetail(@PathVariable String id) {
return customService.getGroupBuyDetail(id);
}
/**
* @Description 拼团购-发布或更新
* @Author songyunpeng
* @Date 2020/12/2
* @Param [formDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@PostMapping("groupBuy/publishOrUpdate")
public Result publishOrUpdate( @LoginUser TokenDto tokenDto,@RequestBody EpdcAddGroupBuyInfoFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return customService.groupBuyPublishOrUpdate(tokenDto,formDTO);
}
/**
* @Description 拼团购-删除
* @Author songyunpeng
* @Date 2020/12/2
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@GetMapping("groupBuy/delete/{id}")
public Result deleteGroupBuy(@PathVariable String id) {
return customService.deleteGroupBuy(id);
}
/**
* @Description 拼团购-打电话计算次数
* @Author songyunpeng
* @Date 2020/12/2
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@GetMapping("groupBuy/callMobile/{id}")
public Result callGroupBuyMobile(@PathVariable String id) {
return customService.callGroupBuyMobile(id);
}
/**
* @Description 获取首页列表
* @Author songyunpeng
* @Date 2020/12/2
* @Param [formDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoListResultDTO>>
**/
@GetMapping("sds/getSdsList")
public Result<List<EpdcSelectSdsInfoListResultDTO>> getSdsList(@LoginUser TokenDto tokenDto,EpdcSelectSdsInfoListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return customService.getSdsList(tokenDto,formDTO);
}
/**
* @Description 详情
* @Author songyunpeng
* @Date 2020/12/2
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcSelectSdsDetailResultDTO>
**/
@GetMapping("sds/getSdsDetail/{id}")
public Result<EpdcSelectSdsInfoDetailResultDTO> getSdsDetail(@PathVariable String id) {
return customService.getSdsDetail(id);
}
/**
* @Description 发布或更新
* @Author songyunpeng
* @Date 2020/12/2
* @Param [formDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@PostMapping("sds/publishOrUpdate")
public Result sdsPublishOrUpdate(@LoginUser TokenDto tokenDto,@RequestBody EpdcAddSdsFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return customService.sdsPublishOrUpdate(tokenDto,formDTO);
}
/**
* @Description 删除
* @Author songyunpeng
* @Date 2020/12/2
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@GetMapping("sds/delete/{id}")
public Result deleteSds(@PathVariable String id) {
return customService.deleteSds(id);
}
/**
* @Description 打电话计算次数
* @Author songyunpeng
* @Date 2020/12/2
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@GetMapping("sds/callMobile/{id}")
public Result callSdsMobile(@PathVariable String id) {
return customService.callSdsMobile(id);
}
}

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

@ -158,4 +158,107 @@ public interface CustomFeignClient {
*/
@GetMapping(value = "custom/epdc-app/reportissue/detail/{id}", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<ReportIssueResultDTO> reportIssueDetail(@PathVariable("id") String id);
/**
* @Description 获取首页列表
* @Author songyunpeng
* @Date 2020/12/2
* @Param [formDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyInfoListResultDTO>>
**/
@GetMapping(value = "custom/epdc-app/groupBuy/getGroupBuyList", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<List<EpdcSelectGroupBuyInfoListResultDTO>> getGroupBuyList(@RequestBody EpdcSelectGroupBuyInfoListFormDTO formDTO);
/**
* @Description 详情
* @Author songyunpeng
* @Date 2020/12/2
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO>
**/
@GetMapping(value = "custom/epdc-app/groupBuy/getGroupBuyDetail/{id}", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<EpdcSelectGroupBuyDetailResultDTO> getGroupBuyDetail(@PathVariable String id);
/**
* @Description 发布或更新
* @Author songyunpeng
* @Date 2020/12/2
* @Param [formDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@PostMapping(value = "custom/epdc-app/groupBuy/publishOrUpdate", consumes = MediaType.APPLICATION_JSON_VALUE)
Result publishOrUpdate(@RequestBody EpdcAddGroupBuyInfoFormDTO formDTO) ;
/**
* @Description 删除
* @Author songyunpeng
* @Date 2020/12/2
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@GetMapping(value = "custom/epdc-app/groupBuy/delete/{id}", consumes = MediaType.APPLICATION_JSON_VALUE)
Result deleteGroupBuy(@PathVariable String id);
/**
* @Description 打电话计算次数
* @Author songyunpeng
* @Date 2020/12/2
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@GetMapping(value = "custom/epdc-app/groupBuy/callMobile/{id}", consumes = MediaType.APPLICATION_JSON_VALUE)
Result callGroupBuyMobile(@PathVariable String id);
/**
* @Description 获取首页列表
* @Author songyunpeng
* @Date 2020/12/2
* @Param [formDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoListResultDTO>>
**/
@GetMapping(value = "custom/epdc-app/sds/getSdsList", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<List<EpdcSelectSdsInfoListResultDTO>> getSdsList(@RequestBody EpdcSelectSdsInfoListFormDTO formDTO);
/**
* @Description 详情
* @Author songyunpeng
* @Date 2020/12/2
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcSelectSdsDetailResultDTO>
**/
@GetMapping(value = "custom/epdc-app/sds/getSdsDetail/{id}", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<EpdcSelectSdsInfoDetailResultDTO> getSdsDetail(@PathVariable String id);
/**
* @Description 发布或更新
* @Author songyunpeng
* @Date 2020/12/2
* @Param [formDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@PostMapping(value = "custom/epdc-app/sds/publishOrUpdate", consumes = MediaType.APPLICATION_JSON_VALUE)
Result publishOrUpdate(@RequestBody EpdcAddSdsFormDTO formDTO);
/**
* @Description 删除
* @Author songyunpeng
* @Date 2020/12/2
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@GetMapping(value = "custom/epdc-app/sds/delete/{id}", consumes = MediaType.APPLICATION_JSON_VALUE)
Result deleteSds(@PathVariable String id);
/**
* @Description 打电话计算次数
* @Author songyunpeng
* @Date 2020/12/2
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@GetMapping(value = "custom/epdc-app/sds/callMobile/{id}", consumes = MediaType.APPLICATION_JSON_VALUE)
Result callSdsMobile(@PathVariable String id);
}

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

@ -93,4 +93,55 @@ public class CustomFeignClientFallback implements CustomFeignClient {
public Result<ReportIssueResultDTO> reportIssueDetail(String id) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "reportIssueDetail", id);
}
@Override
public Result<List<EpdcSelectGroupBuyInfoListResultDTO>> getGroupBuyList(EpdcSelectGroupBuyInfoListFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "getGroupBuyList", formDTO);
}
@Override
public Result<EpdcSelectGroupBuyDetailResultDTO> getGroupBuyDetail(String id) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "getGroupBuyDetail", id);
}
@Override
public Result publishOrUpdate(EpdcAddGroupBuyInfoFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "publishOrUpdate", formDTO);
}
@Override
public Result deleteGroupBuy(String id) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "deleteGroupBuy", id);
}
@Override
public Result callGroupBuyMobile(String id) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "callMobile", id);
}
@Override
public Result<List<EpdcSelectSdsInfoListResultDTO>> getSdsList(EpdcSelectSdsInfoListFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "getSdsList", formDTO);
}
@Override
public Result<EpdcSelectSdsInfoDetailResultDTO> getSdsDetail(String id) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "getSdsDetail", id);
}
@Override
public Result publishOrUpdate(EpdcAddSdsFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "publishOrUpdate", formDTO);
}
@Override
public Result deleteSds(String id) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "deleteSds", id);
}
@Override
public Result callSdsMobile(String id) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "callMobile", id);
}
}

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

@ -1,7 +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.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.DeptOption;
import com.elink.esua.epdc.dto.form.*;
@ -162,4 +162,87 @@ public interface CustomService {
* @since 2020/10/23 10:40
*/
Result<ReportIssueResultDTO> getReportIssueById(String id);
/**
* @Description 获取首页列表
* @Author songyunpeng
* @Date 2020/12/2
* @Param [formDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyInfoListResultDTO>>
**/
Result<List<EpdcSelectGroupBuyInfoListResultDTO>> getGroupBuyList(TokenDto tokenDto, EpdcSelectGroupBuyInfoListFormDTO formDTO);
/**
* @Description 详情
* @Author songyunpeng
* @Date 2020/12/2
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO>
**/
Result<EpdcSelectGroupBuyDetailResultDTO> getGroupBuyDetail(String id);
/**
* @Description 发布或更新
* @Author songyunpeng
* @Date 2020/12/2
* @Param [formDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO>
**/
Result groupBuyPublishOrUpdate(TokenDto tokenDto,EpdcAddGroupBuyInfoFormDTO formDTO);
/**
* @Description 删除
* @Author songyunpeng
* @Date 2020/12/2
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
Result deleteGroupBuy(String id);
/**
* @Description 打电话计算次数
* @Author songyunpeng
* @Date 2020/12/2
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
Result callGroupBuyMobile(String id);
/**
* @Description 小程序-获取首页列表
* @Author songyunpeng
* @Date 2020/12/3
* @Param [formDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoListResultDTO>>
**/
Result<List<EpdcSelectSdsInfoListResultDTO>> getSdsList(TokenDto tokenDto,EpdcSelectSdsInfoListFormDTO formDTO);
/**
* @Description 小程序-获取列表详情
* @Author songyunpeng
* @Date 2020/12/3
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoDetailResultDTO>
**/
Result<EpdcSelectSdsInfoDetailResultDTO> getSdsDetail(String id);
/**
* @Description 小程序- 发布或更新
* @Author songyunpeng
* @Date 2020/12/3
* @Param [formDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
Result sdsPublishOrUpdate(TokenDto tokenDto,EpdcAddSdsFormDTO formDTO);
/**
* @Description 小程序 - 删除
* @Author songyunpeng
* @Date 2020/12/3
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
Result deleteSds(String id);
/**
* @Description 小程序 - 计算打电话次数
* @Author songyunpeng
* @Date 2020/12/3
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
Result callSdsMobile(String id);
}

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

@ -1,9 +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.annotation.LoginUser;
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;
@ -177,4 +177,100 @@ public class CustomServiceImpl implements CustomService {
public Result<ReportIssueResultDTO> getReportIssueById(String id) {
return customFeignClient.reportIssueDetail(id);
}
@Override
public Result<List<EpdcSelectGroupBuyInfoListResultDTO>> getGroupBuyList(@LoginUser TokenDto tokenDto, EpdcSelectGroupBuyInfoListFormDTO formDTO) {
if(StringUtils.isBlank(tokenDto.getUserId())){
return new Result<List<EpdcSelectGroupBuyInfoListResultDTO>>().error("无效的token");
}
formDTO.setUserId(tokenDto.getUserId());
return customFeignClient.getGroupBuyList(formDTO);
}
@Override
public Result<EpdcSelectGroupBuyDetailResultDTO> getGroupBuyDetail(String id) {
return customFeignClient.getGroupBuyDetail(id);
}
@Override
public Result groupBuyPublishOrUpdate( TokenDto tokenDto,EpdcAddGroupBuyInfoFormDTO formDTO) {
if(StringUtils.isBlank(tokenDto.getUserId())){
return new Result<List<EpdcSelectGroupBuyInfoListResultDTO>>().error("无效的token");
}
formDTO.setUserId(tokenDto.getUserId());
formDTO.setFaceImg(tokenDto.getFaceImg());
formDTO.setRealName(tokenDto.getRealName());
formDTO.setPublishMobile(tokenDto.getMobile());
formDTO.setNickname(tokenDto.getNickname());
// 机构信息
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.setGrid(deptDTO.getGrid());
formDTO.setGridId(deptDTO.getGridId());
return customFeignClient.publishOrUpdate(formDTO);
}
@Override
public Result deleteGroupBuy(String id) {
return customFeignClient.deleteGroupBuy(id);
}
@Override
public Result callGroupBuyMobile(String id) {
return customFeignClient.callGroupBuyMobile(id);
}
@Override
public Result<List<EpdcSelectSdsInfoListResultDTO>> getSdsList(TokenDto tokenDto,EpdcSelectSdsInfoListFormDTO formDTO) {
return customFeignClient.getSdsList(formDTO);
}
@Override
public Result<EpdcSelectSdsInfoDetailResultDTO> getSdsDetail(String id) {
return customFeignClient.getSdsDetail(id);
}
@Override
public Result sdsPublishOrUpdate(TokenDto tokenDto,EpdcAddSdsFormDTO formDTO) {
if(StringUtils.isBlank(tokenDto.getUserId())){
return new Result<List<EpdcSelectGroupBuyInfoListResultDTO>>().error("无效的token");
}
formDTO.setUserId(tokenDto.getUserId());
formDTO.setFaceImg(tokenDto.getFaceImg());
formDTO.setRealName(tokenDto.getRealName());
formDTO.setPublishMobile(tokenDto.getMobile());
formDTO.setNickname(tokenDto.getNickname());
// 机构信息
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.setGrid(deptDTO.getGrid());
formDTO.setGridId(deptDTO.getGridId());
return customFeignClient.publishOrUpdate(formDTO);
}
@Override
public Result deleteSds(String id) {
return customFeignClient.deleteSds(id);
}
@Override
public Result callSdsMobile(String id) {
return customFeignClient.callSdsMobile(id);
}
}

8
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/service/impl/CheckResultServiceImpl.java

@ -207,6 +207,14 @@ public class CheckResultServiceImpl extends BaseServiceImpl<CheckResultDao, Chec
else if(ModuleName.REPORT_ISSUE.getCode().equals(record.getModule())){
topic = RocketMqConstant.MQ_TOPIC_REPORT_ISSUE;
tag = RocketMqConstant.MQ_TAG_REPORT_ISSUE_CONTENTSECURITY;
} //顺道捎
else if(ModuleName.SDS_CONTENT.getCode().equals(record.getModule())){
topic = RocketMqConstant.MQ_TOPIC_REPORT_ISSUE;
tag = RocketMqConstant.MQ_TAG_SDS_CONTENTSECURITY;
} //拼团购
else if(ModuleName.GROUP_BUY_CONTENT.getCode().equals(record.getModule())){
topic = RocketMqConstant.MQ_TOPIC_REPORT_ISSUE;
tag = RocketMqConstant.MQ_TAG_GROUP_BUY_CONTENTSECURITY;
}
RejectRecordDTO body = new RejectRecordDTO();
body.setUserId(violationEntity.getUserId());

180
esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/GroupBuyInfoDTO.java

@ -0,0 +1,180 @@
/**
* 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 lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 拼团购
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-12-02
*/
@Data
public class GroupBuyInfoDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 标题
*/
private String groupBuyTitle;
/**
* 联系电话
*/
private String groupBuyMobile;
/**
* 发布内容
*/
private String groupBuyContent;
/**
* 团购时间
*/
private Date groupBuyTime;
/**
* 浏览数
*/
private Integer browseNum;
/**
* 拨打次数
*/
private Integer callNum;
/**
* 发布人姓名
*/
private String realName;
/**
* 发布人ID
*/
private String userId;
/**
* 发布人昵称
*/
private String nickname;
/**
* 头像
*/
private String faceImg;
/**
* 发布人电话
*/
private String publishMobile;
/**
* 所属网格ID
*/
private Long gridId;
/**
* 所属网格
*/
private String grid;
/**
* 父所有部门
*/
private String parentDeptIds;
/**
* 父所有部门名称
*/
private String parentDeptNames;
/**
* 所有部门ID
*/
private String allDeptIds;
/**
* 所有部门名称
*/
private String allDeptNames;
/**
* 屏蔽标识
*/
private String shieldFlag;
/**
* 屏蔽人ID
*/
private String shieldUserId;
/**
* 屏蔽人姓名
*/
private String shieldUserName;
/**
* 屏蔽原因
*/
private String shieldReason;
/**
* 删除标识
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
/**
* 排序
*/
private Integer sort;
}

191
esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/SdsInfoDTO.java

@ -0,0 +1,191 @@
/**
* 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 lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 顺道捎
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-12-02
*/
@Data
public class SdsInfoDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 出发地
*/
private String departure;
/**
* 目的地
*/
private String destination;
/**
* 出发时间
*/
private Date departureTime;
/**
* 联系电话
*/
private String mobile;
/**
* 捎带内容
*/
private String carryContent;
/**
* 捎带状态 0我需要捎 1我可以捎
*/
private String carryStatus;
/**
* 浏览数
*/
private Integer browseNum;
/**
* 拨打次数
*/
private Integer callNum;
/**
* 发布人姓名
*/
private String realName;
/**
* 发布人ID
*/
private String userId;
/**
* 发布人昵称
*/
private String nickname;
/**
* 头像
*/
private String faceImg;
/**
* 发布人电话
*/
private String publishMobile;
/**
* 所属网格ID
*/
private Long gridId;
/**
* 所属网格
*/
private String grid;
/**
* 父所有部门
*/
private String parentDeptIds;
/**
* 父所有部门名称
*/
private String parentDeptNames;
/**
* 所有部门ID
*/
private String allDeptIds;
/**
* 所有部门名称
*/
private String allDeptNames;
/**
* 屏蔽标识
*/
private String shieldFlag;
/**
* 屏蔽人ID
*/
private String shieldUserId;
/**
* 屏蔽人姓名
*/
private String shieldUserName;
/**
* 删除标识
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
/**
* 屏蔽原因
*/
private String shieldReason;
/**
* 排序
*/
private Integer sort;
}

128
esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAddGroupBuyInfoFormDTO.java

@ -0,0 +1,128 @@
/**
* 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.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;
/**
* 拼团购 新增或更新
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-12-02
*/
@Data
public class EpdcAddGroupBuyInfoFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 标题
*/
@NotBlank(message = "标题不能为空")
@Size(min = 1,max = 16,message = "标题在16字以内")
private String groupBuyTitle;
/**
* 联系电话
*/
@NotBlank(message = "联系电话不能为空")
@Size(min = 1,max = 20,message = "联系电话在20字以内")
private String groupBuyMobile;
/**
* 发布内容
*/
@NotBlank(message = "发布内容不能为空")
@Size(min = 1,max = 500,message = "发布内容在500字以内")
private String groupBuyContent;
/**
* 团购时间
*/
@NotNull(message = "团购时间不能为空")
private Date groupBuyTime;
/**
* 发布人姓名
*/
private String realName;
/**
* 发布人ID
*/
private String userId;
/**
* 发布人昵称
*/
private String nickname;
/**
* 头像
*/
private String faceImg;
/**
* 发布人电话
*/
private String publishMobile;
/**
* 所属网格ID
*/
private Long gridId;
/**
* 所属网格
*/
private String grid;
/**
* 父所有部门
*/
private String parentDeptIds;
/**
* 父所有部门名称
*/
private String parentDeptNames;
/**
* 所有部门ID
*/
private String allDeptIds;
/**
* 所有部门名称
*/
private String allDeptNames;
private Boolean isConReview = false;
}

144
esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAddSdsFormDTO.java

@ -0,0 +1,144 @@
/**
* 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.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;
/**
* 拼团购 新增或更新
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-12-02
*/
@Data
public class EpdcAddSdsFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 出发地
*/
@NotBlank(message = "出发地不能为空")
@Size(min = 1,max = 100,message = "出发地在100字以内")
private String departure;
/**
* 目的地
*/
@NotBlank(message = "目的地不能为空")
@Size(min = 1,max = 100,message = "目的地在100字以内")
private String destination;
/**
* 出发时间
*/
@NotNull(message = "出发时间不能为空")
private Date departureTime;
/**
* 联系电话
*/
@NotBlank(message = "联系电话不能为空")
@Size(min = 1,max = 20,message = "联系电话在20字以内")
private String mobile;
/**
* 捎带内容
*/
@NotBlank(message = "捎带内容不能为空")
@Size(min = 1,max = 500,message = "捎带内容在500字以内")
private String carryContent;
/**
* 捎带状态 0我需要捎 1我可以捎
*/
private String carryStatus;
/**
* 发布人姓名
*/
private String realName;
/**
* 发布人ID
*/
private String userId;
/**
* 发布人昵称
*/
private String nickname;
/**
* 头像
*/
private String faceImg;
/**
* 发布人电话
*/
private String publishMobile;
/**
* 所属网格ID
*/
private Long gridId;
/**
* 所属网格
*/
private String grid;
/**
* 父所有部门
*/
private String parentDeptIds;
/**
* 父所有部门名称
*/
private String parentDeptNames;
/**
* 所有部门ID
*/
private String allDeptIds;
/**
* 所有部门名称
*/
private String allDeptNames;
private Boolean isConReview = false;
}

57
esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcSelectGroupBuyInfoListFormDTO.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.dto.form;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 拼团购 首页列表 表单dto
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-12-02
*/
@Data
public class EpdcSelectGroupBuyInfoListFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 页码
*/
@Min(value = 1, message = "页码必须大于0")
private Integer pageIndex;
/**
* 页容量
*/
@Min(value = 1, message = "页容量必须大于0")
private Integer pageSize;
@NotBlank(message = "是否为我发布不能为空")
private String isMe;
private String userId;
}

55
esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcSelectSdsInfoListFormDTO.java

@ -0,0 +1,55 @@
/**
* 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.form;
import lombok.Data;
import javax.validation.constraints.Min;
import java.io.Serializable;
/**
* 拼团购 首页列表 表单dto
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-12-02
*/
@Data
public class EpdcSelectSdsInfoListFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 页码
*/
@Min(value = 1, message = "页码必须大于0")
private Integer pageIndex;
/**
* 页容量
*/
@Min(value = 1, message = "页容量必须大于0")
private Integer pageSize;
private String type;
private String userId;
}

62
esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSelectGroupBuyDetailResultDTO.java

@ -0,0 +1,62 @@
/**
* 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.result;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 拼团购 首页列表 结果
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-12-02
*/
@Data
public class EpdcSelectGroupBuyDetailResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 标题
*/
private String groupBuyTitle;
/**
* 联系电话
*/
private String groupBuyMobile;
/**
* 发布内容
*/
private String groupBuyContent;
/**
* 团购时间
*/
private Date groupBuyTime;
}

65
esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSelectGroupBuyInfoListResultDTO.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.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 拼团购 首页列表 结果
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-12-02
*/
@Data
public class EpdcSelectGroupBuyInfoListResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
private String id;
/**
* 标题
*/
private String groupBuyTitle;
/**
* 联系电话
*/
private String groupBuyMobile;
/**
* 发布内容
*/
private String groupBuyContent;
/**
* 团购时间
*/
private Date groupBuyTime;
}

71
esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSelectSdsInfoDetailResultDTO.java

@ -0,0 +1,71 @@
/**
* 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.result;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 顺道捎 - 首页列表结果返回
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-12-02
*/
@Data
public class EpdcSelectSdsInfoDetailResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 出发地
*/
private String departure;
/**
* 目的地
*/
private String destination;
/**
* 出发时间
*/
private Date departureTime;
/**
* 联系电话
*/
private String mobile;
/**
* 捎带内容
*/
private String carryContent;
/**
* 类型
*/
private String carryStatus;
}

56
esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSelectSdsInfoListResultDTO.java

@ -0,0 +1,56 @@
/**
* 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.result;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 顺道捎 - 首页列表结果返回
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-12-02
*/
@Data
public class EpdcSelectSdsInfoListResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 出发地
*/
private String departure;
/**
* 目的地
*/
private String destination;
/**
* 出发时间
*/
private Date departureTime;
}

108
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/controller/EpdcAppGroupBuyInfoController.java

@ -0,0 +1,108 @@
/**
* 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.groupbuy.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.EpdcAddGroupBuyInfoFormDTO;
import com.elink.esua.epdc.dto.form.EpdcSelectGroupBuyInfoListFormDTO;
import com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO;
import com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyInfoListResultDTO;
import com.elink.esua.epdc.modules.groupbuy.service.GroupBuyInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 拼团购
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-12-02
*/
@RestController
@RequestMapping(Constant.EPDC_APP +"groupBuy")
public class EpdcAppGroupBuyInfoController {
@Autowired
private GroupBuyInfoService groupBuyInfoService;
/**
* @Description 获取首页列表
* @Author songyunpeng
* @Date 2020/12/2
* @Param [formDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyInfoListResultDTO>>
**/
@GetMapping("getGroupBuyList")
public Result<List<EpdcSelectGroupBuyInfoListResultDTO>> getGroupBuyList(@RequestBody EpdcSelectGroupBuyInfoListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return groupBuyInfoService.getGroupBuyList(formDTO);
}
/**
* @Description 详情
* @Author songyunpeng
* @Date 2020/12/2
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO>
**/
@GetMapping("getGroupBuyDetail/{id}")
public Result<EpdcSelectGroupBuyDetailResultDTO> getGroupBuyDetail(@PathVariable String id) {
return groupBuyInfoService.getGroupBuyDetail(id);
}
/**
* @Description 发布或更新
* @Author songyunpeng
* @Date 2020/12/2
* @Param [formDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@PostMapping("publishOrUpdate")
public Result publishOrUpdate(@RequestBody EpdcAddGroupBuyInfoFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return groupBuyInfoService.publishOrUpdate(formDTO);
}
/**
* @Description 删除
* @Author songyunpeng
* @Date 2020/12/2
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@GetMapping("delete/{id}")
public Result deleteGroupBuy(@PathVariable String id) {
return groupBuyInfoService.deleteGroupBuy(id);
}
/**
* @Description 打电话计算次数
* @Author songyunpeng
* @Date 2020/12/2
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@GetMapping("callMobile/{id}")
public Result callMobile(@PathVariable String id) {
return groupBuyInfoService.callMobile(id);
}
}

94
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/controller/GroupBuyInfoController.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.groupbuy.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.DefaultGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.dto.GroupBuyInfoDTO;
import com.elink.esua.epdc.modules.groupbuy.excel.GroupBuyInfoExcel;
import com.elink.esua.epdc.modules.groupbuy.service.GroupBuyInfoService;
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-12-02
*/
@RestController
@RequestMapping("groupbuyinfo")
public class GroupBuyInfoController {
@Autowired
private GroupBuyInfoService groupBuyInfoService;
@GetMapping("page")
public Result<PageData<GroupBuyInfoDTO>> page(@RequestParam Map<String, Object> params){
PageData<GroupBuyInfoDTO> page = groupBuyInfoService.page(params);
return new Result<PageData<GroupBuyInfoDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<GroupBuyInfoDTO> get(@PathVariable("id") String id){
GroupBuyInfoDTO data = groupBuyInfoService.get(id);
return new Result<GroupBuyInfoDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody GroupBuyInfoDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
groupBuyInfoService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody GroupBuyInfoDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
groupBuyInfoService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
groupBuyInfoService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<GroupBuyInfoDTO> list = groupBuyInfoService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, GroupBuyInfoExcel.class);
}
}

70
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/dao/GroupBuyInfoDao.java

@ -0,0 +1,70 @@
/**
* 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.groupbuy.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.dto.GroupBuyInfoDTO;
import com.elink.esua.epdc.dto.form.EpdcSelectGroupBuyInfoListFormDTO;
import com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO;
import com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyInfoListResultDTO;
import com.elink.esua.epdc.modules.groupbuy.entity.GroupBuyInfoEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 拼团购
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-12-02
*/
@Mapper
public interface GroupBuyInfoDao extends BaseDao<GroupBuyInfoEntity> {
/**
* @Description app - 获取首页列表
* @Author songyunpeng
* @Date 2020/12/2
* @Param [formDTO]
* @return java.util.List<com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyInfoListResultDTO>
**/
List<EpdcSelectGroupBuyInfoListResultDTO> getGroupBuyList(EpdcSelectGroupBuyInfoListFormDTO formDTO);
/**
* @Description 详情
* @Author songyunpeng
* @Date 2020/12/2
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO>
**/
EpdcSelectGroupBuyDetailResultDTO getGroupBuyDetail(String id);
/**
* @Description 查询需要修改组织机构信息事件
* @Author songyunpeng
* @Date 2020/11/25
* @Param [toString]
* @return java.util.List<com.elink.esua.epdc.dto.GroupBuyInfoDTO>
**/
List<GroupBuyInfoDTO> selectListOfOrganizationInfo(String toString);
/**
* @Description 更新部门名
* @Author songyunpeng
* @Date 2020/11/25
* @Param [newDeptName, deptId]
* @return void
**/
void updateGridByDeptId(String newDeptName, Long deptId);
}

148
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/entity/GroupBuyInfoEntity.java

@ -0,0 +1,148 @@
/**
* 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.groupbuy.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 拼团购
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-12-02
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("epdc_group_buy_info")
public class GroupBuyInfoEntity extends BaseEpdcEntity {
private static final long serialVersionUID = 1L;
/**
* 标题
*/
private String groupBuyTitle;
/**
* 联系电话
*/
private String groupBuyMobile;
/**
* 发布内容
*/
private String groupBuyContent;
/**
* 团购时间
*/
private Date groupBuyTime;
/**
* 浏览数
*/
private Integer browseNum;
/**
* 拨打次数
*/
private Integer callNum;
/**
* 发布人姓名
*/
private String realName;
/**
* 发布人ID
*/
private String userId;
/**
* 发布人昵称
*/
private String nickname;
/**
* 头像
*/
private String faceImg;
/**
* 发布人电话
*/
private String publishMobile;
/**
* 所属网格ID
*/
private Long gridId;
/**
* 所属网格
*/
private String grid;
/**
* 父所有部门
*/
private String parentDeptIds;
/**
* 父所有部门名称
*/
private String parentDeptNames;
/**
* 所有部门ID
*/
private String allDeptIds;
/**
* 所有部门名称
*/
private String allDeptNames;
/**
* 屏蔽标识
*/
private String shieldFlag;
/**
* 屏蔽人ID
*/
private String shieldUserId;
/**
* 屏蔽人姓名
*/
private String shieldUserName;
/**
* 屏蔽原因
*/
private String shieldReason;
/**
* 排序
*/
private Integer sort;
}

113
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/excel/GroupBuyInfoExcel.java

@ -0,0 +1,113 @@
/**
* 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.groupbuy.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-12-02
*/
@Data
public class GroupBuyInfoExcel {
@Excel(name = "主键")
private String id;
@Excel(name = "标题")
private String groupBuyTitle;
@Excel(name = "联系电话")
private String groupBuyMobile;
@Excel(name = "发布内容")
private String groupBuyContent;
@Excel(name = "浏览数")
private Integer browseNum;
@Excel(name = "拨打次数")
private Integer callNum;
@Excel(name = "发布人姓名")
private String realName;
@Excel(name = "发布人ID")
private String userId;
@Excel(name = "发布人昵称")
private String nickname;
@Excel(name = "头像")
private String faceImg;
@Excel(name = "发布人电话")
private String publishMobile;
@Excel(name = "所属网格ID")
private Long gridId;
@Excel(name = "所属网格")
private String grid;
@Excel(name = "父所有部门")
private String parentDeptIds;
@Excel(name = "父所有部门名称")
private String parentDeptNames;
@Excel(name = "所有部门ID")
private String allDeptIds;
@Excel(name = "所有部门名称")
private String allDeptNames;
@Excel(name = "屏蔽人ID")
private String shieldUserId;
@Excel(name = "屏蔽人姓名")
private String shieldUserName;
@Excel(name = "屏蔽原因")
private String shieldReason;
@Excel(name = "删除标识")
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/groupbuy/redis/GroupBuyInfoRedis.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.groupbuy.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-12-02
*/
@Component
public class GroupBuyInfoRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

158
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/service/GroupBuyInfoService.java

@ -0,0 +1,158 @@
/**
* 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.groupbuy.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.GroupBuyInfoDTO;
import com.elink.esua.epdc.dto.form.EpdcAddGroupBuyInfoFormDTO;
import com.elink.esua.epdc.dto.form.EpdcSelectGroupBuyInfoListFormDTO;
import com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO;
import com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyInfoListResultDTO;
import com.elink.esua.epdc.modules.groupbuy.entity.GroupBuyInfoEntity;
import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO;
import com.elink.esua.epdc.modules.rocketmq.dto.RejectRecordDTO;
import java.util.List;
import java.util.Map;
/**
* 拼团购
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-12-02
*/
public interface GroupBuyInfoService extends BaseService<GroupBuyInfoEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<GroupBuyInfoDTO>
* @author generator
* @date 2020-12-02
*/
PageData<GroupBuyInfoDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<GroupBuyInfoDTO>
* @author generator
* @date 2020-12-02
*/
List<GroupBuyInfoDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return GroupBuyInfoDTO
* @author generator
* @date 2020-12-02
*/
GroupBuyInfoDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2020-12-02
*/
void save(GroupBuyInfoDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2020-12-02
*/
void update(GroupBuyInfoDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2020-12-02
*/
void delete(String[] ids);
/**
* @Description 获取首页列表
* @Author songyunpeng
* @Date 2020/12/2
* @Param [formDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyInfoListResultDTO>>
**/
Result<List<EpdcSelectGroupBuyInfoListResultDTO>> getGroupBuyList(EpdcSelectGroupBuyInfoListFormDTO formDTO);
/**
* @Description 详情
* @Author songyunpeng
* @Date 2020/12/2
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO>
**/
Result<EpdcSelectGroupBuyDetailResultDTO> getGroupBuyDetail(String id);
/**
* @Description 发布或更新
* @Author songyunpeng
* @Date 2020/12/2
* @Param [formDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO>
**/
Result publishOrUpdate(EpdcAddGroupBuyInfoFormDTO formDTO);
/**
* @Description 删除
* @Author songyunpeng
* @Date 2020/12/2
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
Result deleteGroupBuy(String id);
/**
* @Description 打电话计算次数
* @Author songyunpeng
* @Date 2020/12/2
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
Result callMobile(String id);
/**
* @Description 删除拼团购信息
* @Author songyunpeng
* @Date 2020/12/4
* @Param [dto]
* @return void
**/
void rejectActInfo(RejectRecordDTO dto);
/**
* @Description 修改组织机构信息
* @Author songyunpeng
* @Date 2020/12/4
* @Param [dto]
* @return void
**/
void modifyOrganizationInfo(OrganizationModifyDTO dto);
}

279
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/service/impl/GroupBuyInfoServiceImpl.java

@ -0,0 +1,279 @@
/**
* 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.groupbuy.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.FieldConstant;
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.security.content.CheckDataUtils;
import com.elink.esua.epdc.commons.tools.security.content.ModuleName;
import com.elink.esua.epdc.commons.tools.security.content.dto.form.ParentAndAllDeptDTO;
import com.elink.esua.epdc.commons.tools.security.content.dto.form.SaveCheckRecordsDTO;
import com.elink.esua.epdc.commons.tools.security.content.dto.result.CheckResultDTO;
import com.elink.esua.epdc.commons.tools.security.content.dto.result.CheckResultMessageDTO;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.GroupBuyInfoDTO;
import com.elink.esua.epdc.dto.form.EpdcAddGroupBuyInfoFormDTO;
import com.elink.esua.epdc.dto.form.EpdcSelectGroupBuyInfoListFormDTO;
import com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO;
import com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyInfoListResultDTO;
import com.elink.esua.epdc.modules.feign.AdminFeignClient;
import com.elink.esua.epdc.modules.feign.ContentSecurityFeignClient;
import com.elink.esua.epdc.modules.groupbuy.dao.GroupBuyInfoDao;
import com.elink.esua.epdc.modules.groupbuy.entity.GroupBuyInfoEntity;
import com.elink.esua.epdc.modules.groupbuy.redis.GroupBuyInfoRedis;
import com.elink.esua.epdc.modules.groupbuy.service.GroupBuyInfoService;
import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO;
import com.elink.esua.epdc.modules.rocketmq.dto.RejectRecordDTO;
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.*;
/**
* 拼团购
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-12-02
*/
@Service
public class GroupBuyInfoServiceImpl extends BaseServiceImpl<GroupBuyInfoDao, GroupBuyInfoEntity> implements GroupBuyInfoService {
@Autowired
private GroupBuyInfoRedis groupBuyInfoRedis;
@Autowired
private AdminFeignClient adminFeignClient;
@Autowired
private ContentSecurityFeignClient contentSecurityFeign;
@Override
public PageData<GroupBuyInfoDTO> page(Map<String, Object> params) {
IPage<GroupBuyInfoEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, GroupBuyInfoDTO.class);
}
@Override
public List<GroupBuyInfoDTO> list(Map<String, Object> params) {
List<GroupBuyInfoEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, GroupBuyInfoDTO.class);
}
private QueryWrapper<GroupBuyInfoEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<GroupBuyInfoEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public GroupBuyInfoDTO get(String id) {
GroupBuyInfoEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, GroupBuyInfoDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(GroupBuyInfoDTO dto) {
GroupBuyInfoEntity entity = ConvertUtils.sourceToTarget(dto, GroupBuyInfoEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(GroupBuyInfoDTO dto) {
GroupBuyInfoEntity entity = ConvertUtils.sourceToTarget(dto, GroupBuyInfoEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@Override
public Result<List<EpdcSelectGroupBuyInfoListResultDTO>> getGroupBuyList(EpdcSelectGroupBuyInfoListFormDTO formDTO) {
int pageIndex = (formDTO.getPageIndex() - NumConstant.ONE) * formDTO.getPageSize();
formDTO.setPageIndex(pageIndex);
List<EpdcSelectGroupBuyInfoListResultDTO> list = this.baseDao.getGroupBuyList(formDTO);
return new Result().ok(list);
}
@Override
public Result<EpdcSelectGroupBuyDetailResultDTO> getGroupBuyDetail(String id) {
//查看详情 新增浏览次数
GroupBuyInfoEntity groupBuyInfoEntity = selectById(id);
groupBuyInfoEntity.setBrowseNum(groupBuyInfoEntity.getBrowseNum()==null?1:groupBuyInfoEntity.getBrowseNum()+1);
updateById(groupBuyInfoEntity);
return new Result<EpdcSelectGroupBuyDetailResultDTO>().ok(this.baseDao.getGroupBuyDetail(id));
}
@Override
public Result publishOrUpdate(EpdcAddGroupBuyInfoFormDTO formDTO) {
//内容审核 - start
Boolean isConReview = formDTO.getIsConReview();
List<String> textList = new ArrayList<>();
textList.add(formDTO.getGroupBuyContent());
// 获取所有上级机构名称和ID拼接
ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(formDTO.getGridId()).getData();
CheckResultDTO contentResult = CheckDataUtils.checkContent(textList);
if(!isConReview &&
((contentResult != null && !contentResult.getAllPass()))){
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDTO.getUserId(),
formDTO.getNickname(), CheckDataUtils.cate_two, CheckDataUtils.decision_one, ModuleName.GROUP_BUY_CONTENT.getCode(), textList,
null, null,contentResult, null,null,formDTO.getGroupBuyMobile(),"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
}
//内容审核 - end
if(formDTO.getGroupBuyTime().before(new Date())){
return new Result().error("团购时间不能小于当前时间");
}
GroupBuyInfoEntity groupBuyInfoEntity = ConvertUtils.sourceToTarget(formDTO,GroupBuyInfoEntity.class);
if(StringUtils.isNotBlank(formDTO.getId())){
updateById(groupBuyInfoEntity);
}else {
//新增
insert(groupBuyInfoEntity);
}
//内容审核 - start
//接口异常,保存至待审核信息
if((contentResult == null) && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDTO.getUserId(),
formDTO.getNickname(), CheckDataUtils.cate_two, null,ModuleName.GROUP_BUY_CONTENT.getCode(), textList,
null, groupBuyInfoEntity.getId(),null,null, null,formDTO.getGroupBuyMobile(),"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//保存待审核记录
if (contentResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, null);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, null);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDTO.getUserId(),
formDTO.getNickname(), CheckDataUtils.cate_two, null, ModuleName.GROUP_BUY_CONTENT.getCode(), textList,
null, groupBuyInfoEntity.getId(), null, null, twoTypes, formDTO.getGroupBuyMobile(), "0",deptDto);
contentSecurityFeign.insertRecords(record);
}
}
//内容审核 - end
return new Result();
}
@Override
public Result deleteGroupBuy(String id) {
this.deleteById(id);
return new Result();
}
@Override
public Result callMobile(String id) {
GroupBuyInfoEntity groupBuyInfoEntity = selectById(id);
if(groupBuyInfoEntity==null){
return new Result();
}
groupBuyInfoEntity.setCallNum(groupBuyInfoEntity.getCallNum()==null?1:groupBuyInfoEntity.getCallNum()+1);
updateById(groupBuyInfoEntity);
return new Result();
}
@Override
public void modifyOrganizationInfo(OrganizationModifyDTO dto) {
// 查询需要修改组织机构信息事件
List<GroupBuyInfoDTO> eventsList = baseDao.selectListOfOrganizationInfo(dto.getDeptId().toString());
if (null != eventsList && eventsList.size() > 0) {
// 组织机构信息处理
List<GroupBuyInfoEntity> entities = handleOrganizationInfo(dto, eventsList);
// 更新事件组织机构信息
updateBatchById(entities);
}
// 更新网格名称
baseDao.updateGridByDeptId(dto.getNewDeptName(), dto.getDeptId());
}
@Override
public void rejectActInfo(RejectRecordDTO dto) {
baseDao.deleteById(dto.getRelationId());
}
/**
* 组织机构信息处理
*
* @return java.util.List<com.elink.esua.epdc.entity.UserEntity>
* @params [dto, userList]
* @author liuchuang
* @since 2020/3/7 15:22
*/
private List<GroupBuyInfoEntity> handleOrganizationInfo(OrganizationModifyDTO dto, List<GroupBuyInfoDTO> userList) {
List<GroupBuyInfoEntity> entities = new ArrayList<>();
for (GroupBuyInfoDTO user : userList) {
GroupBuyInfoEntity entity = new GroupBuyInfoEntity();
if (StringUtils.isNotEmpty(user.getParentDeptIds()) && StringUtils.isNotEmpty(user.getParentDeptNames())) {
List<String> parentDeptIds = Arrays.asList(user.getParentDeptIds().split(","));
List<String> parentDeptNames = Arrays.asList(user.getParentDeptNames().split("-"));
int index = parentDeptIds.indexOf(dto.getDeptId().toString());
if (index >= 0 && parentDeptNames.size() > index) {
parentDeptNames.set(index, dto.getNewDeptName());
entity.setId(user.getId());
entity.setParentDeptNames(StringUtils.join(parentDeptNames, "-"));
}
}
if (StringUtils.isNotEmpty(user.getAllDeptIds()) && StringUtils.isNotEmpty(user.getAllDeptNames())) {
List<String> allDeptIds = Arrays.asList(user.getAllDeptIds().split(","));
List<String> allDeptNames = Arrays.asList(user.getAllDeptNames().split("-"));
int index = allDeptIds.indexOf(dto.getDeptId().toString());
if (index >= 0 && allDeptNames.size() > index) {
allDeptNames.set(index, dto.getNewDeptName());
entity.setId(user.getId());
entity.setAllDeptNames(StringUtils.join(allDeptNames, "-"));
}
}
entities.add(entity);
}
return entities;
}
}

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

@ -158,7 +158,7 @@ public class ReportIssueServiceImpl extends BaseServiceImpl<ReportIssueDao, Repo
((contentResult != null && !contentResult.getAllPass()) || (imgResult != null && !imgResult.getAllPass()))){
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(),
formDto.getNickname(), CheckDataUtils.cate_two, CheckDataUtils.decision_one, ModuleName.ISSUE_SUBMIT.getCode(), textList,
formDto.getNickname(), CheckDataUtils.cate_two, CheckDataUtils.decision_one, ModuleName.REPORT_ISSUE.getCode(), textList,
formDto.getImages(), null,contentResult, imgResult,null,formDto.getMobile(),"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
@ -173,7 +173,7 @@ public class ReportIssueServiceImpl extends BaseServiceImpl<ReportIssueDao, Repo
//接口异常,保存至待审核信息
if((contentResult == null || imgResult == null) && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(),
formDto.getNickname(), CheckDataUtils.cate_two, null,ModuleName.ISSUE_SUBMIT.getCode(), textList,
formDto.getNickname(), CheckDataUtils.cate_two, null,ModuleName.REPORT_ISSUE.getCode(), textList,
formDto.getImages(), entity.getId(),null,null, null,formDto.getMobile(),"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
@ -189,7 +189,7 @@ public class ReportIssueServiceImpl extends BaseServiceImpl<ReportIssueDao, Repo
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(),
formDto.getNickname(), CheckDataUtils.cate_two, null, ModuleName.ISSUE_SUBMIT.getCode(), textList,
formDto.getNickname(), CheckDataUtils.cate_two, null, ModuleName.REPORT_ISSUE.getCode(), textList,
formDto.getImages(), entity.getId(), null, null, twoTypes, formDto.getMobile(), "0",deptDto);
contentSecurityFeign.insertRecords(record);
}

13
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/consumer/OrganizationModifyConsumer.java

@ -4,8 +4,10 @@ import com.alibaba.fastjson.JSONObject;
import com.elink.esua.epdc.commons.tools.constant.RocketMqConstant;
import com.elink.esua.epdc.modules.archives.service.ArchivesService;
import com.elink.esua.epdc.modules.archivesdept.service.ArchivesDeptService;
import com.elink.esua.epdc.modules.groupbuy.service.GroupBuyInfoService;
import com.elink.esua.epdc.modules.reportissue.service.ReportIssueService;
import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO;
import com.elink.esua.epdc.modules.sds.service.SdsInfoService;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.common.message.MessageExt;
import org.apache.rocketmq.spring.annotation.MessageModel;
@ -35,6 +37,13 @@ public class OrganizationModifyConsumer implements RocketMQListener<MessageExt>
@Autowired
private ReportIssueService reportIssueService;
@Autowired
private GroupBuyInfoService groupBuyInfoService;
@Autowired
private SdsInfoService sdsInfoService;
@Override
public void onMessage(MessageExt messageExt) {
log.info("EPDC-CUSTOM-SERVER消费消息START:{topic:{}, msgId:{}}", RocketMqConstant.MQ_TOPIC_ORGANIZATION, messageExt.getMsgId());
@ -48,6 +57,10 @@ public class OrganizationModifyConsumer implements RocketMQListener<MessageExt>
archivesDeptService.modifyOrganizationInfo(dto);
// 我要举报修改组织机构信息
reportIssueService.modifyOrganizationInfo(dto);
//顺道捎修改组织机构信息
sdsInfoService.modifyOrganizationInfo(dto);
//拼团购修改组织结构信息
groupBuyInfoService.modifyOrganizationInfo(dto);
log.info("EPDC-CUSTOM-SERVER消费消息END:{topic:{}, msgId:{}, body:{}}", RocketMqConstant.MQ_TOPIC_ORGANIZATION, messageExt.getMsgId(), body);
} catch (Exception e) {
log.info("EPDC-CUSTOM-SERVER消费消息失败:msgId:{}", messageExt.getMsgId());

15
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/consumer/RejectCheckRecordConsumer.java

@ -2,8 +2,10 @@ package com.elink.esua.epdc.modules.rocketmq.consumer;
import com.alibaba.fastjson.JSONObject;
import com.elink.esua.epdc.commons.tools.constant.RocketMqConstant;
import com.elink.esua.epdc.modules.groupbuy.service.GroupBuyInfoService;
import com.elink.esua.epdc.modules.reportissue.service.ReportIssueService;
import com.elink.esua.epdc.modules.rocketmq.dto.RejectRecordDTO;
import com.elink.esua.epdc.modules.sds.service.SdsInfoService;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.common.message.MessageExt;
import org.apache.rocketmq.spring.annotation.MessageModel;
@ -26,6 +28,13 @@ public class RejectCheckRecordConsumer implements RocketMQListener<MessageExt> {
@Autowired
private ReportIssueService reportIssueService;
@Autowired
private SdsInfoService sdsInfoService;
@Autowired
private GroupBuyInfoService groupBuyInfoService;
@Override
public void onMessage(MessageExt messageExt) {
log.info("EPDC-CUSTOM-SERVER消费消息START:{topic:{}, msgId:{}}", RocketMqConstant.MQ_TOPIC_REPORT_ISSUE, messageExt.getMsgId());
@ -37,6 +46,12 @@ public class RejectCheckRecordConsumer implements RocketMQListener<MessageExt> {
if(RocketMqConstant.MQ_TAG_REPORT_ISSUE_CONTENTSECURITY.equals(tag)){
//删除发布活动相关信息
reportIssueService.rejectActInfo(dto);
} else if(RocketMqConstant.MQ_TAG_SDS_CONTENTSECURITY.equals(tag)){
//删除顺道捎相关信息
sdsInfoService.rejectActInfo(dto);
} else if(RocketMqConstant.MQ_TAG_GROUP_BUY_CONTENTSECURITY.equals(tag)){
//删除拼团购相关信息
groupBuyInfoService.rejectActInfo(dto);
}
log.info("EPDC-CUSTOM-SERVER消费消息END:{topic:{}, msgId:{}, body:{}}", RocketMqConstant.MQ_TOPIC_REPORT_ISSUE, messageExt.getMsgId(), body);

108
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/controller/EpdcAppSdsInfoController.java

@ -0,0 +1,108 @@
/**
* 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.sds.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.EpdcAddSdsFormDTO;
import com.elink.esua.epdc.dto.form.EpdcSelectSdsInfoListFormDTO;
import com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoDetailResultDTO;
import com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoListResultDTO;
import com.elink.esua.epdc.modules.sds.service.SdsInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 拼团购
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-12-02
*/
@RestController
@RequestMapping(Constant.EPDC_APP +"sds")
public class EpdcAppSdsInfoController {
@Autowired
private SdsInfoService sdsInfoService;
/**
* @Description 获取首页列表
* @Author songyunpeng
* @Date 2020/12/2
* @Param [formDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoListResultDTO>>
**/
@GetMapping("getSdsList")
public Result<List<EpdcSelectSdsInfoListResultDTO>> getSdsList(@RequestBody EpdcSelectSdsInfoListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return sdsInfoService.getSdsList(formDTO);
}
/**
* @Description 详情
* @Author songyunpeng
* @Date 2020/12/2
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcSelectSdsDetailResultDTO>
**/
@GetMapping("getSdsDetail/{id}")
public Result<EpdcSelectSdsInfoDetailResultDTO> getSdsDetail(@PathVariable String id) {
return sdsInfoService.getSdsDetail(id);
}
/**
* @Description 发布或更新
* @Author songyunpeng
* @Date 2020/12/2
* @Param [formDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@PostMapping("publishOrUpdate")
public Result publishOrUpdate(@RequestBody EpdcAddSdsFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return sdsInfoService.publishOrUpdate(formDTO);
}
/**
* @Description 删除
* @Author songyunpeng
* @Date 2020/12/2
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@GetMapping("delete/{id}")
public Result deleteSds(@PathVariable String id) {
return sdsInfoService.deleteSds(id);
}
/**
* @Description 打电话计算次数
* @Author songyunpeng
* @Date 2020/12/2
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@GetMapping("callMobile/{id}")
public Result callMobile(@PathVariable String id) {
return sdsInfoService.callMobile(id);
}
}

94
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/controller/SdsInfoController.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.sds.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.DefaultGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.dto.SdsInfoDTO;
import com.elink.esua.epdc.modules.sds.excel.SdsInfoExcel;
import com.elink.esua.epdc.modules.sds.service.SdsInfoService;
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-12-02
*/
@RestController
@RequestMapping("sdsinfo")
public class SdsInfoController {
@Autowired
private SdsInfoService sdsInfoService;
@GetMapping("page")
public Result<PageData<SdsInfoDTO>> page(@RequestParam Map<String, Object> params){
PageData<SdsInfoDTO> page = sdsInfoService.page(params);
return new Result<PageData<SdsInfoDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<SdsInfoDTO> get(@PathVariable("id") String id){
SdsInfoDTO data = sdsInfoService.get(id);
return new Result<SdsInfoDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody SdsInfoDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
sdsInfoService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody SdsInfoDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
sdsInfoService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
sdsInfoService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<SdsInfoDTO> list = sdsInfoService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, SdsInfoExcel.class);
}
}

71
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/dao/SdsInfoDao.java

@ -0,0 +1,71 @@
/**
* 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.sds.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.dto.SdsInfoDTO;
import com.elink.esua.epdc.dto.form.EpdcSelectSdsInfoListFormDTO;
import com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoDetailResultDTO;
import com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoListResultDTO;
import com.elink.esua.epdc.modules.sds.entity.SdsInfoEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 顺道捎
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-12-02
*/
@Mapper
public interface SdsInfoDao extends BaseDao<SdsInfoEntity> {
/**
* @Description 小程序-获取首页列表
* @Author songyunpeng
* @Date 2020/12/3
* @Param [formDTO]
* @return java.util.List<com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoListResultDTO>
**/
List<EpdcSelectSdsInfoListResultDTO> getSdsList(EpdcSelectSdsInfoListFormDTO formDTO);
/**
* @Description 小程序-获取列表详情
* @Author songyunpeng
* @Date 2020/12/3
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoDetailResultDTO>
**/
EpdcSelectSdsInfoDetailResultDTO getSdsDetail(String id);
/**
* @Description 查询需要修改组织机构信息事件
* @Author songyunpeng
* @Date 2020/11/25
* @Param [toString]
* @return java.util.List<com.elink.esua.epdc.dto.ArchivesDTO>
**/
List<SdsInfoDTO> selectListOfOrganizationInfo(String toString);
/**
* @Description 更新部门名
* @Author songyunpeng
* @Date 2020/11/25
* @Param [newDeptName, deptId]
* @return void
**/
void updateGridByDeptId(String newDeptName, Long deptId);
}

158
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/entity/SdsInfoEntity.java

@ -0,0 +1,158 @@
/**
* 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.sds.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 顺道捎
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-12-02
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("epdc_sds_info")
public class SdsInfoEntity extends BaseEpdcEntity {
private static final long serialVersionUID = 1L;
/**
* 出发地
*/
private String departure;
/**
* 目的地
*/
private String destination;
/**
* 出发时间
*/
private Date departureTime;
/**
* 联系电话
*/
private String mobile;
/**
* 捎带内容
*/
private String carryContent;
/**
* 捎带状态 0我需要捎 1我可以捎
*/
private String carryStatus;
/**
* 浏览数
*/
private Integer browseNum;
/**
* 拨打次数
*/
private Integer callNum;
/**
* 发布人姓名
*/
private String realName;
/**
* 发布人ID
*/
private String userId;
/**
* 发布人昵称
*/
private String nickname;
/**
* 头像
*/
private String faceImg;
/**
* 发布人电话
*/
private String publishMobile;
/**
* 所属网格ID
*/
private Long gridId;
/**
* 所属网格
*/
private String grid;
/**
* 父所有部门
*/
private String parentDeptIds;
/**
* 父所有部门名称
*/
private String parentDeptNames;
/**
* 所有部门ID
*/
private String allDeptIds;
/**
* 所有部门名称
*/
private String allDeptNames;
/**
* 屏蔽标识
*/
private String shieldFlag;
/**
* 屏蔽人ID
*/
private String shieldUserId;
/**
* 屏蔽人姓名
*/
private String shieldUserName;
/**
* 屏蔽原因
*/
private String shieldReason;
/**
* 排序
*/
private Integer sort;
}

122
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/excel/SdsInfoExcel.java

@ -0,0 +1,122 @@
/**
* 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.sds.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-12-02
*/
@Data
public class SdsInfoExcel {
@Excel(name = "主键")
private String id;
@Excel(name = "出发地")
private String departure;
@Excel(name = "目的地")
private String destination;
@Excel(name = "出发时间")
private Date departureTime;
@Excel(name = "联系电话")
private String mobile;
@Excel(name = "捎带内容")
private String carryContent;
@Excel(name = "捎带状态 0:我需要捎 1:我可以捎")
private String carryStatus;
@Excel(name = "浏览数")
private Integer browseNum;
@Excel(name = "拨打次数")
private Integer callNum;
@Excel(name = "发布人姓名")
private String realName;
@Excel(name = "发布人ID")
private String userId;
@Excel(name = "发布人昵称")
private String nickname;
@Excel(name = "头像")
private String faceImg;
@Excel(name = "发布人电话")
private String publishMobile;
@Excel(name = "所属网格ID")
private Long gridId;
@Excel(name = "所属网格")
private String grid;
@Excel(name = "父所有部门")
private String parentDeptIds;
@Excel(name = "父所有部门名称")
private String parentDeptNames;
@Excel(name = "所有部门ID")
private String allDeptIds;
@Excel(name = "所有部门名称")
private String allDeptNames;
@Excel(name = "屏蔽人ID")
private String shieldUserId;
@Excel(name = "屏蔽人姓名")
private String shieldUserName;
@Excel(name = "删除标识")
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;
@Excel(name = "屏蔽原因")
private String shieldReason;
}

47
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/redis/SdsInfoRedis.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.sds.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-12-02
*/
@Component
public class SdsInfoRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

158
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/service/SdsInfoService.java

@ -0,0 +1,158 @@
/**
* 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.sds.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.SdsInfoDTO;
import com.elink.esua.epdc.dto.form.EpdcAddSdsFormDTO;
import com.elink.esua.epdc.dto.form.EpdcSelectSdsInfoListFormDTO;
import com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoDetailResultDTO;
import com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoListResultDTO;
import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO;
import com.elink.esua.epdc.modules.rocketmq.dto.RejectRecordDTO;
import com.elink.esua.epdc.modules.sds.entity.SdsInfoEntity;
import java.util.List;
import java.util.Map;
/**
* 顺道捎
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-12-02
*/
public interface SdsInfoService extends BaseService<SdsInfoEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<SdsInfoDTO>
* @author generator
* @date 2020-12-02
*/
PageData<SdsInfoDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<SdsInfoDTO>
* @author generator
* @date 2020-12-02
*/
List<SdsInfoDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return SdsInfoDTO
* @author generator
* @date 2020-12-02
*/
SdsInfoDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2020-12-02
*/
void save(SdsInfoDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2020-12-02
*/
void update(SdsInfoDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2020-12-02
*/
void delete(String[] ids);
/**
* @Description 小程序-获取首页列表
* @Author songyunpeng
* @Date 2020/12/3
* @Param [formDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoListResultDTO>>
**/
Result<List<EpdcSelectSdsInfoListResultDTO>> getSdsList(EpdcSelectSdsInfoListFormDTO formDTO);
/**
* @Description 小程序-获取列表详情
* @Author songyunpeng
* @Date 2020/12/3
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoDetailResultDTO>
**/
Result<EpdcSelectSdsInfoDetailResultDTO> getSdsDetail(String id);
/**
* @Description 小程序- 发布或更新
* @Author songyunpeng
* @Date 2020/12/3
* @Param [formDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
Result publishOrUpdate(EpdcAddSdsFormDTO formDTO);
/**
* @Description 小程序 - 删除
* @Author songyunpeng
* @Date 2020/12/3
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
Result deleteSds(String id);
/**
* @Description 小程序 - 计算打电话次数
* @Author songyunpeng
* @Date 2020/12/3
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
Result callMobile(String id);
/**
* @Description 删除顺道捎相关信息
* @Author songyunpeng
* @Date 2020/12/4
* @Param [dto]
* @return void
**/
void rejectActInfo(RejectRecordDTO dto);
/**
* @Description 修改组织机构信息
* @Author songyunpeng
* @Date 2020/12/4
* @Param [dto]
* @return void
**/
void modifyOrganizationInfo(OrganizationModifyDTO dto);
}

278
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/service/impl/SdsInfoServiceImpl.java

@ -0,0 +1,278 @@
/**
* 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.sds.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.FieldConstant;
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.security.content.CheckDataUtils;
import com.elink.esua.epdc.commons.tools.security.content.ModuleName;
import com.elink.esua.epdc.commons.tools.security.content.dto.form.ParentAndAllDeptDTO;
import com.elink.esua.epdc.commons.tools.security.content.dto.form.SaveCheckRecordsDTO;
import com.elink.esua.epdc.commons.tools.security.content.dto.result.CheckResultDTO;
import com.elink.esua.epdc.commons.tools.security.content.dto.result.CheckResultMessageDTO;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.SdsInfoDTO;
import com.elink.esua.epdc.dto.form.EpdcAddSdsFormDTO;
import com.elink.esua.epdc.dto.form.EpdcSelectSdsInfoListFormDTO;
import com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoDetailResultDTO;
import com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoListResultDTO;
import com.elink.esua.epdc.modules.feign.AdminFeignClient;
import com.elink.esua.epdc.modules.feign.ContentSecurityFeignClient;
import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO;
import com.elink.esua.epdc.modules.rocketmq.dto.RejectRecordDTO;
import com.elink.esua.epdc.modules.sds.dao.SdsInfoDao;
import com.elink.esua.epdc.modules.sds.entity.SdsInfoEntity;
import com.elink.esua.epdc.modules.sds.redis.SdsInfoRedis;
import com.elink.esua.epdc.modules.sds.service.SdsInfoService;
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.*;
/**
* 顺道捎
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-12-02
*/
@Service
public class SdsInfoServiceImpl extends BaseServiceImpl<SdsInfoDao, SdsInfoEntity> implements SdsInfoService {
@Autowired
private SdsInfoRedis sdsInfoRedis;
@Autowired
private AdminFeignClient adminFeignClient;
@Autowired
private ContentSecurityFeignClient contentSecurityFeign;
@Override
public PageData<SdsInfoDTO> page(Map<String, Object> params) {
IPage<SdsInfoEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, SdsInfoDTO.class);
}
@Override
public List<SdsInfoDTO> list(Map<String, Object> params) {
List<SdsInfoEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, SdsInfoDTO.class);
}
private QueryWrapper<SdsInfoEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<SdsInfoEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public SdsInfoDTO get(String id) {
SdsInfoEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, SdsInfoDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(SdsInfoDTO dto) {
SdsInfoEntity entity = ConvertUtils.sourceToTarget(dto, SdsInfoEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(SdsInfoDTO dto) {
SdsInfoEntity entity = ConvertUtils.sourceToTarget(dto, SdsInfoEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@Override
public Result<List<EpdcSelectSdsInfoListResultDTO>> getSdsList(EpdcSelectSdsInfoListFormDTO formDTO) {
int pageIndex = (formDTO.getPageIndex() - NumConstant.ONE) * formDTO.getPageSize();
formDTO.setPageIndex(pageIndex);
List<EpdcSelectSdsInfoListResultDTO> list = this.baseDao.getSdsList(formDTO);
return new Result().ok(list);
}
@Override
public Result<EpdcSelectSdsInfoDetailResultDTO> getSdsDetail(String id) {
//查看详情 新增浏览次数
SdsInfoEntity sdsInfoEntity = selectById(id);
sdsInfoEntity.setBrowseNum(sdsInfoEntity.getBrowseNum()==null?1:sdsInfoEntity.getBrowseNum()+1);
updateById(sdsInfoEntity);
return new Result<EpdcSelectSdsInfoDetailResultDTO>().ok(this.baseDao.getSdsDetail(id));
}
@Override
public Result publishOrUpdate(EpdcAddSdsFormDTO formDTO) {
//内容审核 - start
Boolean isConReview = formDTO.getIsConReview();
List<String> textList = new ArrayList<>();
textList.add(formDTO.getCarryContent());
// 获取所有上级机构名称和ID拼接
ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(formDTO.getGridId()).getData();
CheckResultDTO contentResult = CheckDataUtils.checkContent(textList);
if(!isConReview &&
((contentResult != null && !contentResult.getAllPass()))){
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDTO.getUserId(),
formDTO.getNickname(), CheckDataUtils.cate_two, CheckDataUtils.decision_one, ModuleName.SDS_CONTENT.getCode(), textList,
null, null,contentResult, null,null,formDTO.getMobile(),"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
}
//内容审核 - end
if(formDTO.getDepartureTime().before(new Date())){
return new Result().error("出发时间不能小于当前时间");
}
SdsInfoEntity sdsInfoEntity = ConvertUtils.sourceToTarget(formDTO,SdsInfoEntity.class);
if(StringUtils.isNotBlank(formDTO.getId())){
updateById(sdsInfoEntity);
}else {
//新增
insert(sdsInfoEntity);
}
//内容审核 - start
//接口异常,保存至待审核信息
if((contentResult == null) && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDTO.getUserId(),
formDTO.getNickname(), CheckDataUtils.cate_two, null,ModuleName.SDS_CONTENT.getCode(), textList,
null, sdsInfoEntity.getId(),null,null, null,formDTO.getMobile(),"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//保存待审核记录
if (contentResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, null);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, null);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDTO.getUserId(),
formDTO.getNickname(), CheckDataUtils.cate_two, null, ModuleName.SDS_CONTENT.getCode(), textList,
null, sdsInfoEntity.getId(), null, null, twoTypes, formDTO.getMobile(), "0",deptDto);
contentSecurityFeign.insertRecords(record);
}
}
//内容审核 - end
return new Result();
}
@Override
public Result deleteSds(String id) {
this.deleteById(id);
return new Result();
}
@Override
public Result callMobile(String id) {
SdsInfoEntity sdsInfoEntity = selectById(id);
if(sdsInfoEntity==null){
return new Result();
}
sdsInfoEntity.setCallNum(sdsInfoEntity.getCallNum()==null?1:sdsInfoEntity.getCallNum()+1);
updateById(sdsInfoEntity);
return new Result();
}
@Override
public void modifyOrganizationInfo(OrganizationModifyDTO dto) {
// 查询需要修改组织机构信息事件
List<SdsInfoDTO> eventsList = baseDao.selectListOfOrganizationInfo(dto.getDeptId().toString());
if (null != eventsList && eventsList.size() > 0) {
// 组织机构信息处理
List<SdsInfoEntity> entities = handleOrganizationInfo(dto, eventsList);
// 更新事件组织机构信息
updateBatchById(entities);
}
// 更新网格名称
baseDao.updateGridByDeptId(dto.getNewDeptName(), dto.getDeptId());
}
@Override
public void rejectActInfo(RejectRecordDTO dto) {
baseDao.deleteById(dto.getRelationId());
}
/**
* 组织机构信息处理
*
* @return java.util.List<com.elink.esua.epdc.entity.UserEntity>
* @params [dto, userList]
* @author liuchuang
* @since 2020/3/7 15:22
*/
private List<SdsInfoEntity> handleOrganizationInfo(OrganizationModifyDTO dto, List<SdsInfoDTO> userList) {
List<SdsInfoEntity> entities = new ArrayList<>();
for (SdsInfoDTO user : userList) {
SdsInfoEntity entity = new SdsInfoEntity();
if (StringUtils.isNotEmpty(user.getParentDeptIds()) && StringUtils.isNotEmpty(user.getParentDeptNames())) {
List<String> parentDeptIds = Arrays.asList(user.getParentDeptIds().split(","));
List<String> parentDeptNames = Arrays.asList(user.getParentDeptNames().split("-"));
int index = parentDeptIds.indexOf(dto.getDeptId().toString());
if (index >= 0 && parentDeptNames.size() > index) {
parentDeptNames.set(index, dto.getNewDeptName());
entity.setId(user.getId());
entity.setParentDeptNames(StringUtils.join(parentDeptNames, "-"));
}
}
if (StringUtils.isNotEmpty(user.getAllDeptIds()) && StringUtils.isNotEmpty(user.getAllDeptNames())) {
List<String> allDeptIds = Arrays.asList(user.getAllDeptIds().split(","));
List<String> allDeptNames = Arrays.asList(user.getAllDeptNames().split("-"));
int index = allDeptIds.indexOf(dto.getDeptId().toString());
if (index >= 0 && allDeptNames.size() > index) {
allDeptNames.set(index, dto.getNewDeptName());
entity.setId(user.getId());
entity.setAllDeptNames(StringUtils.join(allDeptNames, "-"));
}
}
entities.add(entity);
}
return entities;
}
}

82
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/groupBuy/GroupBuyInfoDao.xml

@ -0,0 +1,82 @@
<?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.groupbuy.dao.GroupBuyInfoDao">
<resultMap type="com.elink.esua.epdc.modules.groupbuy.entity.GroupBuyInfoEntity" id="groupBuyInfoMap">
<result property="id" column="ID"/>
<result property="groupBuyTitle" column="GROUP_BUY_TITLE"/>
<result property="groupBuyMobile" column="GROUP_BUY_MOBILE"/>
<result property="groupBuyContent" column="GROUP_BUY_CONTENT"/>
<result property="groupBuyTime" column="GROUP_BUY_TIME"/>
<result property="browseNum" column="BROWSE_NUM"/>
<result property="callNum" column="CALL_NUM"/>
<result property="realName" column="REAL_NAME"/>
<result property="userId" column="USER_ID"/>
<result property="nickname" column="NICKNAME"/>
<result property="faceImg" column="FACE_IMG"/>
<result property="publishMobile" column="PUBLISH_MOBILE"/>
<result property="gridId" column="GRID_ID"/>
<result property="grid" column="GRID"/>
<result property="parentDeptIds" column="PARENT_DEPT_IDS"/>
<result property="parentDeptNames" column="PARENT_DEPT_NAMES"/>
<result property="allDeptIds" column="ALL_DEPT_IDS"/>
<result property="allDeptNames" column="ALL_DEPT_NAMES"/>
<result property="shieldFlag" column="SHIELD_FLAG"/>
<result property="shieldUserId" column="SHIELD_USER_ID"/>
<result property="shieldUserName" column="SHIELD_USER_NAME"/>
<result property="shieldReason" column="SHIELD_REASON"/>
<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"/>
<result property="sort" column="SORT"/>
</resultMap>
<select id="getGroupBuyList"
resultType="com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyInfoListResultDTO">
select
t.ID,
t.GROUP_BUY_TITLE,
t.GROUP_BUY_MOBILE,
t.GROUP_BUY_CONTENT,
t.GROUP_BUY_TIME
from epdc_group_buy_info t
where t.DEL_FLAG = '0' and t.SHIELD_FLAG = '0'
<if test="isMe != '' and isMe != null and isMe == 1">
and t.USER_ID = #{userId}
</if>
order by sort,CREATED_TIME desc
LIMIT #{pageIndex},#{pageSize}
</select>
<select id="getGroupBuyDetail"
resultType="com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO">
select
ID,
GROUP_BUY_TITLE,
GROUP_BUY_MOBILE,
GROUP_BUY_CONTENT,
GROUP_BUY_TIME
from epdc_group_buy_info t
where t.DEL_FLAG = '0' and t.SHIELD_FLAG = '0'
and t.ID = #{id}
</select>
<select id="selectListOfOrganizationInfo" resultType="com.elink.esua.epdc.dto.GroupBuyInfoDTO">
SELECT
ID,
PARENT_DEPT_IDS,
PARENT_DEPT_NAMES,
ALL_DEPT_IDS,
ALL_DEPT_NAMES
FROM
epdc_group_buy_info
WHERE
FIND_IN_SET( #{deptId}, ALL_DEPT_IDS )
</select>
<update id="updateGridByDeptId">
UPDATE epdc_group_buy_info SET GRID = #{newDeptName}, UPDATED_TIME = NOW() WHERE GRID_ID = #{deptId}
</update>
</mapper>

84
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/sds/SdsInfoDao.xml

@ -0,0 +1,84 @@
<?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.sds.dao.SdsInfoDao">
<resultMap type="com.elink.esua.epdc.modules.sds.entity.SdsInfoEntity" id="sdsInfoMap">
<result property="id" column="ID"/>
<result property="departure" column="DEPARTURE"/>
<result property="destination" column="DESTINATION"/>
<result property="departureTime" column="DEPARTURE_TIME"/>
<result property="mobile" column="MOBILE"/>
<result property="carryContent" column="CARRY_CONTENT"/>
<result property="carryStatus" column="CARRY_STATUS"/>
<result property="browseNum" column="BROWSE_NUM"/>
<result property="callNum" column="CALL_NUM"/>
<result property="realName" column="REAL_NAME"/>
<result property="userId" column="USER_ID"/>
<result property="nickname" column="NICKNAME"/>
<result property="faceImg" column="FACE_IMG"/>
<result property="publishMobile" column="PUBLISH_MOBILE"/>
<result property="gridId" column="GRID_ID"/>
<result property="grid" column="GRID"/>
<result property="parentDeptIds" column="PARENT_DEPT_IDS"/>
<result property="parentDeptNames" column="PARENT_DEPT_NAMES"/>
<result property="allDeptIds" column="ALL_DEPT_IDS"/>
<result property="allDeptNames" column="ALL_DEPT_NAMES"/>
<result property="shieldUserId" column="SHIELD_USER_ID"/>
<result property="shieldUserName" column="SHIELD_USER_NAME"/>
<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"/>
<result property="shieldReason" column="SHIELD_REASON"/>
<result property="shieldFlag" column="SHIELD_FLAG"/>
</resultMap>
<select id="getSdsList" resultType="com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoListResultDTO">
select
t.ID,
t.DEPARTURE,
t.DESTINATION,
t.DEPARTURE_TIME
from epdc_sds_info t
where t.DEL_FLAG = '0' and t.SHIELD_FLAG = '0'
<if test="type!=null and type!='' and type == '0'.toString()">
and t.CARRY_STATUS = '0'
</if>
<if test="type!=null and type!='' and type == '1'.toString()">
and t.CARRY_STATUS = '1'
</if> <if test="type!=null and type!='' and type == '2'.toString()">
and t.USER_ID = #{userId}
</if>
order by sort,CREATED_TIME desc
LIMIT #{pageIndex},#{pageSize}
</select>
<select id="getSdsDetail" resultType="com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoDetailResultDTO">
select t.ID,
t.DEPARTURE,
t.DESTINATION,
t.DEPARTURE_TIME,
t.MOBILE,
t.CARRY_CONTENT,
t.CARRY_STATUS
from epdc_sds_info t
where t.DEL_FLAG = '0' and t.SHIELD_FLAG = '0' and t.ID = #{id}
</select>
<select id="selectListOfOrganizationInfo" resultType="com.elink.esua.epdc.dto.SdsInfoDTO">
SELECT
ID,
PARENT_DEPT_IDS,
PARENT_DEPT_NAMES,
ALL_DEPT_IDS,
ALL_DEPT_NAMES
FROM
epdc_sds_info
WHERE
FIND_IN_SET( #{deptId}, ALL_DEPT_IDS )
</select>
<update id="updateGridByDeptId">
UPDATE epdc_sds_info SET GRID = #{newDeptName}, UPDATED_TIME = NOW() WHERE GRID_ID = #{deptId}
</update>
</mapper>

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

@ -154,7 +154,7 @@ public class ActApplyInfoServiceImpl extends BaseServiceImpl<ActApplyInfoDao, Ac
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(dto.getApplyUserId(),
dto.getNickname(),CheckDataUtils.cate_two , CheckDataUtils.decision_one,
ModuleName.ISSUE_COMMENT.getCode(), textList,null, null,contentResult,
ModuleName.ACT_APPLY.getCode(), textList,null, null,contentResult,
null,null,dto.getMobile(),"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
@ -167,7 +167,7 @@ public class ActApplyInfoServiceImpl extends BaseServiceImpl<ActApplyInfoDao, Ac
//接口异常,保存至待审核信息
if(contentResult == null && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(dto.getApplyUserId(),
dto.getNickname(), CheckDataUtils.cate_two, null,ModuleName.ISSUE_COMMENT.getCode(), textList,
dto.getNickname(), CheckDataUtils.cate_two, null,ModuleName.ACT_APPLY.getCode(), textList,
null, entity.getId(),null,null, null,dto.getMobile(),"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
@ -183,7 +183,7 @@ public class ActApplyInfoServiceImpl extends BaseServiceImpl<ActApplyInfoDao, Ac
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(dto.getApplyUserId(),
dto.getNickname(), CheckDataUtils.cate_two, null, ModuleName.ISSUE_COMMENT.getCode(), textList,
dto.getNickname(), CheckDataUtils.cate_two, null, ModuleName.ACT_APPLY.getCode(), textList,
null,entity.getId(), null,null,twoTypes,dto.getMobile(),"0",deptDto);
contentSecurityFeign.insertRecords(record);
}

Loading…
Cancel
Save