From 82c11e230fca5f0328a7d009ae32367cc8a1deb1 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 2 Nov 2020 11:00:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=A8=A1=E6=9D=BFId=20sql?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/form/CustomerTemplateListFormDTO.java | 4 ++++ .../main/java/com/epmet/dto/form/GetTemplateListFormDTO.java | 4 ++++ .../com/epmet/service/impl/PersonalTemplateServiceImpl.java | 2 ++ .../src/main/resources/mapper/PersonalTemplateDao.xml | 5 ++++- 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CustomerTemplateListFormDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CustomerTemplateListFormDTO.java index 9dbabbfdbe..2fb11064f0 100644 --- a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CustomerTemplateListFormDTO.java +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CustomerTemplateListFormDTO.java @@ -22,6 +22,10 @@ public class CustomerTemplateListFormDTO implements Serializable { */ @NotBlank(message="公共模板Id不能为空", groups = {AddUserInternalGroup.class}) private String publicId; + /** + * 模板关键词Id + */ + private String keyIds; public interface AddUserInternalGroup {} } diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/GetTemplateListFormDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/GetTemplateListFormDTO.java index 09fb259376..8bde81adf2 100644 --- a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/GetTemplateListFormDTO.java +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/GetTemplateListFormDTO.java @@ -26,6 +26,10 @@ public class GetTemplateListFormDTO implements Serializable { * 模板类型(站内信提醒) */ private String templateType; + /** + * 模板关键词Id + */ + private String keyIds; public interface AddUserInternalGroup {} } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PersonalTemplateServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PersonalTemplateServiceImpl.java index bdc7b6bf1d..6aac8fdc8f 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PersonalTemplateServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PersonalTemplateServiceImpl.java @@ -127,6 +127,7 @@ public class PersonalTemplateServiceImpl extends BaseServiceImpl templateList(GetTemplateListFormDTO formDTO) { + formDTO.setKeyIds("5,4,2"); //根据客户Id、appId、模板类型查询小程序订阅消息模板列表 return baseDao.selectTemplateList(formDTO); } @@ -138,6 +139,7 @@ public class PersonalTemplateServiceImpl extends BaseServiceImpl customerTemplateList(CustomerTemplateListFormDTO formDTO) { + formDTO.setKeyIds("5,4,2"); return baseDao.selectCustomerTemplateList(formDTO); } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PersonalTemplateDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PersonalTemplateDao.xml index c6d4f4eecb..97452fa3b9 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PersonalTemplateDao.xml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PersonalTemplateDao.xml @@ -86,7 +86,8 @@ AND customer_id = #{customerId} AND app_id = #{appId} AND title = #{templateType} - ORDER BY CREATED_TIME DESC + AND key_ids = '5,4,2' + ORDER BY created_time ASC