From 50a775ac70f13a0c9c804b3e7f578fddbb13e0e0 Mon Sep 17 00:00:00 2001 From: yangshaoping <123456> Date: Tue, 17 Mar 2020 14:44:19 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E5=AE=A2=E6=88=B7id,=E6=89=80=E5=B1=9E=E7=AB=AF=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=AE=A2=E6=88=B7=E9=A6=96=E9=A1=B5=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=9A=84=E8=AE=BE=E8=AE=A1=E7=A8=BF-=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dao/CustomerHomeDetailDao.java | 7 ++++++- .../main/java/com/epmet/service/impl/HomeServiceImpl.java | 5 +++-- .../src/main/resources/mapper/CustomerHomeDetailDao.xml | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerHomeDetailDao.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerHomeDetailDao.java index c6571bd2ef..838b83083d 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerHomeDetailDao.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerHomeDetailDao.java @@ -42,6 +42,11 @@ public interface CustomerHomeDetailDao extends BaseDao * @date 2020/3/16 14:02 */ void updateCustomerHomeDetailByHomeId(String homeId); - + /** + * + * 根据客户id,所属端获取客户首页配置的设计稿 + * @author yangshaoping + * @date 2020/3/1714:02 + */ List getCustomerHomeDetailComponent(HomeDesignByCustomerFormDTO form); } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/HomeServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/HomeServiceImpl.java index 2d94250b2e..b3c72107bd 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/HomeServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/HomeServiceImpl.java @@ -45,9 +45,10 @@ public class HomeServiceImpl implements HomeService { @Override public Result getHomeDesignByCustomer(HomeDesignByCustomerFormDTO formDTO) { HomeDesignByCustomerResultDTO resultDTO = new HomeDesignByCustomerResultDTO(); + //根据客户id,所属端获取客户首页配置的设计稿 List list = customerHomeDetailDao.getCustomerHomeDetailComponent(formDTO); - List flist=new ArrayList();//功能组件 - List usedComponent=new ArrayList<>();//使用的组件集合 + List flist=new ArrayList();//功能组件列表 + List usedComponent=new ArrayList<>();//使用过的组件集合 for(CommonComponentDesignResultDTO c:list){ usedComponent.add(c.getComponentId()); //所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区 diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerHomeDetailDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerHomeDetailDao.xml index 91df873854..ab479f04a4 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerHomeDetailDao.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerHomeDetailDao.xml @@ -28,7 +28,7 @@ AND DEL_FLAG = 0 - + \ No newline at end of file From 16e93abf169cc9b29a951d8313037b77b9432f04 Mon Sep 17 00:00:00 2001 From: yangshaoping <123456> Date: Tue, 17 Mar 2020 15:40:57 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E5=AE=A2=E6=88=B7id,=E6=89=80=E5=B1=9E=E7=AB=AF=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=AE=A2=E6=88=B7=E9=A6=96=E9=A1=B5=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=9A=84=E8=AE=BE=E8=AE=A1=E7=A8=BF-=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=9E=9A=E4=B8=BE=E7=B1=BB=E5=BC=95=E7=94=A8=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/constant/ClientTypeEnum.java | 42 +++++++++++++++++++ .../epmet/service/impl/HomeServiceImpl.java | 9 ++-- 2 files changed, 47 insertions(+), 4 deletions(-) create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/constant/ClientTypeEnum.java diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/constant/ClientTypeEnum.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/constant/ClientTypeEnum.java new file mode 100644 index 0000000000..0dcbccfc4f --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/constant/ClientTypeEnum.java @@ -0,0 +1,42 @@ +package com.epmet.constant; + +/** + * @Classname ClientType + * @Description TODO + * @Date 2020/3/17 15:22 + * @Created by yangs + */ +public enum ClientTypeEnum { + //所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区 + title("0", "title"), + top("1","top"), + function("2", "function"), + floating("3", "floating"); + private String key; + + private String name; + + /** + * @param key + * @param name + */ + ClientTypeEnum(String key, String name) { + this.key = key; + this.name = name; + } + + /** + * @return Returns the key. + */ + public String getKey() { + return key; + } + + /** + * @return Returns the name. + */ + public String getName() { + return name; + } + +} diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/HomeServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/HomeServiceImpl.java index b3c72107bd..22b2c3a521 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/HomeServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/HomeServiceImpl.java @@ -1,6 +1,7 @@ package com.epmet.service.impl; import com.epmet.commons.tools.utils.Result; +import com.epmet.constant.ClientTypeEnum; import com.epmet.dao.CustomerHomeDao; import com.epmet.dao.CustomerHomeDetailDao; import com.epmet.dao.HomeComponentDao; @@ -52,13 +53,13 @@ public class HomeServiceImpl implements HomeService { for(CommonComponentDesignResultDTO c:list){ usedComponent.add(c.getComponentId()); //所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区 - if("0".equals(c.getRegion())){ + if(ClientTypeEnum.title.getKey().equals(c.getRegion())){ resultDTO.setTitleList(c); - }else if("1".equals(c.getRegion())){ + }else if(ClientTypeEnum.top.getKey().equals(c.getRegion())){ resultDTO.setTopList(c); - }else if("2".equals(c.getRegion())){ + }else if(ClientTypeEnum.function.getKey().equals(c.getRegion())){ flist.add(c); - }else if("3".equals(c.getRegion())){ + }else if(ClientTypeEnum.floating.getKey().equals(c.getRegion())){ resultDTO.setFloatingList(c); } } From 203625ea7fcc195b867d2d16bca8849ee1881288 Mon Sep 17 00:00:00 2001 From: yangshaoping <123456> Date: Tue, 17 Mar 2020 15:45:06 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E5=AE=A2=E6=88=B7id,=E6=89=80=E5=B1=9E=E7=AB=AF=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=AE=A2=E6=88=B7=E9=A6=96=E9=A1=B5=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=9A=84=E8=AE=BE=E8=AE=A1=E7=A8=BF-=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=9E=9A=E4=B8=BE=E7=B1=BB=E5=BC=95=E7=94=A8=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E6=94=B9=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../constant/{ClientTypeEnum.java => ReginEnum.java} | 8 ++++---- .../java/com/epmet/service/impl/HomeServiceImpl.java | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) rename epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/constant/{ClientTypeEnum.java => ReginEnum.java} (78%) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/constant/ClientTypeEnum.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/constant/ReginEnum.java similarity index 78% rename from epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/constant/ClientTypeEnum.java rename to epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/constant/ReginEnum.java index 0dcbccfc4f..47ef5eed86 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/constant/ClientTypeEnum.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/constant/ReginEnum.java @@ -1,12 +1,12 @@ package com.epmet.constant; /** - * @Classname ClientType - * @Description TODO + * @Classname ReginEnum + * @Description 所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区 * @Date 2020/3/17 15:22 * @Created by yangs */ -public enum ClientTypeEnum { +public enum ReginEnum { //所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区 title("0", "title"), top("1","top"), @@ -20,7 +20,7 @@ public enum ClientTypeEnum { * @param key * @param name */ - ClientTypeEnum(String key, String name) { + ReginEnum(String key, String name) { this.key = key; this.name = name; } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/HomeServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/HomeServiceImpl.java index 22b2c3a521..53f42e0acd 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/HomeServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/HomeServiceImpl.java @@ -1,7 +1,7 @@ package com.epmet.service.impl; import com.epmet.commons.tools.utils.Result; -import com.epmet.constant.ClientTypeEnum; +import com.epmet.constant.ReginEnum; import com.epmet.dao.CustomerHomeDao; import com.epmet.dao.CustomerHomeDetailDao; import com.epmet.dao.HomeComponentDao; @@ -53,13 +53,13 @@ public class HomeServiceImpl implements HomeService { for(CommonComponentDesignResultDTO c:list){ usedComponent.add(c.getComponentId()); //所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区 - if(ClientTypeEnum.title.getKey().equals(c.getRegion())){ + if(ReginEnum.title.getKey().equals(c.getRegion())){ resultDTO.setTitleList(c); - }else if(ClientTypeEnum.top.getKey().equals(c.getRegion())){ + }else if(ReginEnum.top.getKey().equals(c.getRegion())){ resultDTO.setTopList(c); - }else if(ClientTypeEnum.function.getKey().equals(c.getRegion())){ + }else if(ReginEnum.function.getKey().equals(c.getRegion())){ flist.add(c); - }else if(ClientTypeEnum.floating.getKey().equals(c.getRegion())){ + }else if(ReginEnum.floating.getKey().equals(c.getRegion())){ resultDTO.setFloatingList(c); } } From 62dd732efcd0adb297ca455505a2640e2efb09ff Mon Sep 17 00:00:00 2001 From: yangshaoping <123456> Date: Tue, 17 Mar 2020 16:51:49 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E5=AE=A2=E6=88=B7id,=E6=89=80=E5=B1=9E=E7=AB=AF=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=AE=A2=E6=88=B7=E9=A6=96=E9=A1=B5=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=9A=84=E8=AE=BE=E8=AE=A1=E7=A8=BF-regin=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E7=94=B1int=20=E6=94=B9=E4=B8=BAvarchar(?= =?UTF-8?q?=E6=B6=89=E5=8F=8A3=E4=B8=AA=E7=9B=B8=E5=85=B3=E8=A1=A8?= =?UTF-8?q?=E8=8D=89=E7=A8=BF=E8=A1=A8-=E6=A8=A1=E6=9D=BF=E8=A1=A8-?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E8=A1=A8=E9=83=BD=E6=94=B9=E4=BA=86)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/constant/ReginConstant.java | 19 +++++++++ .../java/com/epmet/constant/ReginEnum.java | 42 ------------------- .../epmet/service/impl/HomeServiceImpl.java | 10 ++--- 3 files changed, 24 insertions(+), 47 deletions(-) create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/constant/ReginConstant.java delete mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/constant/ReginEnum.java diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/constant/ReginConstant.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/constant/ReginConstant.java new file mode 100644 index 0000000000..1a1b1fec32 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/constant/ReginConstant.java @@ -0,0 +1,19 @@ +package com.epmet.constant; + +/** + * @Classname ReginEnum + * @Description 所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区 + * @Date 2020/3/17 15:22 + * @Created by yangs + */ +public interface ReginConstant { + //所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区 + //0.标题区 + String titleList="titleList"; + //1.置顶区 + String topList="topList"; + //2.功能区 + String functionList="functionList"; + //3.悬浮区 + String floatingList="floatingList"; +} \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/constant/ReginEnum.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/constant/ReginEnum.java deleted file mode 100644 index 47ef5eed86..0000000000 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/constant/ReginEnum.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.epmet.constant; - -/** - * @Classname ReginEnum - * @Description 所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区 - * @Date 2020/3/17 15:22 - * @Created by yangs - */ -public enum ReginEnum { - //所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区 - title("0", "title"), - top("1","top"), - function("2", "function"), - floating("3", "floating"); - private String key; - - private String name; - - /** - * @param key - * @param name - */ - ReginEnum(String key, String name) { - this.key = key; - this.name = name; - } - - /** - * @return Returns the key. - */ - public String getKey() { - return key; - } - - /** - * @return Returns the name. - */ - public String getName() { - return name; - } - -} diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/HomeServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/HomeServiceImpl.java index 53f42e0acd..b0edee660e 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/HomeServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/HomeServiceImpl.java @@ -1,7 +1,7 @@ package com.epmet.service.impl; import com.epmet.commons.tools.utils.Result; -import com.epmet.constant.ReginEnum; +import com.epmet.constant.ReginConstant; import com.epmet.dao.CustomerHomeDao; import com.epmet.dao.CustomerHomeDetailDao; import com.epmet.dao.HomeComponentDao; @@ -53,13 +53,13 @@ public class HomeServiceImpl implements HomeService { for(CommonComponentDesignResultDTO c:list){ usedComponent.add(c.getComponentId()); //所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区 - if(ReginEnum.title.getKey().equals(c.getRegion())){ + if(ReginConstant.titleList.equals(c.getRegion())){ resultDTO.setTitleList(c); - }else if(ReginEnum.top.getKey().equals(c.getRegion())){ + }else if(ReginConstant.topList.equals(c.getRegion())){ resultDTO.setTopList(c); - }else if(ReginEnum.function.getKey().equals(c.getRegion())){ + }else if(ReginConstant.functionList.equals(c.getRegion())){ flist.add(c); - }else if(ReginEnum.floating.getKey().equals(c.getRegion())){ + }else if(ReginConstant.floatingList.equals(c.getRegion())){ resultDTO.setFloatingList(c); } } From 29dc99bed932b9f04f078968a9eab7515cf1e77c Mon Sep 17 00:00:00 2001 From: yinzuomei <57602893@qq.com> Date: Tue, 17 Mar 2020 17:29:31 +0800 Subject: [PATCH 6/7] =?UTF-8?q?REGION=E6=94=B9=E4=B8=BAvarchar=E6=B3=A8?= =?UTF-8?q?=E9=87=8A=EF=BC=9A=E6=89=80=E5=B1=9E=E5=8C=BA=E5=9F=9F=EF=BC=9A?= =?UTF-8?q?titleList.=E6=A0=87=E9=A2=98=E5=8C=BA=E3=80=81topList.=E7=BD=AE?= =?UTF-8?q?=E9=A1=B6=E5=8C=BA=E3=80=81functionList.=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=8C=BA=E3=80=81floatingList.=E6=82=AC=E6=B5=AE=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/CustomerHomeDetailDTO.java | 8 ++++---- .../main/java/com/epmet/dto/CustomerHomeTemplateDTO.java | 8 ++++---- .../src/main/java/com/epmet/dto/HomeComponentDTO.java | 8 ++++---- .../java/com/epmet/dto/form/HomeComponentFormDTO.java | 4 ++-- .../com/epmet/dto/result/CommonComponentResultDTO.java | 5 +++++ .../java/com/epmet/entity/CustomerHomeDetailEntity.java | 6 +++--- .../java/com/epmet/entity/CustomerHomeTemplateEntity.java | 6 +++--- .../main/java/com/epmet/entity/HomeComponentEntity.java | 6 +++--- .../src/main/resources/mapper/HomeComponentDao.xml | 6 ++++-- 9 files changed, 32 insertions(+), 25 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/CustomerHomeDetailDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/CustomerHomeDetailDTO.java index 79fdf9ae05..82f5b1d9ce 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/CustomerHomeDetailDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/CustomerHomeDetailDTO.java @@ -23,7 +23,7 @@ import lombok.Data; /** - * 客户首页详情表 + * 客户首页详情表 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-03-10 @@ -49,9 +49,9 @@ public class CustomerHomeDetailDTO implements Serializable { private String componentId; /** - * 所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区 + * 所属区域:titleList.标题区、topList.置顶区、functionList.功能区、floatingList.悬浮区 */ - private Integer region; + private String region; /** * 高级配置 @@ -93,4 +93,4 @@ public class CustomerHomeDetailDTO implements Serializable { */ private Date updatedTime; -} \ No newline at end of file +} diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/CustomerHomeTemplateDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/CustomerHomeTemplateDTO.java index e0e3ec6091..866adac425 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/CustomerHomeTemplateDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/CustomerHomeTemplateDTO.java @@ -23,7 +23,7 @@ import lombok.Data; /** - * 客户首页模板表 + * 客户首页模板表 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-03-10 @@ -49,9 +49,9 @@ public class CustomerHomeTemplateDTO implements Serializable { private Integer clientType; /** - * 所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区 + * 所属区域:titleList.标题区、topList.置顶区、functionList.功能区、floatingList.悬浮区 */ - private Integer region; + private String region; /** * 高级配置 JSON串 @@ -93,4 +93,4 @@ public class CustomerHomeTemplateDTO implements Serializable { */ private Date updatedTime; -} \ No newline at end of file +} diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/HomeComponentDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/HomeComponentDTO.java index 13ecb98094..1d1e437f1f 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/HomeComponentDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/HomeComponentDTO.java @@ -23,7 +23,7 @@ import lombok.Data; /** - * 首页组件表 + * 首页组件表 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-03-10 @@ -64,9 +64,9 @@ public class HomeComponentDTO implements Serializable { private Integer conponentType; /** - * 所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区 + * 所属区域:titleList.标题区、topList.置顶区、functionList.功能区、floatingList.悬浮区 */ - private Integer region; + private String region; /** * 高级配置 @@ -113,4 +113,4 @@ public class HomeComponentDTO implements Serializable { */ private Date updatedTime; -} \ No newline at end of file +} diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/HomeComponentFormDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/HomeComponentFormDTO.java index a7833e17a9..e9d71ef719 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/HomeComponentFormDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/HomeComponentFormDTO.java @@ -20,9 +20,9 @@ public class HomeComponentFormDTO implements Serializable { private String componentId; /** - * 所属区域 + * 所属区域:titleList.标题区、topList.置顶区、functionList.功能区、floatingList.悬浮区 */ - private Integer region; + private String region; /** * 高级配置项 diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CommonComponentResultDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CommonComponentResultDTO.java index 8e57e9fd5c..7e2dc3c4f3 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CommonComponentResultDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CommonComponentResultDTO.java @@ -42,4 +42,9 @@ public class CommonComponentResultDTO implements Serializable { * 配置项说明 */ private String configurationDescription; + + /** + * 所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区 + */ + private String region; } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/CustomerHomeDetailEntity.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/CustomerHomeDetailEntity.java index bcc2eedb3a..e6a753278b 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/CustomerHomeDetailEntity.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/CustomerHomeDetailEntity.java @@ -26,7 +26,7 @@ import lombok.EqualsAndHashCode; import java.util.Date; /** - * 客户首页详情表 + * 客户首页详情表 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-03-10 @@ -49,9 +49,9 @@ public class CustomerHomeDetailEntity extends BaseEpmetEntity { private String componentId; /** - * 所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区 + * 所属区域:titleList.标题区、topList.置顶区、functionList.功能区、floatingList.悬浮区 */ - private Integer region; + private String region; /** * 高级配置 diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/CustomerHomeTemplateEntity.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/CustomerHomeTemplateEntity.java index 189a14d56d..36c677ef90 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/CustomerHomeTemplateEntity.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/CustomerHomeTemplateEntity.java @@ -26,7 +26,7 @@ import lombok.EqualsAndHashCode; import java.util.Date; /** - * 客户首页模板表 + * 客户首页模板表 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-03-10 @@ -49,9 +49,9 @@ public class CustomerHomeTemplateEntity extends BaseEpmetEntity { private Integer clientType; /** - * 所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区 + * 所属区域:titleList.标题区、topList.置顶区、functionList.功能区、floatingList.悬浮区 */ - private Integer region; + private String region; /** * 高级配置 JSON串 diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/HomeComponentEntity.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/HomeComponentEntity.java index 6705b6e9e9..5cbb92b0c6 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/HomeComponentEntity.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/HomeComponentEntity.java @@ -26,7 +26,7 @@ import lombok.EqualsAndHashCode; import java.util.Date; /** - * 首页组件表 + * 首页组件表 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-03-10 @@ -64,9 +64,9 @@ public class HomeComponentEntity extends BaseEpmetEntity { private Integer conponentType; /** - * 所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区 + * 所属区域:titleList.标题区、topList.置顶区、functionList.功能区、floatingList.悬浮区 */ - private Integer region; + private String region; /** * 高级配置 diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/HomeComponentDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/HomeComponentDao.xml index ff4d87350e..10bfc66952 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/HomeComponentDao.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/HomeComponentDao.xml @@ -32,7 +32,8 @@ hc.COMPONENT_FRONT_ID, hc.CONFIGURATION, hc.DEMO_DATA, - hc.CONFIGURATION_DESCRIPTION + hc.CONFIGURATION_DESCRIPTION, + hc.REGION FROM home_component hc WHERE @@ -85,7 +86,8 @@ hc.COMPONENT_FRONT_ID, hc.CONFIGURATION, hc.DEMO_DATA, - hc.CONFIGURATION_DESCRIPTION + hc.CONFIGURATION_DESCRIPTION, + hc.REGION FROM home_component hc WHERE From b104d1ffd047870f4ad9e68e0482027b2622f273 Mon Sep 17 00:00:00 2001 From: yangshaoping <123456> Date: Thu, 19 Mar 2020 15:53:53 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E9=85=8D=E7=BD=AE=E7=9A=84=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E7=A8=BF--=E8=BF=94=E5=9B=9E3=E4=B8=AA=E5=AF=B9=E8=B1=A1?= =?UTF-8?q?=E6=94=B9=E4=B8=BA3=E4=B8=AA=E9=9B=86=E5=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/HomeDesignByCustomerResultDTO.java | 6 +++--- .../epmet/service/impl/HomeServiceImpl.java | 18 ++++++++++++------ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/HomeDesignByCustomerResultDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/HomeDesignByCustomerResultDTO.java index 2ccebf420c..64dbfdaa26 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/HomeDesignByCustomerResultDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/HomeDesignByCustomerResultDTO.java @@ -17,11 +17,11 @@ public class HomeDesignByCustomerResultDTO implements Serializable { /** * 标题区 */ - private CommonComponentDesignResultDTO titleList; + private List titleList; /** * 置顶区 */ - private CommonComponentDesignResultDTO topList; + private List topList; /** * 功能区 */ @@ -29,7 +29,7 @@ public class HomeDesignByCustomerResultDTO implements Serializable { /** * 悬浮区 */ - private CommonComponentDesignResultDTO floatingList; + private List floatingList; /** *用于标识已使用的功能组件id列表(不含通用组件) */ diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/HomeServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/HomeServiceImpl.java index b0edee660e..9d936c031e 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/HomeServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/HomeServiceImpl.java @@ -48,22 +48,28 @@ public class HomeServiceImpl implements HomeService { HomeDesignByCustomerResultDTO resultDTO = new HomeDesignByCustomerResultDTO(); //根据客户id,所属端获取客户首页配置的设计稿 List list = customerHomeDetailDao.getCustomerHomeDetailComponent(formDTO); - List flist=new ArrayList();//功能组件列表 + List titlelist=new ArrayList(); + List toplist=new ArrayList(); + List functionlist=new ArrayList(); + List floatlist=new ArrayList(); List usedComponent=new ArrayList<>();//使用过的组件集合 for(CommonComponentDesignResultDTO c:list){ usedComponent.add(c.getComponentId()); //所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区 if(ReginConstant.titleList.equals(c.getRegion())){ - resultDTO.setTitleList(c); + titlelist.add(c); }else if(ReginConstant.topList.equals(c.getRegion())){ - resultDTO.setTopList(c); + toplist.add(c); }else if(ReginConstant.functionList.equals(c.getRegion())){ - flist.add(c); + functionlist.add(c); }else if(ReginConstant.floatingList.equals(c.getRegion())){ - resultDTO.setFloatingList(c); + floatlist.add(c); } } - resultDTO.setFunctionList(flist); + resultDTO.setTitleList(titlelist); + resultDTO.setTopList(toplist); + resultDTO.setFloatingList(floatlist); + resultDTO.setFunctionList(functionlist); resultDTO.setUsedComponentIdList(usedComponent); return new Result().ok(resultDTO); }