diff --git a/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/constant/RocketMqConstant.java b/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/constant/RocketMqConstant.java index a26184ed..80256822 100644 --- a/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/constant/RocketMqConstant.java +++ b/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"; } diff --git a/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/security/content/ModuleName.java b/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/security/content/ModuleName.java index 12405711..844d537e 100644 --- a/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/security/content/ModuleName.java +++ b/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; diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiCustomInfoController.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiCustomInfoController.java index b8059f26..b4faa09f 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiCustomInfoController.java +++ b/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 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> + **/ + @GetMapping("groupBuy/getGroupBuyList") + public Result> 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 + **/ + @GetMapping("groupBuy/getGroupBuyDetail/{id}") + public Result 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> + **/ + @GetMapping("sds/getSdsList") + public Result> 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 + **/ + @GetMapping("sds/getSdsDetail/{id}") + public Result 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); + } } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/CustomFeignClient.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/CustomFeignClient.java index 66ec4da1..bfa16f81 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/CustomFeignClient.java +++ b/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 reportIssueDetail(@PathVariable("id") String id); + + + + /** + * @Description 获取首页列表 + * @Author songyunpeng + * @Date 2020/12/2 + * @Param [formDTO] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + **/ + @GetMapping(value = "custom/epdc-app/groupBuy/getGroupBuyList", consumes = MediaType.APPLICATION_JSON_VALUE) + Result> getGroupBuyList(@RequestBody EpdcSelectGroupBuyInfoListFormDTO 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/getGroupBuyDetail/{id}", consumes = MediaType.APPLICATION_JSON_VALUE) + Result 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> + **/ + @GetMapping(value = "custom/epdc-app/sds/getSdsList", consumes = MediaType.APPLICATION_JSON_VALUE) + Result> getSdsList(@RequestBody EpdcSelectSdsInfoListFormDTO 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/getSdsDetail/{id}", consumes = MediaType.APPLICATION_JSON_VALUE) + Result 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); } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/CustomFeignClientFallback.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/CustomFeignClientFallback.java index 5eaf2dc3..113a2257 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/CustomFeignClientFallback.java +++ b/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 reportIssueDetail(String id) { return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "reportIssueDetail", id); } + + @Override + public Result> getGroupBuyList(EpdcSelectGroupBuyInfoListFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "getGroupBuyList", formDTO); + } + + @Override + public Result 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> getSdsList(EpdcSelectSdsInfoListFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "getSdsList", formDTO); + } + + @Override + public Result 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); + } } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/CustomService.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/CustomService.java index 9f2cc5d0..f1f88650 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/CustomService.java +++ b/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 getReportIssueById(String id); + + /** + * @Description 获取首页列表 + * @Author songyunpeng + * @Date 2020/12/2 + * @Param [formDTO] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + **/ + Result> getGroupBuyList(TokenDto tokenDto, EpdcSelectGroupBuyInfoListFormDTO formDTO); + /** + * @Description 详情 + * @Author songyunpeng + * @Date 2020/12/2 + * @Param [id] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + Result getGroupBuyDetail(String id); + /** + * @Description 发布或更新 + * @Author songyunpeng + * @Date 2020/12/2 + * @Param [formDTO] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + 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> + **/ + Result> getSdsList(TokenDto tokenDto,EpdcSelectSdsInfoListFormDTO formDTO); + /** + * @Description 小程序-获取列表详情 + * @Author songyunpeng + * @Date 2020/12/3 + * @Param [id] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + Result 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); } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java index af682a66..99e1fedf 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java +++ b/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 getReportIssueById(String id) { return customFeignClient.reportIssueDetail(id); } + + @Override + public Result> getGroupBuyList(@LoginUser TokenDto tokenDto, EpdcSelectGroupBuyInfoListFormDTO formDTO) { + if(StringUtils.isBlank(tokenDto.getUserId())){ + return new Result>().error("无效的token"); + } + formDTO.setUserId(tokenDto.getUserId()); + return customFeignClient.getGroupBuyList(formDTO); + } + + @Override + public Result getGroupBuyDetail(String id) { + return customFeignClient.getGroupBuyDetail(id); + } + + @Override + public Result groupBuyPublishOrUpdate( TokenDto tokenDto,EpdcAddGroupBuyInfoFormDTO formDTO) { + if(StringUtils.isBlank(tokenDto.getUserId())){ + return new Result>().error("无效的token"); + } + formDTO.setUserId(tokenDto.getUserId()); + formDTO.setFaceImg(tokenDto.getFaceImg()); + formDTO.setRealName(tokenDto.getRealName()); + formDTO.setPublishMobile(tokenDto.getMobile()); + formDTO.setNickname(tokenDto.getNickname()); + + // 机构信息 + Result 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> getSdsList(TokenDto tokenDto,EpdcSelectSdsInfoListFormDTO formDTO) { + return customFeignClient.getSdsList(formDTO); + } + + @Override + public Result getSdsDetail(String id) { + return customFeignClient.getSdsDetail(id); + } + + @Override + public Result sdsPublishOrUpdate(TokenDto tokenDto,EpdcAddSdsFormDTO formDTO) { + if(StringUtils.isBlank(tokenDto.getUserId())){ + return new Result>().error("无效的token"); + } + formDTO.setUserId(tokenDto.getUserId()); + formDTO.setFaceImg(tokenDto.getFaceImg()); + formDTO.setRealName(tokenDto.getRealName()); + formDTO.setPublishMobile(tokenDto.getMobile()); + formDTO.setNickname(tokenDto.getNickname()); + + // 机构信息 + Result 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); + } } diff --git a/esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/service/impl/CheckResultServiceImpl.java b/esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/service/impl/CheckResultServiceImpl.java index 8afc76e6..0045f394 100644 --- a/esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/service/impl/CheckResultServiceImpl.java +++ b/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 + * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/SdsInfoDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/SdsInfoDTO.java new file mode 100644 index 00000000..54ecdc7c --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAddGroupBuyInfoFormDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAddGroupBuyInfoFormDTO.java new file mode 100644 index 00000000..a376ef02 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAddSdsFormDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAddSdsFormDTO.java new file mode 100644 index 00000000..07acf5a7 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; + + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcSelectGroupBuyInfoListFormDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcSelectGroupBuyInfoListFormDTO.java new file mode 100644 index 00000000..9e2a02d4 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcSelectSdsInfoListFormDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcSelectSdsInfoListFormDTO.java new file mode 100644 index 00000000..b90ea9c8 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSelectGroupBuyDetailResultDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSelectGroupBuyDetailResultDTO.java new file mode 100644 index 00000000..99ee0473 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSelectGroupBuyInfoListResultDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSelectGroupBuyInfoListResultDTO.java new file mode 100644 index 00000000..79d6ebbe --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; + + + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSelectSdsInfoDetailResultDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSelectSdsInfoDetailResultDTO.java new file mode 100644 index 00000000..7ae6d3cd --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSelectSdsInfoListResultDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSelectSdsInfoListResultDTO.java new file mode 100644 index 00000000..84d67481 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/controller/EpdcAppGroupBuyInfoController.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/controller/EpdcAppGroupBuyInfoController.java new file mode 100644 index 00000000..ef880bbb --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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> + **/ + @GetMapping("getGroupBuyList") + public Result> 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 + **/ + @GetMapping("getGroupBuyDetail/{id}") + public Result 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); + } +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/controller/GroupBuyInfoController.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/controller/GroupBuyInfoController.java new file mode 100644 index 00000000..50033973 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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> page(@RequestParam Map params){ + PageData page = groupBuyInfoService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + GroupBuyInfoDTO data = groupBuyInfoService.get(id); + return new Result().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 params, HttpServletResponse response) throws Exception { + List list = groupBuyInfoService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, GroupBuyInfoExcel.class); + } + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/dao/GroupBuyInfoDao.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/dao/GroupBuyInfoDao.java new file mode 100644 index 00000000..c012c052 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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 { + /** + * @Description app - 获取首页列表 + * @Author songyunpeng + * @Date 2020/12/2 + * @Param [formDTO] + * @return java.util.List + **/ + List getGroupBuyList(EpdcSelectGroupBuyInfoListFormDTO formDTO); + /** + * @Description 详情 + * @Author songyunpeng + * @Date 2020/12/2 + * @Param [id] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + EpdcSelectGroupBuyDetailResultDTO getGroupBuyDetail(String id); + /** + * @Description 查询需要修改组织机构信息事件 + * @Author songyunpeng + * @Date 2020/11/25 + * @Param [toString] + * @return java.util.List + **/ + List selectListOfOrganizationInfo(String toString); + /** + * @Description 更新部门名 + * @Author songyunpeng + * @Date 2020/11/25 + * @Param [newDeptName, deptId] + * @return void + **/ + void updateGridByDeptId(String newDeptName, Long deptId); +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/entity/GroupBuyInfoEntity.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/entity/GroupBuyInfoEntity.java new file mode 100644 index 00000000..3fcee6d2 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/excel/GroupBuyInfoExcel.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/excel/GroupBuyInfoExcel.java new file mode 100644 index 00000000..3b657982 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; + + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/redis/GroupBuyInfoRedis.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/redis/GroupBuyInfoRedis.java new file mode 100644 index 00000000..e5b26dbb --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; + } + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/service/GroupBuyInfoService.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/service/GroupBuyInfoService.java new file mode 100644 index 00000000..2175da51 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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 { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-12-02 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-12-02 + */ + List list(Map 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> + **/ + Result> getGroupBuyList(EpdcSelectGroupBuyInfoListFormDTO formDTO); + /** + * @Description 详情 + * @Author songyunpeng + * @Date 2020/12/2 + * @Param [id] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + Result getGroupBuyDetail(String id); + /** + * @Description 发布或更新 + * @Author songyunpeng + * @Date 2020/12/2 + * @Param [formDTO] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + 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); +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/service/impl/GroupBuyInfoServiceImpl.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/service/impl/GroupBuyInfoServiceImpl.java new file mode 100644 index 00000000..aa689a13 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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 implements GroupBuyInfoService { + + @Autowired + private GroupBuyInfoRedis groupBuyInfoRedis; + + + @Autowired + private AdminFeignClient adminFeignClient; + + + @Autowired + private ContentSecurityFeignClient contentSecurityFeign; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, GroupBuyInfoDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, GroupBuyInfoDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper 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> getGroupBuyList(EpdcSelectGroupBuyInfoListFormDTO formDTO) { + int pageIndex = (formDTO.getPageIndex() - NumConstant.ONE) * formDTO.getPageSize(); + formDTO.setPageIndex(pageIndex); + + List list = this.baseDao.getGroupBuyList(formDTO); + return new Result().ok(list); + } + + @Override + public Result getGroupBuyDetail(String id) { + //查看详情 新增浏览次数 + GroupBuyInfoEntity groupBuyInfoEntity = selectById(id); + groupBuyInfoEntity.setBrowseNum(groupBuyInfoEntity.getBrowseNum()==null?1:groupBuyInfoEntity.getBrowseNum()+1); + updateById(groupBuyInfoEntity); + return new Result().ok(this.baseDao.getGroupBuyDetail(id)); + } + + @Override + public Result publishOrUpdate(EpdcAddGroupBuyInfoFormDTO formDTO) { + //内容审核 - start + Boolean isConReview = formDTO.getIsConReview(); + List 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 eventsList = baseDao.selectListOfOrganizationInfo(dto.getDeptId().toString()); + if (null != eventsList && eventsList.size() > 0) { + // 组织机构信息处理 + List 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 + * @params [dto, userList] + * @author liuchuang + * @since 2020/3/7 15:22 + */ + private List handleOrganizationInfo(OrganizationModifyDTO dto, List userList) { + List entities = new ArrayList<>(); + for (GroupBuyInfoDTO user : userList) { + GroupBuyInfoEntity entity = new GroupBuyInfoEntity(); + if (StringUtils.isNotEmpty(user.getParentDeptIds()) && StringUtils.isNotEmpty(user.getParentDeptNames())) { + List parentDeptIds = Arrays.asList(user.getParentDeptIds().split(",")); + List 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 allDeptIds = Arrays.asList(user.getAllDeptIds().split(",")); + List 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; + } +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/service/impl/ReportIssueServiceImpl.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/service/impl/ReportIssueServiceImpl.java index c39d910a..024cac29 100644 --- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/service/impl/ReportIssueServiceImpl.java +++ b/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 @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 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()); diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/consumer/RejectCheckRecordConsumer.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/consumer/RejectCheckRecordConsumer.java index 743d472f..b49b20f2 100644 --- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/consumer/RejectCheckRecordConsumer.java +++ b/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 { @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 { 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); diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/controller/EpdcAppSdsInfoController.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/controller/EpdcAppSdsInfoController.java new file mode 100644 index 00000000..b964b1c8 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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> + **/ + @GetMapping("getSdsList") + public Result> 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 + **/ + @GetMapping("getSdsDetail/{id}") + public Result 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); + } +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/controller/SdsInfoController.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/controller/SdsInfoController.java new file mode 100644 index 00000000..96b82128 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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> page(@RequestParam Map params){ + PageData page = sdsInfoService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + SdsInfoDTO data = sdsInfoService.get(id); + return new Result().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 params, HttpServletResponse response) throws Exception { + List list = sdsInfoService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, SdsInfoExcel.class); + } + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/dao/SdsInfoDao.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/dao/SdsInfoDao.java new file mode 100644 index 00000000..9d49df31 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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 { + /** + * @Description 小程序-获取首页列表 + * @Author songyunpeng + * @Date 2020/12/3 + * @Param [formDTO] + * @return java.util.List + **/ + List getSdsList(EpdcSelectSdsInfoListFormDTO formDTO); + /** + * @Description 小程序-获取列表详情 + * @Author songyunpeng + * @Date 2020/12/3 + * @Param [id] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + EpdcSelectSdsInfoDetailResultDTO getSdsDetail(String id); + + /** + * @Description 查询需要修改组织机构信息事件 + * @Author songyunpeng + * @Date 2020/11/25 + * @Param [toString] + * @return java.util.List + **/ + List selectListOfOrganizationInfo(String toString); + /** + * @Description 更新部门名 + * @Author songyunpeng + * @Date 2020/11/25 + * @Param [newDeptName, deptId] + * @return void + **/ + void updateGridByDeptId(String newDeptName, Long deptId); +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/entity/SdsInfoEntity.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/entity/SdsInfoEntity.java new file mode 100644 index 00000000..e80f7c1d --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/excel/SdsInfoExcel.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/excel/SdsInfoExcel.java new file mode 100644 index 00000000..2d06842c --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; + + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/redis/SdsInfoRedis.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/redis/SdsInfoRedis.java new file mode 100644 index 00000000..50881875 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; + } + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/service/SdsInfoService.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/service/SdsInfoService.java new file mode 100644 index 00000000..3178b2b2 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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 { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-12-02 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-12-02 + */ + List list(Map 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> + **/ + Result> getSdsList(EpdcSelectSdsInfoListFormDTO formDTO); + /** + * @Description 小程序-获取列表详情 + * @Author songyunpeng + * @Date 2020/12/3 + * @Param [id] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + Result 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); +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/service/impl/SdsInfoServiceImpl.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/service/impl/SdsInfoServiceImpl.java new file mode 100644 index 00000000..3b504984 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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 implements SdsInfoService { + + @Autowired + private SdsInfoRedis sdsInfoRedis; + + @Autowired + private AdminFeignClient adminFeignClient; + + + @Autowired + private ContentSecurityFeignClient contentSecurityFeign; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, SdsInfoDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, SdsInfoDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper 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> getSdsList(EpdcSelectSdsInfoListFormDTO formDTO) { + int pageIndex = (formDTO.getPageIndex() - NumConstant.ONE) * formDTO.getPageSize(); + formDTO.setPageIndex(pageIndex); + + List list = this.baseDao.getSdsList(formDTO); + return new Result().ok(list); + } + + @Override + public Result getSdsDetail(String id) { + //查看详情 新增浏览次数 + SdsInfoEntity sdsInfoEntity = selectById(id); + sdsInfoEntity.setBrowseNum(sdsInfoEntity.getBrowseNum()==null?1:sdsInfoEntity.getBrowseNum()+1); + updateById(sdsInfoEntity); + return new Result().ok(this.baseDao.getSdsDetail(id)); + } + + @Override + public Result publishOrUpdate(EpdcAddSdsFormDTO formDTO) { + //内容审核 - start + Boolean isConReview = formDTO.getIsConReview(); + List 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 eventsList = baseDao.selectListOfOrganizationInfo(dto.getDeptId().toString()); + if (null != eventsList && eventsList.size() > 0) { + // 组织机构信息处理 + List 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 + * @params [dto, userList] + * @author liuchuang + * @since 2020/3/7 15:22 + */ + private List handleOrganizationInfo(OrganizationModifyDTO dto, List userList) { + List entities = new ArrayList<>(); + for (SdsInfoDTO user : userList) { + SdsInfoEntity entity = new SdsInfoEntity(); + if (StringUtils.isNotEmpty(user.getParentDeptIds()) && StringUtils.isNotEmpty(user.getParentDeptNames())) { + List parentDeptIds = Arrays.asList(user.getParentDeptIds().split(",")); + List 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 allDeptIds = Arrays.asList(user.getAllDeptIds().split(",")); + List 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; + } +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/groupBuy/GroupBuyInfoDao.xml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/groupBuy/GroupBuyInfoDao.xml new file mode 100644 index 00000000..3bc234a7 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/groupBuy/GroupBuyInfoDao.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + UPDATE epdc_group_buy_info SET GRID = #{newDeptName}, UPDATED_TIME = NOW() WHERE GRID_ID = #{deptId} + + + \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/sds/SdsInfoDao.xml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/sds/SdsInfoDao.xml new file mode 100644 index 00000000..fa580131 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/sds/SdsInfoDao.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + UPDATE epdc_sds_info SET GRID = #{newDeptName}, UPDATED_TIME = NOW() WHERE GRID_ID = #{deptId} + + \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActApplyInfoServiceImpl.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActApplyInfoServiceImpl.java index 70023385..45f243a3 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActApplyInfoServiceImpl.java +++ b/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