From 57b3bd02559c680c223fe4eae0fb7a52e60426c7 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 5 Aug 2021 15:35:14 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/form/EventListFormDTO.java | 3 +++ .../main/java/com/epmet/service/impl/ResiEventServiceImpl.java | 1 + .../src/main/resources/mapper/ResiEventDao.xml | 1 + 3 files changed, 5 insertions(+) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventListFormDTO.java index 699c6ada63..e4632b7f33 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventListFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventListFormDTO.java @@ -26,4 +26,7 @@ public class EventListFormDTO implements Serializable { @NotBlank(message = "",groups = EventListForm.class) private String orgId; + + private Integer pageNo; + private Integer pageSize; } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java index 632887c34f..4c6d03c648 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java @@ -101,6 +101,7 @@ public class ResiEventServiceImpl extends BaseServiceImpl eventList(EventListFormDTO formDTO) { + PageHelper.startPage(formDTO.getPageNo(),formDTO.getPageSize()); List result = baseDao.eventUnDisposedList(formDTO.getOrgId(), formDTO.getEventType()); if (!CollectionUtils.isEmpty(result)){ return result; diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ResiEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ResiEventDao.xml index 617d3c795c..fc1ad216cb 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ResiEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ResiEventDao.xml @@ -25,6 +25,7 @@ FROM resi_event_report_org ro INNER JOIN resi_event re ON (ro.RESI_EVENT_ID = re.ID AND re.DEL_FLAG = '0') AND ro.DEL_FLAG = '0' + and ro.ORG_ID = #{orgId} AND ro.ORG_READ = 'un_read' ORDER BY re.CREATED_TIME From bbfde2813b28d1fbbd51e34dbac3bc54fb103723 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 5 Aug 2021 16:16:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8A=A5=E4=BA=8BID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/result/NewEventsResultDTO.java | 2 ++ .../src/main/resources/mapper/ResiEventDao.xml | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/NewEventsResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/NewEventsResultDTO.java index 77f4eb4d68..8035108f6a 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/NewEventsResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/NewEventsResultDTO.java @@ -29,4 +29,6 @@ public class NewEventsResultDTO implements Serializable { * 事件图片 */ private List eventImgs; + + private String eventId; } diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ResiEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ResiEventDao.xml index fc1ad216cb..ec756161fa 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ResiEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ResiEventDao.xml @@ -160,6 +160,7 @@ + @@ -168,7 +169,8 @@ SELECT IFNULL(re.EVENT_CONTENT,'') AS eventContent, DATE_FORMAT(re.CREATED_TIME,'%Y-%m-%d %H:%i') AS eventTime, - IFNULL(ea.ATTACHMENT_URL,'') AS img + IFNULL(ea.ATTACHMENT_URL,'') AS img, + re.id as eventId FROM resi_event_report_org ro LEFT JOIN resi_event re ON (re.ID = ro.RESI_EVENT_ID AND re.DEL_FLAG = '0') LEFT JOIN resi_event_attachment ea ON (ea.RESI_EVENT_ID = ro.RESI_EVENT_ID AND ea.DEL_FLAG = '0' AND