Browse Source

事件标签接口 init

feature/syp_points
liuchuang 5 years ago
parent
commit
631a02c145
  1. 13
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiIssueController.java
  2. 11
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/IssueFeignClient.java
  3. 6
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/IssueFeignClientFallback.java
  4. 10
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/IssueService.java
  5. 6
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/IssueServiceImpl.java
  6. 26
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/result/EventTagsResultDTO.java
  7. 19
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EpdcAppEventsController.java
  8. 11
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/dao/EventTagDao.java
  9. 10
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/EpdcEventsService.java
  10. 10
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/EventTagService.java
  11. 9
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EpdcEventsServiceImpl.java
  12. 7
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EventTagServiceImpl.java
  13. 3
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EventTagDao.xml

13
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<java.util.List<com.elink.esua.epdc.dto.events.result.EventTagsResultDTO>>
* @author Liuchuang
* @since 2020/9/2 14:59
*/
@GetMapping("eventtag/list")
public Result<List<EventTagsResultDTO>> eventTags(){
return issueService.listOfEventTags();
}
}

11
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<List<CategoryDTO>> categorylist();
/**
* 事件标签
*
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.events.result.EventTagsResultDTO>>
* @author Liuchuang
* @since 2020/9/2 15:02
*/
@GetMapping(value = "events/epdc-app/event/tags", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<List<EventTagsResultDTO>> eventTags();
}

6
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<List<CategoryDTO>> categorylist() {
return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "categorylist", null);
}
@Override
public Result<List<EventTagsResultDTO>> eventTags() {
return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "eventTags");
}
}

10
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<List<CategoryDTO>> categorylist();
/**
* 事件标签
*
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.events.result.EventTagsResultDTO>>
* @author Liuchuang
* @since 2020/9/2 15:00
*/
Result<List<EventTagsResultDTO>> listOfEventTags();
}

6
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<List<CategoryDTO>> categorylist() {
return issueFeignClient.categorylist();
}
@Override
public Result<List<EventTagsResultDTO>> listOfEventTags() {
return issueFeignClient.eventTags();
}
}

26
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;
}

19
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<java.util.List<com.elink.esua.epdc.dto.events.result.EventTagsResultDTO>>
* @author Liuchuang
* @since 2020/9/2 15:05
*/
@GetMapping("tags")
public Result<List<EventTagsResultDTO>> eventTags() {
List<EventTagsResultDTO> data = epdcEventsService.listOfEventTags();
return new Result<List<EventTagsResultDTO>>().ok(data);
}
}

11
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<EventTagEntity> {
/**
* 事件标签
*
* @return java.util.List<com.elink.esua.epdc.modules.events.entity.EventTagEntity>
* @author Liuchuang
* @since 2020/9/2 15:10
*/
List<EventTagEntity> selectListOfEventTags();
}

10
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<EpdcEventsEntity> {
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
Result rejectEventsInfo(RejectRecordDTO dto);
/**
* 事件标签
*
* @return java.util.List<com.elink.esua.epdc.dto.events.result.EventTagsResultDTO>
* @author Liuchuang
* @since 2020/9/2 15:06
*/
List<EventTagsResultDTO> listOfEventTags();
}

10
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<EventTagEntity> {
*/
void delete(String[] ids);
/**
* 事件标签
*
* @return java.util.List<com.elink.esua.epdc.dto.events.result.EventTagsResultDTO>
* @author Liuchuang
* @since 2020/9/2 15:06
*/
List<EventTagsResultDTO> listOfEventTags();
}

9
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<EpdcEventsDao, EpdcEv
@Autowired
private ContentSecurityFeignClient contentSecurityFeign;
@Autowired
private EventTagService eventTagService;
@Override
public PageData<EpdcEventsDTO> listOfPendingReviewEvents(Map<String, Object> params) {
IPage<EpdcEventsDTO> page = getPage(params);
@ -722,5 +727,9 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl<EpdcEventsDao, EpdcEv
return new Result();
}
@Override
public List<EventTagsResultDTO> listOfEventTags() {
return eventTagService.listOfEventTags();
}
}

7
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<EventTagDao, EventTagEn
}
}
@Override
public List<EventTagsResultDTO> listOfEventTags() {
List<EventTagEntity> entities = baseDao.selectListOfEventTags();
return ConvertUtils.sourceToTarget(entities, EventTagsResultDTO.class);
}
}

3
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EventTagDao.xml

@ -3,5 +3,8 @@
<mapper namespace="com.elink.esua.epdc.modules.events.dao.EventTagDao">
<select id="selectListOfEventTags" resultType="com.elink.esua.epdc.modules.events.entity.EventTagEntity">
SELECT t.ID, t.TAG_NAME FROM epdc_event_tag t WHERE t.DEL_FLAG = '0' AND t.ENABLE_FLAG = '1'
</select>
</mapper>
Loading…
Cancel
Save