From 88eb999bb3c262a7b34e0cc7d53d3862765b2b40 Mon Sep 17 00:00:00 2001 From: liuchuang <123456> Date: Mon, 24 Aug 2020 15:02:23 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8A=9F=E8=83=BD=201?= =?UTF-8?q?=E3=80=81=E6=B4=BB=E5=8A=A8=E5=A2=9E=E5=8A=A0=E5=85=AC=E7=9B=8A?= =?UTF-8?q?=E6=97=B6=E9=95=BF=E5=AD=97=E6=AE=B5=202=E3=80=81=E5=BF=97?= =?UTF-8?q?=E5=8F=8B=E6=9C=B5=E6=9C=B5=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=98=B5=E7=A7=B0=E6=A3=80=E7=B4=A2=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=203=E3=80=81=E5=85=9A=E7=BE=A41+1=E8=AF=9D=E9=A2=98?= =?UTF-8?q?=E5=B1=8F=E8=94=BD=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ApiPartyGroupController.java | 30 +++++++++ .../epdc/feign/PartyGroupFeignClient.java | 22 +++++++ .../PartyGroupFeignClientFallback.java | 11 ++++ .../esua/epdc/service/PartyGroupService.java | 20 ++++++ .../service/impl/PartyGroupServiceImpl.java | 10 +++ .../elink/esua/epdc/activity/ActInfoDTO.java | 5 ++ .../activity/entity/ActInfoEntity.java | 5 ++ .../impl/ActUserClockLogServiceImpl.java | 3 +- .../elink/esua/epdc/dto/PartyTopicDTO.java | 20 ++++++ .../dto/form/PartyTopicShieldFormDTO.java | 41 ++++++++++++ .../dto/result/PartyTopicDetailResultDTO.java | 62 +++++++++++++++++++ .../elink/esua/epdc/dto/result/TopicList.java | 10 +++ .../controller/AppPartyTopicController.java | 34 ++++++++-- .../elink/esua/epdc/dao/PartyTopicDao.java | 11 ++++ .../esua/epdc/entity/PartyTopicEntity.java | 20 ++++++ .../esua/epdc/service/PartyTopicService.java | 26 ++++++-- .../service/impl/PartyTopicServiceImpl.java | 20 ++++-- .../main/resources/mapper/PartyTopicDao.xml | 40 ++++++++++++ .../form/EpdcAppVolunteerListFormDTO.java | 5 ++ .../resources/mapper/VolunteerInfoDao.xml | 3 + 20 files changed, 385 insertions(+), 13 deletions(-) create mode 100644 esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/form/PartyTopicShieldFormDTO.java create mode 100644 esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/result/PartyTopicDetailResultDTO.java diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiPartyGroupController.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiPartyGroupController.java index 22c50ea6..888962cd 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiPartyGroupController.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiPartyGroupController.java @@ -3,6 +3,7 @@ package com.elink.esua.epdc.controller; import com.elink.esua.epdc.common.token.dto.TokenDto; import com.elink.esua.epdc.commons.tools.annotation.LoginUser; import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; import com.elink.esua.epdc.dto.form.*; import com.elink.esua.epdc.dto.result.*; import com.elink.esua.epdc.service.PartyGroupService; @@ -173,4 +174,33 @@ public class ApiPartyGroupController { return partyGroupService.getGuideInfo(partyGroupId); } + /** + * 屏蔽话题 + * + * @param formDto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author Liuchuang + * @since 2020/8/24 13:38 + */ + @PostMapping("shield") + public Result shieldTopic(@LoginUser TokenDto userDetail, @RequestBody PartyTopicShieldFormDTO formDto) { + ValidatorUtils.validateEntity(formDto); + formDto.setShieldUserId(userDetail.getUserId()); + formDto.setShieldUserName(userDetail.getNickname()); + return partyGroupService.shieldTopic(formDto); + } + + /** + * 话题详情 + * + * @param id 话题ID + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author Liuchuang + * @since 2020/8/24 14:35 + */ + @GetMapping("detail/{id}") + public Result topicDetail(@PathVariable("id") String id) { + return partyGroupService.getTopicDetailById(id); + } + } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/PartyGroupFeignClient.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/PartyGroupFeignClient.java index 4df0afee..e570d3ac 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/PartyGroupFeignClient.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/PartyGroupFeignClient.java @@ -151,4 +151,26 @@ public interface PartyGroupFeignClient { **/ @GetMapping(value = "partyGroup/epdc-app/partygroupguide/group/guideInfo/{partyGroupId}", consumes = MediaType.APPLICATION_JSON_VALUE) Result> getGuideInfo(@PathVariable("partyGroupId") String partyGroupId); + + /** + * 屏蔽话题 + * + * @param formDto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author Liuchuang + * @since 2020/8/24 13:55 + */ + @PostMapping(value = "partyGroup/topic/shield", consumes = MediaType.APPLICATION_JSON_VALUE) + Result shieldTopic(PartyTopicShieldFormDTO formDto); + + /** + * 话题详情 + * + * @param id 话题ID + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author Liuchuang + * @since 2020/8/24 14:50 + */ + @GetMapping(value = "partyGroup/topic/detail/{id}", consumes = MediaType.APPLICATION_JSON_VALUE) + Result getTopicDetailById(@PathVariable("id") String id); } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/PartyGroupFeignClientFallback.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/PartyGroupFeignClientFallback.java index e948313d..2aa76bbf 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/PartyGroupFeignClientFallback.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/PartyGroupFeignClientFallback.java @@ -7,6 +7,7 @@ import com.elink.esua.epdc.dto.form.*; import com.elink.esua.epdc.dto.result.*; import com.elink.esua.epdc.feign.PartyGroupFeignClient; import org.springframework.stereotype.Component; +import org.springframework.web.bind.annotation.PathVariable; import java.util.List; @@ -87,4 +88,14 @@ public class PartyGroupFeignClientFallback implements PartyGroupFeignClient { public Result> getGuideInfo(String partyGroupId) { return ModuleUtils.feignConError(ServiceConstant.EPDC_PARTY_GROUP_SERVER, "getGuideInfo",partyGroupId); } + + @Override + public Result shieldTopic(PartyTopicShieldFormDTO formDto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_PARTY_GROUP_SERVER, "shieldTopic",formDto); + } + + @Override + public Result getTopicDetailById(String id) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_PARTY_GROUP_SERVER, "getTopicDetailById",id); + } } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/PartyGroupService.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/PartyGroupService.java index 654f2c44..6f648e9a 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/PartyGroupService.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/PartyGroupService.java @@ -119,4 +119,24 @@ public interface PartyGroupService { * @Date 13:48 2020-06-17 **/ Result> getGuideInfo(String partyGroupId); + + /** + * 屏蔽话题 + * + * @param formDto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author Liuchuang + * @since 2020/8/24 13:40 + */ + Result shieldTopic(PartyTopicShieldFormDTO formDto); + + /** + * 话题详情 + * + * @param id 话题ID + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author Liuchuang + * @since 2020/8/24 14:48 + */ + Result getTopicDetailById(String id); } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/PartyGroupServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/PartyGroupServiceImpl.java index 5a8bbcbc..9b501eb5 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/PartyGroupServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/PartyGroupServiceImpl.java @@ -157,4 +157,14 @@ public class PartyGroupServiceImpl implements PartyGroupService { public Result> getGuideInfo(String partyGroupId) { return partyGroupFeignClient.getGuideInfo(partyGroupId); } + + @Override + public Result shieldTopic(PartyTopicShieldFormDTO formDto) { + return partyGroupFeignClient.shieldTopic(formDto); + } + + @Override + public Result getTopicDetailById(String id) { + return partyGroupFeignClient.getTopicDetailById(id); + } } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActInfoDTO.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActInfoDTO.java index 9956ae7d..2dfe2392 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActInfoDTO.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActInfoDTO.java @@ -224,4 +224,9 @@ public class ActInfoDTO implements Serializable { *是否提交为内容待审核状态 */ private Boolean isConReview; + + /** + * 公益时长 + */ + private Integer kindnessTime; } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActInfoEntity.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActInfoEntity.java index 1a19f9f3..f76f2b29 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActInfoEntity.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActInfoEntity.java @@ -205,4 +205,9 @@ public class ActInfoEntity extends BaseEpdcEntity { * 活动新闻稿 */ private String actNewsContent; + + /** + * 公益时长 + */ + private Integer kindnessTime; } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserClockLogServiceImpl.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserClockLogServiceImpl.java index d28a2c6f..41dd6307 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserClockLogServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserClockLogServiceImpl.java @@ -64,6 +64,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.math.BigDecimal; import java.util.*; /** @@ -410,7 +411,7 @@ public class ActUserClockLogServiceImpl extends BaseServiceImpl images; + + /** + * 屏蔽标识:0-否,1-是 + */ + private String shieldFlag; + + /** + * 屏蔽原因 + */ + private String shieldReason; +} diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/result/TopicList.java b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/result/TopicList.java index 513ce52c..49bef853 100644 --- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/result/TopicList.java +++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/result/TopicList.java @@ -106,6 +106,16 @@ public class TopicList implements Serializable { */ private String thisCommunity; + /** + * 屏蔽标识:0-否,1-是 + */ + private String shieldFlag; + + /** + * 屏蔽原因 + */ + private String shieldReason; + /** * 评论列表 */ diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/controller/AppPartyTopicController.java b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/controller/AppPartyTopicController.java index 324397f4..e6ef0ea9 100644 --- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/controller/AppPartyTopicController.java +++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/controller/AppPartyTopicController.java @@ -19,10 +19,8 @@ package com.elink.esua.epdc.controller; 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.MyPartyTopicFormDTO; -import com.elink.esua.epdc.dto.form.PartyTopicFormDTO; -import com.elink.esua.epdc.dto.form.PartyTopicSubmitFormDTO; -import com.elink.esua.epdc.dto.form.TopicStatementFormDTO; +import com.elink.esua.epdc.dto.form.*; +import com.elink.esua.epdc.dto.result.PartyTopicDetailResultDTO; import com.elink.esua.epdc.dto.result.PartyTopicResultDTO; import com.elink.esua.epdc.service.PartyTopicService; import org.springframework.beans.factory.annotation.Autowired; @@ -89,4 +87,32 @@ public class AppPartyTopicController { return new Result(); } + /** + * 屏蔽话题 + * + * @param formDto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author Liuchuang + * @since 2020/8/24 13:38 + */ + @PostMapping("shield") + public Result shieldTopic(@RequestBody PartyTopicShieldFormDTO formDto) { + return partyTopicService.shieldTopic(formDto); + } + + /** + * 话题详情 + * + * @param id 话题ID + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author Liuchuang + * @since 2020/8/24 14:35 + */ + @GetMapping("detail/{id}") + public Result topicDetail(@PathVariable("id") String id) { + PartyTopicDetailResultDTO data = partyTopicService.getTopicDetailById(id); + + return new Result().ok(data); + } + } \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/dao/PartyTopicDao.java b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/dao/PartyTopicDao.java index 70fe5d9b..c15b5794 100644 --- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/dao/PartyTopicDao.java +++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/dao/PartyTopicDao.java @@ -21,6 +21,7 @@ import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; import com.elink.esua.epdc.dto.PartyTopicDTO; import com.elink.esua.epdc.dto.form.MyPartyTopicFormDTO; import com.elink.esua.epdc.dto.form.PartyTopicFormDTO; +import com.elink.esua.epdc.dto.result.PartyTopicDetailResultDTO; import com.elink.esua.epdc.dto.result.TopicList; import com.elink.esua.epdc.entity.PartyTopicEntity; import org.apache.ibatis.annotations.Mapper; @@ -96,4 +97,14 @@ public interface PartyTopicDao extends BaseDao { * @return void */ void rejectTopicInfo(@Param("relationId") String relationId); + + /** + * 话题详情 + * + * @param id 话题ID + * @return com.elink.esua.epdc.dto.result.PartyTopicDetailResultDTO + * @author Liuchuang + * @since 2020/8/24 14:32 + */ + PartyTopicDetailResultDTO selectOneOfTopicDetailById(@Param("id") String id); } \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/entity/PartyTopicEntity.java b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/entity/PartyTopicEntity.java index cdfeadba..c6bca55f 100644 --- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/entity/PartyTopicEntity.java +++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/entity/PartyTopicEntity.java @@ -149,4 +149,24 @@ public class PartyTopicEntity extends BaseEpdcEntity { */ private String remark; + /** + * 屏蔽标识:0-否,1-是 + */ + private String shieldFlag; + + /** + * 屏蔽原因 + */ + private String shieldReason; + + /** + * 屏蔽人ID + */ + private String shieldUserId; + + /** + * 屏蔽人 + */ + private String shieldUserName; + } \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/PartyTopicService.java b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/PartyTopicService.java index da85313c..f81879c4 100644 --- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/PartyTopicService.java +++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/PartyTopicService.java @@ -22,10 +22,8 @@ import com.elink.esua.epdc.commons.tools.page.PageData; import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.dto.GroupTopicCloseFormDTO; import com.elink.esua.epdc.dto.PartyTopicDTO; -import com.elink.esua.epdc.dto.form.MyPartyTopicFormDTO; -import com.elink.esua.epdc.dto.form.PartyTopicFormDTO; -import com.elink.esua.epdc.dto.form.PartyTopicSubmitFormDTO; -import com.elink.esua.epdc.dto.form.TopicStatementFormDTO; +import com.elink.esua.epdc.dto.form.*; +import com.elink.esua.epdc.dto.result.PartyTopicDetailResultDTO; import com.elink.esua.epdc.dto.result.PartyTopicResultDTO; import com.elink.esua.epdc.entity.PartyTopicEntity; import com.elink.esua.epdc.rocketmq.dto.RejectRecordDTO; @@ -172,4 +170,24 @@ public interface PartyTopicService extends BaseService { * @return com.elink.esua.epdc.commons.tools.utils.Result */ Result rejectTopicInfo(RejectRecordDTO dto); + + /** + * 屏蔽话题 + * + * @param formDto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author Liuchuang + * @since 2020/8/24 13:40 + */ + Result shieldTopic(PartyTopicShieldFormDTO formDto); + + /** + * 话题详情 + * + * @param id 话题ID + * @return com.elink.esua.epdc.dto.result.PartyTopicDetailResultDTO + * @author Liuchuang + * @since 2020/8/24 14:33 + */ + PartyTopicDetailResultDTO getTopicDetailById(String id); } \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTopicServiceImpl.java b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTopicServiceImpl.java index 1c938f33..b112da8d 100644 --- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTopicServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTopicServiceImpl.java @@ -39,10 +39,8 @@ import com.elink.esua.epdc.dto.PartyTopicDTO; import com.elink.esua.epdc.dto.PartyTopicUserAttitudeDTO; import com.elink.esua.epdc.dto.PartyUserGroupDTO; import com.elink.esua.epdc.dto.constant.PartyGroupConstant; -import com.elink.esua.epdc.dto.form.MyPartyTopicFormDTO; -import com.elink.esua.epdc.dto.form.PartyTopicFormDTO; -import com.elink.esua.epdc.dto.form.PartyTopicSubmitFormDTO; -import com.elink.esua.epdc.dto.form.TopicStatementFormDTO; +import com.elink.esua.epdc.dto.form.*; +import com.elink.esua.epdc.dto.result.PartyTopicDetailResultDTO; import com.elink.esua.epdc.dto.result.PartyTopicResultDTO; import com.elink.esua.epdc.dto.result.TopicList; import com.elink.esua.epdc.entity.PartyTopicEntity; @@ -312,4 +310,18 @@ public class PartyTopicServiceImpl extends BaseServiceImpl + + @@ -202,6 +204,7 @@ epdc_party_topic t1 WHERE t1.DEL_FLAG = '0' and t1.STATE = '0' + AND t1.SHIELD_FLAG = '0' #{timestamp} @@ -231,6 +234,8 @@ t.SUPPORT_NUM, t.COMMENT_NUM, t.TOPIC_ADDRESS, + t.SHIELD_FLAG, + t.SHIELD_REASON, if( ATTITUDE_FLAG='0',1,0)likeFlag, @@ -279,4 +284,39 @@ UPDATE epdc_party_topic SET DEL_FLAG = 1,UPDATED_TIME=NOW() where id=#{relationId} + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcAppVolunteerListFormDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcAppVolunteerListFormDTO.java index 5b76ff64..1b27ed97 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcAppVolunteerListFormDTO.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcAppVolunteerListFormDTO.java @@ -30,4 +30,9 @@ public class EpdcAppVolunteerListFormDTO { * 数据权限 */ private Long gridId; + + /** + * 搜索条件:昵称 + */ + private String nickname; } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml index 8df20240..07cdce4c 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml @@ -228,6 +228,9 @@ WHERE v.DEL_FLAG = 0 AND v.AUDIT_STATUS != 2 + + AND v.VOLUNTEER_NICKNAME like concat('%', #{nickname.trim()}, '%') + ORDER BY v.VOLUNTEER_ORDER ASC ,CONVERT(v.VOLUNTEER_NICKNAME USING gbk) LIMIT #{pageIndex},#{pageSize} From 8f24fcd136f2a94ee6962449f063866e25ae8af7 Mon Sep 17 00:00:00 2001 From: liuchuang <123456> Date: Mon, 24 Aug 2020 15:22:10 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E8=AF=9D=E9=A2=98=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0=E5=BD=93=E5=89=8D=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E7=BE=A4=E8=BA=AB=E4=BB=BD=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/elink/esua/epdc/dto/result/PartyTopicResultDTO.java | 4 ++++ .../elink/esua/epdc/service/impl/PartyTopicServiceImpl.java | 1 + 2 files changed, 5 insertions(+) diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/result/PartyTopicResultDTO.java b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/result/PartyTopicResultDTO.java index 059c2d49..80364cb1 100644 --- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/result/PartyTopicResultDTO.java +++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/result/PartyTopicResultDTO.java @@ -37,6 +37,10 @@ public class PartyTopicResultDTO implements Serializable { */ String bannedFlag; + /** + * 当前用户身份:0:群主 1:副群主 2:群成员 + */ + private String currentUserIdentity; /** * 话题列表 diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTopicServiceImpl.java b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTopicServiceImpl.java index b112da8d..a0b8dee7 100644 --- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTopicServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTopicServiceImpl.java @@ -172,6 +172,7 @@ public class PartyTopicServiceImpl extends BaseServiceImpl().ok(partyTopicResultDTO); } From 859f1ca77a69c1c14389bbd196863c2eced4b27d Mon Sep 17 00:00:00 2001 From: liuchuang <123456> Date: Tue, 25 Aug 2020 17:46:16 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E8=AF=9D=E9=A2=98?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E3=80=81=E5=B1=8F=E8=94=BD=E8=AF=9D=E9=A2=98?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epdc/controller/ApiPartyGroupController.java | 4 ++-- .../epdc/service/impl/PartyTopicServiceImpl.java | 12 +++++++----- .../src/main/resources/mapper/PartyTopicDao.xml | 4 ++-- .../epdc/service/impl/VolunteerInfoServiceImpl.java | 1 + .../src/main/resources/mapper/VolunteerInfoDao.xml | 4 ++-- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiPartyGroupController.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiPartyGroupController.java index 888962cd..9d94bd37 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiPartyGroupController.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiPartyGroupController.java @@ -182,7 +182,7 @@ public class ApiPartyGroupController { * @author Liuchuang * @since 2020/8/24 13:38 */ - @PostMapping("shield") + @PostMapping("topic/shield") public Result shieldTopic(@LoginUser TokenDto userDetail, @RequestBody PartyTopicShieldFormDTO formDto) { ValidatorUtils.validateEntity(formDto); formDto.setShieldUserId(userDetail.getUserId()); @@ -198,7 +198,7 @@ public class ApiPartyGroupController { * @author Liuchuang * @since 2020/8/24 14:35 */ - @GetMapping("detail/{id}") + @GetMapping("topic/detail/{id}") public Result topicDetail(@PathVariable("id") String id) { return partyGroupService.getTopicDetailById(id); } diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTopicServiceImpl.java b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTopicServiceImpl.java index a0b8dee7..099f2788 100644 --- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTopicServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTopicServiceImpl.java @@ -167,12 +167,14 @@ public class PartyTopicServiceImpl extends BaseServiceImpl().ok(partyTopicResultDTO); } diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyTopicDao.xml b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyTopicDao.xml index 62c5b9df..e00186e3 100644 --- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyTopicDao.xml +++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyTopicDao.xml @@ -285,7 +285,7 @@ where id=#{relationId} - + @@ -298,7 +298,7 @@ - SELECT t.ID, t.TOPIC_CONTENT, diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java index 9578085e..78c4760b 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java @@ -402,6 +402,7 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl listVolunteerV2(EpdcAppVolunteerListFormDTO dto) { int pageIndex = (dto.getPageIndex() - NumConstant.ONE) * dto.getPageSize(); dto.setPageIndex(pageIndex); + dto.setNickname(dto.getNickname().trim()); List data = baseDao.selectListVolunteer(dto); EpdcAppVolunteerListCountResultDTO volunteerListCountResultDTO = new EpdcAppVolunteerListCountResultDTO(); volunteerListCountResultDTO.setVolunteerCount(baseDao.selectListVolunteerCount()); diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml index 07cdce4c..08f097f2 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml @@ -228,8 +228,8 @@ WHERE v.DEL_FLAG = 0 AND v.AUDIT_STATUS != 2 - - AND v.VOLUNTEER_NICKNAME like concat('%', #{nickname.trim()}, '%') + + AND v.VOLUNTEER_NICKNAME like concat('%', #{nickname}, '%') ORDER BY v.VOLUNTEER_ORDER ASC ,CONVERT(v.VOLUNTEER_NICKNAME USING gbk) LIMIT #{pageIndex},#{pageSize} From 1e218867b33dc222c165bc8b960ce7190e5ffd46 Mon Sep 17 00:00:00 2001 From: songyunpeng Date: Wed, 26 Aug 2020 10:38:57 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E8=AF=9D=E9=A2=98=E8=BD=AC=E8=AE=AE?= =?UTF-8?q?=E9=A2=98=20=E5=86=85=E5=AE=B9=E5=AE=A1=E6=A0=B8bug=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/topic/service/impl/TopicServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/java/com.elink.esua.epdc/modules/topic/service/impl/TopicServiceImpl.java b/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/java/com.elink.esua.epdc/modules/topic/service/impl/TopicServiceImpl.java index 080c0334..73b6fec2 100644 --- a/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/java/com.elink.esua.epdc/modules/topic/service/impl/TopicServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/java/com.elink.esua.epdc/modules/topic/service/impl/TopicServiceImpl.java @@ -306,6 +306,7 @@ public class TopicServiceImpl extends BaseServiceImpl imp eventSubmitFormDto.setChangeUserId(null); eventSubmitFormDto.setChangeUsername(formDto.getNickname()); eventSubmitFormDto.setChangeUserMobile(formDto.getMobile()); + eventSubmitFormDto.setIsConReview(true); Result eventResult = eventFeignClient.submitEvent(eventSubmitFormDto); if (!eventResult.success()) { return eventResult; From 68cf01ab32a5f89080464ba9fcbd0d234c9dec41 Mon Sep 17 00:00:00 2001 From: liuchuang <123456> Date: Fri, 28 Aug 2020 14:56:13 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E5=BF=97=E6=84=BF=E8=80=85=E7=88=B1?= =?UTF-8?q?=E5=BF=83=E6=97=B6=E9=95=BF=E4=BF=9D=E5=AD=98=E4=B8=BA=E5=B0=8F?= =?UTF-8?q?=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../activity/service/impl/ActUserClockLogServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserClockLogServiceImpl.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserClockLogServiceImpl.java index 41dd6307..01350a93 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserClockLogServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserClockLogServiceImpl.java @@ -411,7 +411,7 @@ public class ActUserClockLogServiceImpl extends BaseServiceImpl Date: Wed, 2 Sep 2020 14:00:03 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=8A=9F=E8=83=BD=20init?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/constant/FieldConstant.java | 9 ++ .../esua/epdc/dto/events/EventTagDTO.java | 91 ++++++++++++++ .../epdc/dto/events/EventTagRelationDTO.java | 81 +++++++++++++ .../events/controller/EventTagController.java | 94 +++++++++++++++ .../EventTagRelationController.java | 94 +++++++++++++++ .../epdc/modules/events/dao/EventTagDao.java | 33 ++++++ .../events/dao/EventTagRelationDao.java | 33 ++++++ .../modules/events/entity/EventTagEntity.java | 61 ++++++++++ .../events/entity/EventTagRelationEntity.java | 51 ++++++++ .../modules/events/excel/EventTagExcel.java | 68 +++++++++++ .../events/excel/EventTagRelationExcel.java | 62 ++++++++++ .../modules/events/redis/EventTagRedis.java | 47 ++++++++ .../events/redis/EventTagRelationRedis.java | 47 ++++++++ .../service/EventTagRelationService.java | 105 ++++++++++++++++ .../events/service/EventTagService.java | 96 +++++++++++++++ .../impl/EventTagRelationServiceImpl.java | 109 +++++++++++++++++ .../service/impl/EventTagServiceImpl.java | 112 ++++++++++++++++++ .../resources/mapper/events/EventTagDao.xml | 7 ++ .../mapper/events/EventTagRelationDao.xml | 7 ++ 19 files changed, 1207 insertions(+) create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/EventTagDTO.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/EventTagRelationDTO.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EventTagController.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EventTagRelationController.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/dao/EventTagDao.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/dao/EventTagRelationDao.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/entity/EventTagEntity.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/entity/EventTagRelationEntity.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/excel/EventTagExcel.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/excel/EventTagRelationExcel.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/redis/EventTagRedis.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/redis/EventTagRelationRedis.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/EventTagRelationService.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/EventTagService.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EventTagRelationServiceImpl.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EventTagServiceImpl.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EventTagDao.xml create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EventTagRelationDao.xml diff --git a/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/constant/FieldConstant.java b/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/constant/FieldConstant.java index 486d32ab..8818dd2a 100644 --- a/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/constant/FieldConstant.java +++ b/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/constant/FieldConstant.java @@ -55,4 +55,13 @@ public interface FieldConstant { String DEPT_ID = "DEPT_ID"; String DEPT_ID_HUMP = "deptId"; + String SORT = "SORT"; + String SORT_HUMP = "sort"; + + String TAG_NAME = "TAG_NAME"; + String TAG_NAME_HUMP = "tagName"; + + String TAG_ID = "TAG_ID"; + String TAG_ID_HUMP = "tagId"; + } diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/EventTagDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/EventTagDTO.java new file mode 100644 index 00000000..a6cb2464 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/EventTagDTO.java @@ -0,0 +1,91 @@ +/** + * 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.events; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 事件标签表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Data +public class EventTagDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID + */ + private String id; + + /** + * 标签名称 + */ + private String tagName; + + /** + * 描述 + */ + private String description; + + /** + * 排序 + */ + private Integer sort; + + /** + * 启用标识 0:否,1:是 + */ + private String enableFlag; + + /** + * 删除标识 0:否,1:是 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/EventTagRelationDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/EventTagRelationDTO.java new file mode 100644 index 00000000..eb9493a2 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/EventTagRelationDTO.java @@ -0,0 +1,81 @@ +/** + * 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.events; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 事件标签关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Data +public class EventTagRelationDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID + */ + private String id; + + /** + * 标签ID + */ + private String tagId; + + /** + * 事件ID + */ + private String eventId; + + /** + * 删除标识 0:否,1:是 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EventTagController.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EventTagController.java new file mode 100644 index 00000000..ebd1ca27 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EventTagController.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.events.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.dto.events.EventTagDTO; +import com.elink.esua.epdc.modules.events.excel.EventTagExcel; +import com.elink.esua.epdc.modules.events.service.EventTagService; +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-09-02 + */ +@RestController +@RequestMapping("eventtag") +public class EventTagController { + + @Autowired + private EventTagService eventTagService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = eventTagService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + EventTagDTO data = eventTagService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody EventTagDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + eventTagService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody EventTagDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + eventTagService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + eventTagService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = eventTagService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, EventTagExcel.class); + } + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EventTagRelationController.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EventTagRelationController.java new file mode 100644 index 00000000..c8fcc4aa --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EventTagRelationController.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.events.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.dto.events.EventTagRelationDTO; +import com.elink.esua.epdc.modules.events.excel.EventTagRelationExcel; +import com.elink.esua.epdc.modules.events.service.EventTagRelationService; +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-09-02 + */ +@RestController +@RequestMapping("eventtagrelation") +public class EventTagRelationController { + + @Autowired + private EventTagRelationService eventTagRelationService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = eventTagRelationService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + EventTagRelationDTO data = eventTagRelationService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody EventTagRelationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + eventTagRelationService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody EventTagRelationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + eventTagRelationService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + eventTagRelationService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = eventTagRelationService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, EventTagRelationExcel.class); + } + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/dao/EventTagDao.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/dao/EventTagDao.java new file mode 100644 index 00000000..100ad1da --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/dao/EventTagDao.java @@ -0,0 +1,33 @@ +/** + * 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.events.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.modules.events.entity.EventTagEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 事件标签表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Mapper +public interface EventTagDao extends BaseDao { + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/dao/EventTagRelationDao.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/dao/EventTagRelationDao.java new file mode 100644 index 00000000..feeeb967 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/dao/EventTagRelationDao.java @@ -0,0 +1,33 @@ +/** + * 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.events.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.modules.events.entity.EventTagRelationEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 事件标签关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Mapper +public interface EventTagRelationDao extends BaseDao { + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/entity/EventTagEntity.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/entity/EventTagEntity.java new file mode 100644 index 00000000..de15312e --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/entity/EventTagEntity.java @@ -0,0 +1,61 @@ +/** + * 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.events.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-09-02 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_event_tag") +public class EventTagEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 标签名称 + */ + private String tagName; + + /** + * 描述 + */ + private String description; + + /** + * 排序 + */ + private Integer sort; + + /** + * 启用标识 0:否,1:是 + */ + private String enableFlag; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/entity/EventTagRelationEntity.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/entity/EventTagRelationEntity.java new file mode 100644 index 00000000..4c9793bd --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/entity/EventTagRelationEntity.java @@ -0,0 +1,51 @@ +/** + * 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.events.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-09-02 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_event_tag_relation") +public class EventTagRelationEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 标签ID + */ + private String tagId; + + /** + * 事件ID + */ + private String eventId; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/excel/EventTagExcel.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/excel/EventTagExcel.java new file mode 100644 index 00000000..36751f4a --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/excel/EventTagExcel.java @@ -0,0 +1,68 @@ +/** + * 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.events.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-09-02 + */ +@Data +public class EventTagExcel { + + @Excel(name = "ID") + private String id; + + @Excel(name = "标签名称") + private String tagName; + + @Excel(name = "描述") + private String description; + + @Excel(name = "排序") + private Integer sort; + + @Excel(name = "启用标识 0:否,1:是") + private String enableFlag; + + @Excel(name = "删除标识 0:否,1:是") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/excel/EventTagRelationExcel.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/excel/EventTagRelationExcel.java new file mode 100644 index 00000000..8a161d5c --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/excel/EventTagRelationExcel.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.modules.events.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-09-02 + */ +@Data +public class EventTagRelationExcel { + + @Excel(name = "ID") + private String id; + + @Excel(name = "标签ID") + private String tagId; + + @Excel(name = "事件ID") + private String eventId; + + @Excel(name = "删除标识 0:否,1:是") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/redis/EventTagRedis.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/redis/EventTagRedis.java new file mode 100644 index 00000000..947b55ad --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/redis/EventTagRedis.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.events.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-09-02 + */ +@Component +public class EventTagRedis { + @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-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/redis/EventTagRelationRedis.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/redis/EventTagRelationRedis.java new file mode 100644 index 00000000..d4636449 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/redis/EventTagRelationRedis.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.events.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-09-02 + */ +@Component +public class EventTagRelationRedis { + @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-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/EventTagRelationService.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/EventTagRelationService.java new file mode 100644 index 00000000..49019eec --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/EventTagRelationService.java @@ -0,0 +1,105 @@ +/** + * 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.events.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.dto.events.EventTagRelationDTO; +import com.elink.esua.epdc.modules.events.entity.EventTagRelationEntity; + +import java.util.List; +import java.util.Map; + +/** + * 事件标签关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +public interface EventTagRelationService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-09-02 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-09-02 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return EventTagRelationDTO + * @author generator + * @date 2020-09-02 + */ + EventTagRelationDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-02 + */ + void save(EventTagRelationDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-02 + */ + void update(EventTagRelationDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-09-02 + */ + void delete(String[] ids); + + /** + * 校验标签是否被使用 + * + * @param tagId 标签ID + * @return java.lang.Boolean + * @author Liuchuang + * @since 2020/9/2 13:41 + */ + Boolean checkTagRelationEvents(String tagId); +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/EventTagService.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/EventTagService.java new file mode 100644 index 00000000..e4c3529b --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/EventTagService.java @@ -0,0 +1,96 @@ +/** + * 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.events.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.dto.events.EventTagDTO; +import com.elink.esua.epdc.modules.events.entity.EventTagEntity; + +import java.util.List; +import java.util.Map; + +/** + * 事件标签表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +public interface EventTagService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-09-02 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-09-02 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return EventTagDTO + * @author generator + * @date 2020-09-02 + */ + EventTagDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-02 + */ + void save(EventTagDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-02 + */ + void update(EventTagDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-09-02 + */ + void delete(String[] ids); + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EventTagRelationServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EventTagRelationServiceImpl.java new file mode 100644 index 00000000..6df583bd --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EventTagRelationServiceImpl.java @@ -0,0 +1,109 @@ +/** + * 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.events.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.NumConstant; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.dto.events.EventTagRelationDTO; +import com.elink.esua.epdc.modules.events.dao.EventTagRelationDao; +import com.elink.esua.epdc.modules.events.entity.EventTagRelationEntity; +import com.elink.esua.epdc.modules.events.service.EventTagRelationService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 事件标签关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Service +public class EventTagRelationServiceImpl extends BaseServiceImpl implements EventTagRelationService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, EventTagRelationDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, EventTagRelationDTO.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 EventTagRelationDTO get(String id) { + EventTagRelationEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, EventTagRelationDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(EventTagRelationDTO dto) { + EventTagRelationEntity entity = ConvertUtils.sourceToTarget(dto, EventTagRelationEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(EventTagRelationDTO dto) { + EventTagRelationEntity entity = ConvertUtils.sourceToTarget(dto, EventTagRelationEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public Boolean checkTagRelationEvents(String tagId) { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(tagId), FieldConstant.TAG_ID, tagId); + wrapper.eq(FieldConstant.DEL_FLAG, NumConstant.ZERO_STR); + int relationCount = baseDao.selectCount(wrapper); + return relationCount > NumConstant.ZERO; + } + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EventTagServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EventTagServiceImpl.java new file mode 100644 index 00000000..9dff64f3 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EventTagServiceImpl.java @@ -0,0 +1,112 @@ +/** + * 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.events.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.NumConstant; +import com.elink.esua.epdc.commons.tools.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.constant.FieldConstant; +import com.elink.esua.epdc.dto.events.EventTagDTO; +import com.elink.esua.epdc.modules.events.dao.EventTagDao; +import com.elink.esua.epdc.modules.events.entity.EventTagEntity; +import com.elink.esua.epdc.modules.events.service.EventTagRelationService; +import com.elink.esua.epdc.modules.events.service.EventTagService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 事件标签表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Service +public class EventTagServiceImpl extends BaseServiceImpl implements EventTagService { + + @Autowired + private EventTagRelationService eventTagRelationService; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.SORT, true), + getWrapper(params) + ); + return getPageData(page, EventTagDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, EventTagDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String tagName = (String)params.get(FieldConstant.TAG_NAME_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.like(FieldConstant.TAG_NAME, tagName.trim()); + + return wrapper; + } + + @Override + public EventTagDTO get(String id) { + EventTagEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, EventTagDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(EventTagDTO dto) { + EventTagEntity entity = ConvertUtils.sourceToTarget(dto, EventTagEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(EventTagDTO dto) { + EventTagEntity entity = ConvertUtils.sourceToTarget(dto, EventTagEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 删除校验 + Boolean relationed = eventTagRelationService.checkTagRelationEvents(ids[NumConstant.ZERO]); + if (relationed) { + throw new RenException("当前标签被使用,不能删除"); + } else { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + } + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EventTagDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EventTagDao.xml new file mode 100644 index 00000000..fba43437 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EventTagDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EventTagRelationDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EventTagRelationDao.xml new file mode 100644 index 00000000..68c7e757 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EventTagRelationDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file From 631a02c14550beea19bafabcc4dd300f99dd4319 Mon Sep 17 00:00:00 2001 From: liuchuang <123456> Date: Wed, 2 Sep 2020 15:12:54 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20init?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epdc/controller/ApiIssueController.java | 13 ++++++++++ .../esua/epdc/feign/IssueFeignClient.java | 11 ++++++++ .../fallback/IssueFeignClientFallback.java | 6 +++++ .../elink/esua/epdc/service/IssueService.java | 10 +++++++ .../epdc/service/impl/IssueServiceImpl.java | 6 +++++ .../dto/events/result/EventTagsResultDTO.java | 26 +++++++++++++++++++ .../controller/EpdcAppEventsController.java | 19 +++++++++++--- .../epdc/modules/events/dao/EventTagDao.java | 11 ++++++++ .../events/service/EpdcEventsService.java | 10 +++++++ .../events/service/EventTagService.java | 10 +++++++ .../service/impl/EpdcEventsServiceImpl.java | 9 +++++++ .../service/impl/EventTagServiceImpl.java | 7 +++++ .../resources/mapper/events/EventTagDao.xml | 3 +++ 13 files changed, 137 insertions(+), 4 deletions(-) create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/result/EventTagsResultDTO.java diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiIssueController.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiIssueController.java index 5ea74f18..a7c4a4e9 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiIssueController.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiIssueController.java @@ -7,6 +7,7 @@ import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.dto.category.CategoryDTO; import com.elink.esua.epdc.dto.events.form.EpdcEventSubmitFormDTO; import com.elink.esua.epdc.dto.events.result.EventAppDetailResultDTO; +import com.elink.esua.epdc.dto.events.result.EventTagsResultDTO; import com.elink.esua.epdc.dto.issue.form.IssueFormDTO; import com.elink.esua.epdc.dto.issue.form.IssuesAndEventsOfMineFormDTO; import com.elink.esua.epdc.dto.issue.form.StatementFormDTO; @@ -213,4 +214,16 @@ public class ApiIssueController { return issueService.categorylist(); } + /** + * 事件标签 + * + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author Liuchuang + * @since 2020/9/2 14:59 + */ + @GetMapping("eventtag/list") + public Result> eventTags(){ + return issueService.listOfEventTags(); + } + } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/IssueFeignClient.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/IssueFeignClient.java index 551adb01..ec5e7e2f 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/IssueFeignClient.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/IssueFeignClient.java @@ -5,6 +5,7 @@ import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.dto.category.CategoryDTO; import com.elink.esua.epdc.dto.events.form.EpdcEventSubmitFormDTO; import com.elink.esua.epdc.dto.events.result.EventAppDetailResultDTO; +import com.elink.esua.epdc.dto.events.result.EventTagsResultDTO; import com.elink.esua.epdc.dto.issue.form.*; import com.elink.esua.epdc.dto.issue.result.*; import com.elink.esua.epdc.feign.fallback.IssueFeignClientFallback; @@ -109,4 +110,14 @@ public interface IssueFeignClient { */ @GetMapping(value = "events/epdc-app/issue/categorylist", consumes = MediaType.APPLICATION_JSON_VALUE) Result> categorylist(); + + /** + * 事件标签 + * + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author Liuchuang + * @since 2020/9/2 15:02 + */ + @GetMapping(value = "events/epdc-app/event/tags", consumes = MediaType.APPLICATION_JSON_VALUE) + Result> eventTags(); } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/IssueFeignClientFallback.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/IssueFeignClientFallback.java index d72b87b9..099273d6 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/IssueFeignClientFallback.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/IssueFeignClientFallback.java @@ -6,6 +6,7 @@ import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.dto.category.CategoryDTO; import com.elink.esua.epdc.dto.events.form.EpdcEventSubmitFormDTO; import com.elink.esua.epdc.dto.events.result.EventAppDetailResultDTO; +import com.elink.esua.epdc.dto.events.result.EventTagsResultDTO; import com.elink.esua.epdc.dto.issue.form.*; import com.elink.esua.epdc.dto.issue.result.*; import com.elink.esua.epdc.feign.IssueFeignClient; @@ -64,4 +65,9 @@ public class IssueFeignClientFallback implements IssueFeignClient { public Result> categorylist() { return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "categorylist", null); } + + @Override + public Result> eventTags() { + return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "eventTags"); + } } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/IssueService.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/IssueService.java index 8bcad640..a7e6ac3b 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/IssueService.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/IssueService.java @@ -5,6 +5,7 @@ import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.dto.category.CategoryDTO; import com.elink.esua.epdc.dto.events.form.EpdcEventSubmitFormDTO; import com.elink.esua.epdc.dto.events.result.EventAppDetailResultDTO; +import com.elink.esua.epdc.dto.events.result.EventTagsResultDTO; import com.elink.esua.epdc.dto.issue.form.IssueFormDTO; import com.elink.esua.epdc.dto.issue.form.IssuesAndEventsOfMineFormDTO; import com.elink.esua.epdc.dto.issue.form.StatementFormDTO; @@ -104,4 +105,13 @@ public interface IssueService { * @return */ Result> categorylist(); + + /** + * 事件标签 + * + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author Liuchuang + * @since 2020/9/2 15:00 + */ + Result> listOfEventTags(); } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/IssueServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/IssueServiceImpl.java index e56dbf16..a2e1a9cc 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/IssueServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/IssueServiceImpl.java @@ -9,6 +9,7 @@ import com.elink.esua.epdc.dto.UploadFormDTO; import com.elink.esua.epdc.dto.category.CategoryDTO; import com.elink.esua.epdc.dto.events.form.EpdcEventSubmitFormDTO; import com.elink.esua.epdc.dto.events.result.EventAppDetailResultDTO; +import com.elink.esua.epdc.dto.events.result.EventTagsResultDTO; import com.elink.esua.epdc.dto.issue.form.*; import com.elink.esua.epdc.dto.issue.result.*; import com.elink.esua.epdc.feign.AdminFeignClient; @@ -190,4 +191,9 @@ public class IssueServiceImpl implements IssueService { public Result> categorylist() { return issueFeignClient.categorylist(); } + + @Override + public Result> listOfEventTags() { + return issueFeignClient.eventTags(); + } } diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/result/EventTagsResultDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/result/EventTagsResultDTO.java new file mode 100644 index 00000000..f5587bce --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/result/EventTagsResultDTO.java @@ -0,0 +1,26 @@ +package com.elink.esua.epdc.dto.events.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 事件标签 + * + * @author Liuchuang + * @since 2020/9/2 14:57 + */ +@Data +public class EventTagsResultDTO implements Serializable { + private static final long serialVersionUID = 3247787241238966543L; + + /** + * 标签ID + */ + private String id; + + /** + * 标签名称 + */ + private String tagName; +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EpdcAppEventsController.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EpdcAppEventsController.java index 07e55be8..b66d7ab3 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EpdcAppEventsController.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EpdcAppEventsController.java @@ -7,14 +7,12 @@ 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.dto.events.form.EpdcEventSubmitFormDTO; import com.elink.esua.epdc.dto.events.form.GroupFormDTO; +import com.elink.esua.epdc.dto.events.result.EventTagsResultDTO; import com.elink.esua.epdc.dto.issue.IssueDTO; import com.elink.esua.epdc.modules.events.entity.EpdcEventsEntity; import com.elink.esua.epdc.modules.events.service.EpdcEventsService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -78,4 +76,17 @@ public class EpdcAppEventsController { return new Result(); } + /** + * 事件标签 + * + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author Liuchuang + * @since 2020/9/2 15:05 + */ + @GetMapping("tags") + public Result> eventTags() { + List data = epdcEventsService.listOfEventTags(); + return new Result>().ok(data); + } + } diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/dao/EventTagDao.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/dao/EventTagDao.java index 100ad1da..2f2d1aa0 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/dao/EventTagDao.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/dao/EventTagDao.java @@ -21,6 +21,8 @@ import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; import com.elink.esua.epdc.modules.events.entity.EventTagEntity; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 事件标签表 * @@ -29,5 +31,14 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface EventTagDao extends BaseDao { + + /** + * 事件标签 + * + * @return java.util.List + * @author Liuchuang + * @since 2020/9/2 15:10 + */ + List selectListOfEventTags(); } \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/EpdcEventsService.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/EpdcEventsService.java index 2faf6a97..b558afc4 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/EpdcEventsService.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/EpdcEventsService.java @@ -25,6 +25,7 @@ import com.elink.esua.epdc.dto.events.form.EpdcEventSubmitFormDTO; import com.elink.esua.epdc.dto.events.form.EpdcEventsReviewFormDTO; import com.elink.esua.epdc.dto.events.form.GroupFormDTO; import com.elink.esua.epdc.dto.events.result.EventAppDetailResultDTO; +import com.elink.esua.epdc.dto.events.result.EventTagsResultDTO; import com.elink.esua.epdc.dto.issue.IssueDTO; import com.elink.esua.epdc.dto.issue.form.IssuePendingResponseFormDTO; import com.elink.esua.epdc.dto.issue.result.IssuePendingResponseResultDTO; @@ -254,4 +255,13 @@ public interface EpdcEventsService extends BaseService { * @return com.elink.esua.epdc.commons.tools.utils.Result */ Result rejectEventsInfo(RejectRecordDTO dto); + + /** + * 事件标签 + * + * @return java.util.List + * @author Liuchuang + * @since 2020/9/2 15:06 + */ + List listOfEventTags(); } diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/EventTagService.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/EventTagService.java index e4c3529b..4c8e7916 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/EventTagService.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/EventTagService.java @@ -20,6 +20,7 @@ package com.elink.esua.epdc.modules.events.service; import com.elink.esua.epdc.commons.mybatis.service.BaseService; import com.elink.esua.epdc.commons.tools.page.PageData; import com.elink.esua.epdc.dto.events.EventTagDTO; +import com.elink.esua.epdc.dto.events.result.EventTagsResultDTO; import com.elink.esua.epdc.modules.events.entity.EventTagEntity; import java.util.List; @@ -93,4 +94,13 @@ public interface EventTagService extends BaseService { */ void delete(String[] ids); + /** + * 事件标签 + * + * @return java.util.List + * @author Liuchuang + * @since 2020/9/2 15:06 + */ + List listOfEventTags(); + } \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EpdcEventsServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EpdcEventsServiceImpl.java index 9019c159..9acc54db 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EpdcEventsServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EpdcEventsServiceImpl.java @@ -48,6 +48,7 @@ import com.elink.esua.epdc.dto.events.form.EpdcEventSubmitFormDTO; import com.elink.esua.epdc.dto.events.form.EpdcEventsReviewFormDTO; import com.elink.esua.epdc.dto.events.form.GroupFormDTO; import com.elink.esua.epdc.dto.events.result.EventAppDetailResultDTO; +import com.elink.esua.epdc.dto.events.result.EventTagsResultDTO; import com.elink.esua.epdc.dto.form.SmsNoticeFormDTO; import com.elink.esua.epdc.dto.issue.IssueDTO; import com.elink.esua.epdc.dto.issue.form.IssuePendingResponseFormDTO; @@ -60,6 +61,7 @@ import com.elink.esua.epdc.modules.category.service.CategoryService; import com.elink.esua.epdc.modules.events.dao.EpdcEventsDao; import com.elink.esua.epdc.modules.events.entity.EpdcEventsEntity; import com.elink.esua.epdc.modules.events.service.EpdcEventsService; +import com.elink.esua.epdc.modules.events.service.EventTagService; import com.elink.esua.epdc.modules.events.service.ImgService; import com.elink.esua.epdc.modules.feign.AdminFeignClient; import com.elink.esua.epdc.modules.feign.ContentSecurityFeignClient; @@ -118,6 +120,9 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl listOfPendingReviewEvents(Map params) { IPage page = getPage(params); @@ -722,5 +727,9 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl listOfEventTags() { + return eventTagService.listOfEventTags(); + } } diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EventTagServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EventTagServiceImpl.java index 9dff64f3..22c3c8af 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EventTagServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EventTagServiceImpl.java @@ -26,6 +26,7 @@ import com.elink.esua.epdc.commons.tools.page.PageData; import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; import com.elink.esua.epdc.commons.tools.constant.FieldConstant; import com.elink.esua.epdc.dto.events.EventTagDTO; +import com.elink.esua.epdc.dto.events.result.EventTagsResultDTO; import com.elink.esua.epdc.modules.events.dao.EventTagDao; import com.elink.esua.epdc.modules.events.entity.EventTagEntity; import com.elink.esua.epdc.modules.events.service.EventTagRelationService; @@ -109,4 +110,10 @@ public class EventTagServiceImpl extends BaseServiceImpl listOfEventTags() { + List entities = baseDao.selectListOfEventTags(); + return ConvertUtils.sourceToTarget(entities, EventTagsResultDTO.class); + } + } \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EventTagDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EventTagDao.xml index fba43437..ae4e0fd0 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EventTagDao.xml +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EventTagDao.xml @@ -3,5 +3,8 @@ + \ No newline at end of file From f5a65914d59c137a9eb3d3b9ece2f523b2062213 Mon Sep 17 00:00:00 2001 From: liuchuang <123456> Date: Wed, 2 Sep 2020 16:12:31 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E5=85=9A=E7=BE=A4e=E4=BA=8B=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9=20=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E4=BA=8B=E4=BB=B6=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../events/form/EpdcEventSubmitFormDTO.java | 5 +++ .../result/EventAppDetailResultDTO.java | 5 +++ .../issue/result/IssueDetailResultDTO.java | 5 +++ .../epdc/dto/issue/result/IssueResultDTO.java | 5 +++ .../IssuesAndEventsOfMineResultDTO.java | 5 +++ .../dto/item/result/ItemDetailResultDTO.java | 5 +++ .../epdc/dto/item/result/ItemResultDTO.java | 5 +++ .../service/EventTagRelationService.java | 11 ++++++ .../service/impl/EpdcEventsServiceImpl.java | 7 ++++ .../impl/EventTagRelationServiceImpl.java | 17 +++++++++ .../resources/mapper/events/EpdcEventsDao.xml | 10 ++++- .../resources/mapper/events/EventTagDao.xml | 2 +- .../main/resources/mapper/issue/IssueDao.xml | 37 +++++++++++++++++-- .../main/resources/mapper/item/ItemDao.xml | 27 ++++++++++++-- 14 files changed, 137 insertions(+), 9 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/form/EpdcEventSubmitFormDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/form/EpdcEventSubmitFormDTO.java index 0c97c648..f4379e4f 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/form/EpdcEventSubmitFormDTO.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/form/EpdcEventSubmitFormDTO.java @@ -168,4 +168,9 @@ public class EpdcEventSubmitFormDTO implements Serializable { *是否提交为内容待审核状态 */ private Boolean isConReview; + + /** + * 事件标签 + */ + private List tagIds; } diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/result/EventAppDetailResultDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/result/EventAppDetailResultDTO.java index 821393af..8f6f1896 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/result/EventAppDetailResultDTO.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/result/EventAppDetailResultDTO.java @@ -49,4 +49,9 @@ public class EventAppDetailResultDTO implements Serializable { * 审核不通过意见 */ private String advice; + + /** + * 事件标签 + */ + private List tagNames; } diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/result/IssueDetailResultDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/result/IssueDetailResultDTO.java index a1ce07cf..4199f02f 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/result/IssueDetailResultDTO.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/result/IssueDetailResultDTO.java @@ -84,4 +84,9 @@ public class IssueDetailResultDTO implements Serializable { * 一级分类编码 */ private String firstCategoryCode; + + /** + * 事件标签 + */ + private List tagNames; } diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/result/IssueResultDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/result/IssueResultDTO.java index f8fb89c2..2390081c 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/result/IssueResultDTO.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/result/IssueResultDTO.java @@ -78,4 +78,9 @@ public class IssueResultDTO implements Serializable { * 最热的一条评论 */ private IssueHotCommentResultDTO comment; + + /** + * 事件标签 + */ + private List tagNames; } diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/result/IssuesAndEventsOfMineResultDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/result/IssuesAndEventsOfMineResultDTO.java index 31ba8323..ddad9acd 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/result/IssuesAndEventsOfMineResultDTO.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/result/IssuesAndEventsOfMineResultDTO.java @@ -47,4 +47,9 @@ public class IssuesAndEventsOfMineResultDTO implements Serializable { * 最热的一条评论 */ private IssueHotCommentResultDTO comment; + + /** + * 事件标签 + */ + private List tagNames; } diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/result/ItemDetailResultDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/result/ItemDetailResultDTO.java index a9855d68..988666c8 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/result/ItemDetailResultDTO.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/result/ItemDetailResultDTO.java @@ -135,4 +135,9 @@ public class ItemDetailResultDTO implements Serializable { * 一级分类编码 */ private String firstCategoryCode; + + /** + * 事件标签 + */ + private List tagNames; } diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/result/ItemResultDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/result/ItemResultDTO.java index 28db78ce..5a7962cc 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/result/ItemResultDTO.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/result/ItemResultDTO.java @@ -79,4 +79,9 @@ public class ItemResultDTO implements Serializable { * 最新进展 */ private ItemHandleProgressResultDTO latestProgress; + + /** + * 事件标签 + */ + private List tagNames; } diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/EventTagRelationService.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/EventTagRelationService.java index 49019eec..6f2e510b 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/EventTagRelationService.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/EventTagRelationService.java @@ -102,4 +102,15 @@ public interface EventTagRelationService extends BaseService tagIds, String eventId); } \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EpdcEventsServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EpdcEventsServiceImpl.java index 9acc54db..28c0969f 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EpdcEventsServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EpdcEventsServiceImpl.java @@ -61,6 +61,7 @@ import com.elink.esua.epdc.modules.category.service.CategoryService; import com.elink.esua.epdc.modules.events.dao.EpdcEventsDao; import com.elink.esua.epdc.modules.events.entity.EpdcEventsEntity; import com.elink.esua.epdc.modules.events.service.EpdcEventsService; +import com.elink.esua.epdc.modules.events.service.EventTagRelationService; import com.elink.esua.epdc.modules.events.service.EventTagService; import com.elink.esua.epdc.modules.events.service.ImgService; import com.elink.esua.epdc.modules.feign.AdminFeignClient; @@ -123,6 +124,9 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl listOfPendingReviewEvents(Map params) { IPage page = getPage(params); @@ -187,6 +191,9 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl NumConstant.ZERO; } + @Override + public void saveEventTags(List tagIds, String eventId) { + if (null != tagIds && !tagIds.isEmpty() && StringUtils.isNotEmpty(eventId)) { + List entities = new ArrayList<>(); + for (String tagId: + tagIds) { + EventTagRelationEntity entity = new EventTagRelationEntity(); + entity.setTagId(tagId); + entity.setEventId(eventId); + entities.add(entity); + } + + insertBatch(entities); + } + } + } \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EpdcEventsDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EpdcEventsDao.xml index 874e8b41..5e2959ae 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EpdcEventsDao.xml +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EpdcEventsDao.xml @@ -250,6 +250,9 @@ + + + - SELECT t.ID, t.TAG_NAME FROM epdc_event_tag t WHERE t.DEL_FLAG = '0' AND t.ENABLE_FLAG = '1' + SELECT t.ID, t.TAG_NAME FROM epdc_event_tag t WHERE t.DEL_FLAG = '0' AND t.ENABLE_FLAG = '1' ORDER BY t.SORT \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml index 4c0a0fa8..22e001e7 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml @@ -169,6 +169,9 @@ + + + SELECT @@ -283,7 +294,8 @@ WHEN 0 THEN true ELSE false END AS isOperational, - img.IMG_URL + img.IMG_URL, + et.TAG_NAME FROM epdc_issue issue LEFT JOIN epdc_img img ON issue.EVENT_ID = img.REFERENCE_ID @@ -291,6 +303,10 @@ AND img.IMG_TYPE = 'events' LEFT JOIN epdc_events eve ON issue.EVENT_ID = eve.ID AND eve.DEL_FLAG = '0' + LEFT JOIN epdc_event_tag_relation etr ON etr.EVENT_ID = issue.EVENT_ID + AND etr.DEL_FLAG = '0' + LEFT JOIN epdc_event_tag et ON etr.TAG_ID = et.ID + AND et.DEL_FLAG = '0' LEFT JOIN epdc_event_user_attitude ua ON issue.EVENT_ID = ua.EVENT_ID AND ua.DEL_FLAG = '0' @@ -389,6 +405,9 @@ + + + SELECT @@ -53,7 +56,8 @@ '已关闭' WHEN 10 THEN '已结案' ELSE '' - END AS stateName + END AS stateName, + et.TAG_NAME FROM epdc_item item LEFT JOIN epdc_events eve ON item.EVENT_ID = eve.ID @@ -66,6 +70,10 @@ LEFT JOIN epdc_item_handle_process hp ON item.ID = hp.ITEM_ID AND hp.DEL_FLAG = '0' AND hp.CREATED_TIME = ( SELECT MAX( a.CREATED_TIME ) FROM epdc_item_handle_process a WHERE a.DEL_FLAG = '0' AND a.ITEM_ID = hp.ITEM_ID ) + LEFT JOIN epdc_event_tag_relation etr ON etr.EVENT_ID = item.EVENT_ID + AND etr.DEL_FLAG = '0' + LEFT JOIN epdc_event_tag et ON etr.TAG_ID = et.ID + AND et.DEL_FLAG = '0' WHERE item.ID IN ( SELECT temp.ID FROM ( @@ -214,7 +222,8 @@ '已关闭' WHEN 10 THEN '已结案' ELSE '' - END AS stateName + END AS stateName, + et.TAG_NAME FROM epdc_item item LEFT JOIN epdc_events eve ON item.EVENT_ID = eve.ID @@ -227,6 +236,10 @@ LEFT JOIN epdc_item_handle_process hp ON item.ID = hp.ITEM_ID AND hp.DEL_FLAG = '0' AND hp.CREATED_TIME = ( SELECT MAX( a.CREATED_TIME ) FROM epdc_item_handle_process a WHERE a.DEL_FLAG = '0' AND a.ITEM_ID = hp.ITEM_ID ) + LEFT JOIN epdc_event_tag_relation etr ON etr.EVENT_ID = item.EVENT_ID + AND etr.DEL_FLAG = '0' + LEFT JOIN epdc_event_tag et ON etr.TAG_ID = et.ID + AND et.DEL_FLAG = '0' WHERE item.ID IN ( SELECT temp.ID FROM ( @@ -304,6 +317,9 @@ + + + - SELECT item.ID, item.ITEM_CONTENT, @@ -533,7 +555,38 @@ item.DEL_FLAG = '0' AND item.ID = #{itemId} - SELECT item.ID, item.USER_ID,