From b6bc4e35b1c39063a7801db670c7e30815420ac6 Mon Sep 17 00:00:00 2001 From: yinzuomei <57602893@qq.com> Date: Fri, 13 Mar 2020 20:15:39 +0800 Subject: [PATCH 01/18] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E6=94=B9=E4=B8=BAepmet=5Fcommon=5Fuser?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-module/resi-guide/resi-guide-server/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/resi-guide/resi-guide-server/pom.xml b/epmet-module/resi-guide/resi-guide-server/pom.xml index f7f8694547..eb98658a1f 100644 --- a/epmet-module/resi-guide/resi-guide-server/pom.xml +++ b/epmet-module/resi-guide/resi-guide-server/pom.xml @@ -89,7 +89,7 @@ - + epmet elink@833066 From 24d9a40f4b893ae4b5a6fada16d1e7cbda50e3ae Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 16 Mar 2020 10:41:47 +0800 Subject: [PATCH 02/18] =?UTF-8?q?=E5=B1=85=E6=B0=91=E7=AB=AF=E9=99=8C?= =?UTF-8?q?=E7=94=9F=E4=BA=BA=E5=AF=BC=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/controller/StrangerController.java | 39 +++++++++++++++ .../main/java/com/epmet/dao/StrangerDao.java | 33 +++++++++++++ .../java/com/epmet/entity/StrangerEntity.java | 39 +++++++++++++++ .../java/com/epmet/redis/StrangerRedis.java | 47 +++++++++++++++++++ .../com/epmet/service/StrangerService.java | 31 ++++++++++++ .../service/impl/StrangerServiceImpl.java | 41 ++++++++++++++++ .../src/main/resources/mapper/StrangerDao.xml | 16 +++++++ 7 files changed, 246 insertions(+) create mode 100644 epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerController.java create mode 100644 epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/dao/StrangerDao.java create mode 100644 epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/entity/StrangerEntity.java create mode 100644 epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/redis/StrangerRedis.java create mode 100644 epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/StrangerService.java create mode 100644 epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerServiceImpl.java create mode 100644 epmet-module/resi-guide/resi-guide-server/src/main/resources/mapper/StrangerDao.xml diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerController.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerController.java new file mode 100644 index 0000000000..13baaafcea --- /dev/null +++ b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerController.java @@ -0,0 +1,39 @@ +/** + * 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.epmet.controller; + +import com.epmet.service.StrangerService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + + +/** + * 居民端陌生人导览 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-16 + */ +@RestController +@RequestMapping("customer") +public class StrangerController { + + @Autowired + private StrangerService strangerService; + +} diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/dao/StrangerDao.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/dao/StrangerDao.java new file mode 100644 index 0000000000..a5a4f0052b --- /dev/null +++ b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/dao/StrangerDao.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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.StrangerEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 居民端陌生人导览 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-16 + */ +@Mapper +public interface StrangerDao extends BaseDao { + +} diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/entity/StrangerEntity.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/entity/StrangerEntity.java new file mode 100644 index 0000000000..292f66ee19 --- /dev/null +++ b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/entity/StrangerEntity.java @@ -0,0 +1,39 @@ +/** + * 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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 居民端陌生人导览 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("stranger") +public class StrangerEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + +} diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/redis/StrangerRedis.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/redis/StrangerRedis.java new file mode 100644 index 0000000000..a0c13b8054 --- /dev/null +++ b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/redis/StrangerRedis.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.epmet.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 居民端陌生人导览 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-16 + */ +@Component +public class StrangerRedis { + @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/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/StrangerService.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/StrangerService.java new file mode 100644 index 0000000000..c834214c89 --- /dev/null +++ b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/StrangerService.java @@ -0,0 +1,31 @@ +/** + * 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.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.StrangerEntity; + +/** + * 居民端陌生人导览 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-16 + */ +public interface StrangerService extends BaseService { + +} diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerServiceImpl.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerServiceImpl.java new file mode 100644 index 0000000000..41c04092c3 --- /dev/null +++ b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerServiceImpl.java @@ -0,0 +1,41 @@ +/** + * 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.epmet.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.dao.StrangerDao; +import com.epmet.entity.StrangerEntity; +import com.epmet.redis.StrangerRedis; +import com.epmet.service.StrangerService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * 居民端陌生人导览 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-16 + */ +@Service +public class StrangerServiceImpl extends BaseServiceImpl implements StrangerService { + + @Autowired + private StrangerRedis strangerRedis; + + +} diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/resources/mapper/StrangerDao.xml b/epmet-module/resi-guide/resi-guide-server/src/main/resources/mapper/StrangerDao.xml new file mode 100644 index 0000000000..f2e34969f5 --- /dev/null +++ b/epmet-module/resi-guide/resi-guide-server/src/main/resources/mapper/StrangerDao.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + From d372c147320e8875a54b5f156ca1922c1c7ac8b6 Mon Sep 17 00:00:00 2001 From: yangshaoping <123456> Date: Mon, 16 Mar 2020 14:51:29 +0800 Subject: [PATCH 03/18] =?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-=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/HomeDesignByCustomerFormDTO.java | 28 ++++++++++ .../CommonComponentDesignResultDTO.java | 50 +++++++++++++++++ .../result/HomeDesignByCustomerResultDTO.java | 37 ++++++++++++ .../com/epmet/controller/HomeController.java | 15 +++++ .../java/com/epmet/dao/CustomerHomeDao.java | 5 +- .../com/epmet/dao/CustomerHomeDetailDao.java | 2 +- .../epmet/dao/CustomerHomeTemplateDao.java | 2 +- .../java/com/epmet/service/HomeService.java | 11 ++++ .../epmet/service/impl/HomeServiceImpl.java | 56 ++++++++++++++++--- .../mapper/CustomerHomeDetailDao.xml | 32 +++++++++++ 10 files changed, 226 insertions(+), 12 deletions(-) create mode 100644 epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/HomeDesignByCustomerFormDTO.java create mode 100644 epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CommonComponentDesignResultDTO.java create mode 100644 epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/HomeDesignByCustomerResultDTO.java diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/HomeDesignByCustomerFormDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/HomeDesignByCustomerFormDTO.java new file mode 100644 index 0000000000..fddbedad98 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/HomeDesignByCustomerFormDTO.java @@ -0,0 +1,28 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 运营端-客户定制化服务-获取客户首页配置的设计稿-入参 + * @Author yangshaoping + * @Date 2020/3/16 11:27 + */ +@Data +public class HomeDesignByCustomerFormDTO implements Serializable { + private static final long serialVersionUID = 5272251336837515372L; + /** + * 客户ID + */ + @NotBlank(message = "客户ID不能为空") + private String customerId; + + /** + * 所属端类型0.居民端,1.政府端 + */ + @NotBlank(message = "所属端类型不能为空(0居民端1政府端)") + private String clientType; + +} diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CommonComponentDesignResultDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CommonComponentDesignResultDTO.java new file mode 100644 index 0000000000..bd65f9fe44 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CommonComponentDesignResultDTO.java @@ -0,0 +1,50 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 运营端-客户定制化服务-获取客户可用组件列表-返参[commonList(通用组件列表)属性对应DTO] + * @Author yang + * @Date 2020/3/16 12:59 + */ +@Data +public class CommonComponentDesignResultDTO implements Serializable { + private static final long serialVersionUID = 2971689193155710437L; + + /** + * 组件id + */ + private String componentId; + + /** + * 组件名称 + */ + private String componentName; + /** + * 所属区域 + */ + private String region; + + /** + * 组件前端标识 + */ + private String componentFrontId; + + /** + * 高级设置 + */ + private String configuration; + + /** + * 默认数据 + */ + private String demoData; + + /** + * 显示顺序 + */ + private int displayOrder; + +} 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 new file mode 100644 index 0000000000..2ccebf420c --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/HomeDesignByCustomerResultDTO.java @@ -0,0 +1,37 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; +import java.util.Set; + +/** + * @Description 运营端-客户定制化服务-获取客户首页配置的设计稿返参 + * @Author yang + * @Date 2020/3/16 12:57 + */ +@Data +public class HomeDesignByCustomerResultDTO implements Serializable { + private static final long serialVersionUID = 1496786567582303921L; + /** + * 标题区 + */ + private CommonComponentDesignResultDTO titleList; + /** + * 置顶区 + */ + private CommonComponentDesignResultDTO topList; + /** + * 功能区 + */ + private List functionList; + /** + * 悬浮区 + */ + private CommonComponentDesignResultDTO floatingList; + /** + *用于标识已使用的功能组件id列表(不含通用组件) + */ + private List usedComponentIdList; +} diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/HomeController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/HomeController.java index e8000ab20d..3e5fb04a85 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/HomeController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/HomeController.java @@ -3,7 +3,9 @@ package com.epmet.controller; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.ComponentListByCustomerFormDTO; +import com.epmet.dto.form.HomeDesignByCustomerFormDTO; import com.epmet.dto.result.ComponentListByCustomerResultDTO; +import com.epmet.dto.result.HomeDesignByCustomerResultDTO; import com.epmet.service.HomeService; import net.bytebuddy.asm.Advice; import org.springframework.beans.factory.annotation.Autowired; @@ -33,4 +35,17 @@ public class HomeController { ValidatorUtils.validateEntity(formDTO); return homeService.getComponentListByCustomer(formDTO); } + + /** + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author yang + * @Description 获取客户首页配置的设计稿 + * @Date 2020/3/16 13:21 + **/ + @PostMapping("gethomedesignbycustomer") + public Result getHomeDesignByCustomer(@RequestBody HomeDesignByCustomerFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + return homeService.getHomeDesignByCustomer(formDTO); + } } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerHomeDao.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerHomeDao.java index 6bffb6e6a6..ac9a99cf51 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerHomeDao.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerHomeDao.java @@ -18,6 +18,8 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.CustomerHomeDTO; +import com.epmet.dto.form.HomeDesignByCustomerFormDTO; import com.epmet.entity.CustomerHomeEntity; import org.apache.ibatis.annotations.Mapper; @@ -29,5 +31,6 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface CustomerHomeDao extends BaseDao { - + //根据客户id,所属端口,查询客户是否有发版模板信息 + CustomerHomeDTO getCustomerHomeDetailByCustomerAndClientType(HomeDesignByCustomerFormDTO form); } \ No newline at end of file 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 5c792c3394..bfe188fa7c 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 @@ -29,5 +29,5 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface CustomerHomeDetailDao extends BaseDao { - + } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerHomeTemplateDao.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerHomeTemplateDao.java index 21bf5f55ae..5e60376eb5 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerHomeTemplateDao.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerHomeTemplateDao.java @@ -29,5 +29,5 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface CustomerHomeTemplateDao extends BaseDao { - + } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/HomeService.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/HomeService.java index 50156cef76..f58966ac3b 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/HomeService.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/HomeService.java @@ -2,7 +2,9 @@ package com.epmet.service; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.form.ComponentListByCustomerFormDTO; +import com.epmet.dto.form.HomeDesignByCustomerFormDTO; import com.epmet.dto.result.ComponentListByCustomerResultDTO; +import com.epmet.dto.result.HomeDesignByCustomerResultDTO; /** * @Description 客户定制化服务-首页 @@ -18,4 +20,13 @@ public interface HomeService { * @Date 2020/3/11 13:22 **/ Result getComponentListByCustomer(ComponentListByCustomerFormDTO formDTO); + + /** + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author yang + * @Description 获取客户首页配置的设计稿 + * @Date 2020/3/16 13:21 + **/ + Result getHomeDesignByCustomer(HomeDesignByCustomerFormDTO formDTO); } 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 18671698af..b84eef3ae9 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,13 +1,25 @@ package com.epmet.service.impl; import com.epmet.commons.tools.utils.Result; +import com.epmet.dao.CustomerHomeDao; +import com.epmet.dao.CustomerHomeDetailDao; +import com.epmet.dao.CustomerHomeTemplateDao; import com.epmet.dao.HomeComponentDao; +import com.epmet.dto.CustomerHomeDTO; import com.epmet.dto.form.ComponentListByCustomerFormDTO; +import com.epmet.dto.form.HomeDesignByCustomerFormDTO; +import com.epmet.dto.result.CommonComponentDesignResultDTO; import com.epmet.dto.result.ComponentListByCustomerResultDTO; +import com.epmet.dto.result.HomeDesignByCustomerResultDTO; import com.epmet.service.HomeService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + /** * @Description 客户定制化服务-首页 * @Author yinzuomei @@ -15,14 +27,40 @@ import org.springframework.stereotype.Service; */ @Service public class HomeServiceImpl implements HomeService { - @Autowired - private HomeComponentDao homeComponentDao; + @Autowired + private HomeComponentDao homeComponentDao; + @Autowired + private CustomerHomeDetailDao customerHomeDetailDao; + + @Override + public Result getComponentListByCustomer(ComponentListByCustomerFormDTO formDTO) { + ComponentListByCustomerResultDTO resultDTO = new ComponentListByCustomerResultDTO(); + resultDTO.setCommonList(homeComponentDao.selectListCommonComponentResultDTO(formDTO)); + resultDTO.setFunctionList(homeComponentDao.selectListFunctionComponentResultDTO(formDTO)); + return new Result().ok(resultDTO); + } - @Override - public Result getComponentListByCustomer(ComponentListByCustomerFormDTO formDTO) { - ComponentListByCustomerResultDTO resultDTO = new ComponentListByCustomerResultDTO(); - resultDTO.setCommonList(homeComponentDao.selectListCommonComponentResultDTO(formDTO)); - resultDTO.setFunctionList(homeComponentDao.selectListFunctionComponentResultDTO(formDTO)); - return new Result().ok(resultDTO); - } + @Override + public Result getHomeDesignByCustomer(HomeDesignByCustomerFormDTO formDTO) { + HomeDesignByCustomerResultDTO resultDTO = new HomeDesignByCustomerResultDTO(); + List list = customerHomeDetailDao.getCustomerHomeDetailComponent(formDTO); + List flist=new ArrayList();//功能组件 + List usedComponent=new ArrayList<>();//使用的组件集合 + for(CommonComponentDesignResultDTO c:list){ + usedComponent.add(c.getComponentId()); + //所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区 + if("0".equals(c.getRegion())){ + resultDTO.setTitleList(c); + }else if("1".equals(c.getRegion())){ + resultDTO.setTopList(c); + }else if("2".equals(c.getRegion())){ + flist.add(c); + }else if("3".equals(c.getRegion())){ + resultDTO.setFloatingList(c); + } + } + resultDTO.setFunctionList(flist); + resultDTO.setUsedComponentIdList(usedComponent); + return new Result().ok(resultDTO); + } } 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 b3c5917560..ef5dfa9cd7 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 @@ -19,4 +19,36 @@ + + \ No newline at end of file From 63b23cc521e2cb77a3da858c669571b481b6ea1f Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 16 Mar 2020 15:07:30 +0800 Subject: [PATCH 04/18] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E5=8F=98?= =?UTF-8?q?=E5=8A=A8=20=E5=88=A0=E9=99=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/controller/StrangerController.java | 39 --------------- .../main/java/com/epmet/dao/StrangerDao.java | 33 ------------- .../java/com/epmet/entity/StrangerEntity.java | 39 --------------- .../java/com/epmet/redis/StrangerRedis.java | 47 ------------------- .../com/epmet/service/StrangerService.java | 31 ------------ .../service/impl/StrangerServiceImpl.java | 41 ---------------- .../src/main/resources/mapper/StrangerDao.xml | 16 ------- 7 files changed, 246 deletions(-) delete mode 100644 epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerController.java delete mode 100644 epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/dao/StrangerDao.java delete mode 100644 epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/entity/StrangerEntity.java delete mode 100644 epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/redis/StrangerRedis.java delete mode 100644 epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/StrangerService.java delete mode 100644 epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerServiceImpl.java delete mode 100644 epmet-module/resi-guide/resi-guide-server/src/main/resources/mapper/StrangerDao.xml diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerController.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerController.java deleted file mode 100644 index 13baaafcea..0000000000 --- a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerController.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * 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.epmet.controller; - -import com.epmet.service.StrangerService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - - -/** - * 居民端陌生人导览 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-03-16 - */ -@RestController -@RequestMapping("customer") -public class StrangerController { - - @Autowired - private StrangerService strangerService; - -} diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/dao/StrangerDao.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/dao/StrangerDao.java deleted file mode 100644 index a5a4f0052b..0000000000 --- a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/dao/StrangerDao.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * 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.epmet.dao; - -import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.StrangerEntity; -import org.apache.ibatis.annotations.Mapper; - -/** - * 居民端陌生人导览 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-03-16 - */ -@Mapper -public interface StrangerDao extends BaseDao { - -} diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/entity/StrangerEntity.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/entity/StrangerEntity.java deleted file mode 100644 index 292f66ee19..0000000000 --- a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/entity/StrangerEntity.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * 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.epmet.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import com.epmet.commons.mybatis.entity.BaseEpmetEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 居民端陌生人导览 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-03-16 - */ -@Data -@EqualsAndHashCode(callSuper=false) -@TableName("stranger") -public class StrangerEntity extends BaseEpmetEntity { - - private static final long serialVersionUID = 1L; - - -} diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/redis/StrangerRedis.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/redis/StrangerRedis.java deleted file mode 100644 index a0c13b8054..0000000000 --- a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/redis/StrangerRedis.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * 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.epmet.redis; - -import com.epmet.commons.tools.redis.RedisUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -/** - * 居民端陌生人导览 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-03-16 - */ -@Component -public class StrangerRedis { - @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/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/StrangerService.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/StrangerService.java deleted file mode 100644 index c834214c89..0000000000 --- a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/StrangerService.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * 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.epmet.service; - -import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.entity.StrangerEntity; - -/** - * 居民端陌生人导览 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-03-16 - */ -public interface StrangerService extends BaseService { - -} diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerServiceImpl.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerServiceImpl.java deleted file mode 100644 index 41c04092c3..0000000000 --- a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerServiceImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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.epmet.service.impl; - -import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.dao.StrangerDao; -import com.epmet.entity.StrangerEntity; -import com.epmet.redis.StrangerRedis; -import com.epmet.service.StrangerService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -/** - * 居民端陌生人导览 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-03-16 - */ -@Service -public class StrangerServiceImpl extends BaseServiceImpl implements StrangerService { - - @Autowired - private StrangerRedis strangerRedis; - - -} diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/resources/mapper/StrangerDao.xml b/epmet-module/resi-guide/resi-guide-server/src/main/resources/mapper/StrangerDao.xml deleted file mode 100644 index f2e34969f5..0000000000 --- a/epmet-module/resi-guide/resi-guide-server/src/main/resources/mapper/StrangerDao.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - From 9a7af6ea3c8a70540986ec3e02b206fd7c87db5d Mon Sep 17 00:00:00 2001 From: yangshaoping <123456> Date: Mon, 16 Mar 2020 15:49:01 +0800 Subject: [PATCH 05/18] =?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-=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A42?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dao/CustomerHomeDetailDao.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 bfe188fa7c..dd46814c64 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 @@ -18,9 +18,13 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.form.HomeDesignByCustomerFormDTO; +import com.epmet.dto.result.CommonComponentDesignResultDTO; import com.epmet.entity.CustomerHomeDetailEntity; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 客户首页详情表 * @@ -29,5 +33,5 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface CustomerHomeDetailDao extends BaseDao { - + List getCustomerHomeDetailComponent(HomeDesignByCustomerFormDTO form); } \ No newline at end of file From 4060895be1474435852ca80451fb97bec7c69c6a Mon Sep 17 00:00:00 2001 From: yangshaoping <123456> Date: Mon, 16 Mar 2020 15:57:36 +0800 Subject: [PATCH 06/18] =?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-=E4=BB=A3=E7=A0=81=E6=B5=8B=E8=AF=95=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/CustomerHomeDetailDao.xml | 3 --- 1 file changed, 3 deletions(-) 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 ef5dfa9cd7..673153b3e1 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 @@ -47,8 +47,5 @@ LEFT JOIN home_component c ON b.COMPONENT_ID = c.id WHERE a.DEL_FLAG = 0 - ORDER BY - a.CREATED_TIME DESC - LIMIT 1 \ No newline at end of file From 057910103209b0aa68f8cdf58003c2830e0885cd Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 16 Mar 2020 16:16:53 +0800 Subject: [PATCH 07/18] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E8=A1=A8?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/GridLatestDTO.java | 101 +++++++++++++++++ .../java/com/epmet/dto/GridVisitedDTO.java | 101 +++++++++++++++++ .../controller/GridLatestController.java | 94 ++++++++++++++++ .../controller/GridVisitedController.java | 94 ++++++++++++++++ .../java/com/epmet/dao/GridLatestDao.java | 33 ++++++ .../java/com/epmet/dao/GridVisitedDao.java | 33 ++++++ .../com/epmet/entity/GridLatestEntity.java | 71 ++++++++++++ .../com/epmet/entity/GridVisitedEntity.java | 71 ++++++++++++ .../java/com/epmet/excel/GridLatestExcel.java | 74 +++++++++++++ .../com/epmet/excel/GridVisitedExcel.java | 74 +++++++++++++ .../java/com/epmet/redis/GridLatestRedis.java | 47 ++++++++ .../com/epmet/redis/GridVisitedRedis.java | 47 ++++++++ .../com/epmet/service/GridLatestService.java | 95 ++++++++++++++++ .../com/epmet/service/GridVisitedService.java | 95 ++++++++++++++++ .../service/impl/GridLatestServiceImpl.java | 104 ++++++++++++++++++ .../service/impl/GridVisitedServiceImpl.java | 104 ++++++++++++++++++ .../main/resources/mapper/GridLatestDao.xml | 23 ++++ .../main/resources/mapper/GridVisitedDao.xml | 23 ++++ 18 files changed, 1284 insertions(+) create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/GridLatestDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/GridVisitedDTO.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridLatestController.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridVisitedController.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GridLatestDao.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GridVisitedDao.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/entity/GridLatestEntity.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/entity/GridVisitedEntity.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/excel/GridLatestExcel.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/excel/GridVisitedExcel.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/redis/GridLatestRedis.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/redis/GridVisitedRedis.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridLatestService.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridVisitedService.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridVisitedServiceImpl.java create mode 100644 epmet-user/epmet-user-server/src/main/resources/mapper/GridLatestDao.xml create mode 100644 epmet-user/epmet-user-server/src/main/resources/mapper/GridVisitedDao.xml diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/GridLatestDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/GridLatestDTO.java new file mode 100644 index 0000000000..98a6176f5f --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/GridLatestDTO.java @@ -0,0 +1,101 @@ +/** + * 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.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 最近访问网格表 记录用户访问网格的最近一次记录,对同一网格只记录一条记录,同一网格每次只更新最近一次访问的时间 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-16 + */ +@Data +public class GridLatestDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 客户Id CUSTOMER.id + */ + private String customerId; + + /** + * 网格表Id(CUSTOMER_GRID.id) + */ + private String gridId; + + /** + * 用户Id(CUSTOMER_USER.id) + */ + private String customerUserId; + + /** + * 所属地区码 (数据统计字段) + */ + private String areaCode; + + /** + * 上级组织ID (数据统计字段) + */ + private String pid; + + /** + * 最近访问时间 + */ + private Date latestTime; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer 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/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/GridVisitedDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/GridVisitedDTO.java new file mode 100644 index 0000000000..cf2c85a332 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/GridVisitedDTO.java @@ -0,0 +1,101 @@ +/** + * 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.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 网格访问记录表 用户对网格访问的一个记录,只有在访问网格首页时才存储数据,一个用户一天对一个网格的访问只有一条记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-16 + */ +@Data +public class GridVisitedDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 是否注册(0:否 1:是) + */ + private Integer isRegister; + + /** + * 客户ID + */ + private String customerId; + + /** + * 网格表Id (CUSTOMER_GRID.id) + */ + private String gridId; + + /** + * 用户Id + */ + private String customerUserId; + + /** + * 是否首次位置授权(0:否 1:是) + */ + private Integer isAuthorized; + + /** + * 访问时间 一个用户一天访问一个网格只有一条记录 + */ + private Date visitTime; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer 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/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridLatestController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridLatestController.java new file mode 100644 index 0000000000..a6c1500b02 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridLatestController.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.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.GridLatestDTO; +import com.epmet.excel.GridLatestExcel; +import com.epmet.service.GridLatestService; +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 generator generator@elink-cn.com + * @since v1.0.0 2020-03-16 + */ +@RestController +@RequestMapping("gridlatest") +public class GridLatestController { + + @Autowired + private GridLatestService gridLatestService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = gridLatestService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + GridLatestDTO data = gridLatestService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody GridLatestDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + gridLatestService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody GridLatestDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + gridLatestService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + gridLatestService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = gridLatestService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, GridLatestExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridVisitedController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridVisitedController.java new file mode 100644 index 0000000000..a960c39e20 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridVisitedController.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.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.GridVisitedDTO; +import com.epmet.excel.GridVisitedExcel; +import com.epmet.service.GridVisitedService; +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 generator generator@elink-cn.com + * @since v1.0.0 2020-03-16 + */ +@RestController +@RequestMapping("gridvisited") +public class GridVisitedController { + + @Autowired + private GridVisitedService gridVisitedService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = gridVisitedService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + GridVisitedDTO data = gridVisitedService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody GridVisitedDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + gridVisitedService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody GridVisitedDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + gridVisitedService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + gridVisitedService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = gridVisitedService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, GridVisitedExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GridLatestDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GridLatestDao.java new file mode 100644 index 0000000000..2b31a4b1a8 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GridLatestDao.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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.GridLatestEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 最近访问网格表 记录用户访问网格的最近一次记录,对同一网格只记录一条记录,同一网格每次只更新最近一次访问的时间 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-16 + */ +@Mapper +public interface GridLatestDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GridVisitedDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GridVisitedDao.java new file mode 100644 index 0000000000..e51d88956d --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GridVisitedDao.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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.GridVisitedEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 网格访问记录表 用户对网格访问的一个记录,只有在访问网格首页时才存储数据,一个用户一天对一个网格的访问只有一条记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-16 + */ +@Mapper +public interface GridVisitedDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/GridLatestEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/GridLatestEntity.java new file mode 100644 index 0000000000..254829c16f --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/GridLatestEntity.java @@ -0,0 +1,71 @@ +/** + * 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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 最近访问网格表 记录用户访问网格的最近一次记录,对同一网格只记录一条记录,同一网格每次只更新最近一次访问的时间 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("grid_latest") +public class GridLatestEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id CUSTOMER.id + */ + private String customerId; + + /** + * 网格表Id(CUSTOMER_GRID.id) + */ + private String gridId; + + /** + * 用户Id(CUSTOMER_USER.id) + */ + private String customerUserId; + + /** + * 所属地区码 (数据统计字段) + */ + private String areaCode; + + /** + * 上级组织ID (数据统计字段) + */ + private String pid; + + /** + * 最近访问时间 + */ + private Date latestTime; + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/GridVisitedEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/GridVisitedEntity.java new file mode 100644 index 0000000000..9fb79ca7af --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/GridVisitedEntity.java @@ -0,0 +1,71 @@ +/** + * 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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 网格访问记录表 用户对网格访问的一个记录,只有在访问网格首页时才存储数据,一个用户一天对一个网格的访问只有一条记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("grid_visited") +public class GridVisitedEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 是否注册(0:否 1:是) + */ + private Integer isRegister; + + /** + * 客户ID + */ + private String customerId; + + /** + * 网格表Id (CUSTOMER_GRID.id) + */ + private String gridId; + + /** + * 用户Id + */ + private String customerUserId; + + /** + * 是否首次位置授权(0:否 1:是) + */ + private Integer isAuthorized; + + /** + * 访问时间 一个用户一天访问一个网格只有一条记录 + */ + private Date visitTime; + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/GridLatestExcel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/GridLatestExcel.java new file mode 100644 index 0000000000..e4d6000914 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/GridLatestExcel.java @@ -0,0 +1,74 @@ +/** + * 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.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 最近访问网格表 记录用户访问网格的最近一次记录,对同一网格只记录一条记录,同一网格每次只更新最近一次访问的时间 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-16 + */ +@Data +public class GridLatestExcel { + + @Excel(name = "唯一标识") + private String id; + + @Excel(name = "客户Id CUSTOMER.id") + private String customerId; + + @Excel(name = "网格表Id(CUSTOMER_GRID.id)") + private String gridId; + + @Excel(name = "用户Id(CUSTOMER_USER.id)") + private String customerUserId; + + @Excel(name = "所属地区码 (数据统计字段)") + private String areaCode; + + @Excel(name = "上级组织ID (数据统计字段)") + private String pid; + + @Excel(name = "最近访问时间") + private Date latestTime; + + @Excel(name = "删除标识:0.未删除 1.已删除") + private Integer 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/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/GridVisitedExcel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/GridVisitedExcel.java new file mode 100644 index 0000000000..13c5fefc26 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/GridVisitedExcel.java @@ -0,0 +1,74 @@ +/** + * 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.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 网格访问记录表 用户对网格访问的一个记录,只有在访问网格首页时才存储数据,一个用户一天对一个网格的访问只有一条记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-16 + */ +@Data +public class GridVisitedExcel { + + @Excel(name = "唯一标识") + private String id; + + @Excel(name = "是否注册(0:否 1:是)") + private Integer isRegister; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "网格表Id (CUSTOMER_GRID.id)") + private String gridId; + + @Excel(name = "用户Id") + private String customerUserId; + + @Excel(name = "是否首次位置授权(0:否 1:是)") + private Integer isAuthorized; + + @Excel(name = "访问时间 一个用户一天访问一个网格只有一条记录") + private Date visitTime; + + @Excel(name = "删除标识:0.未删除 1.已删除") + private Integer 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/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/GridLatestRedis.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/GridLatestRedis.java new file mode 100644 index 0000000000..41bf0cfb49 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/GridLatestRedis.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.epmet.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 最近访问网格表 记录用户访问网格的最近一次记录,对同一网格只记录一条记录,同一网格每次只更新最近一次访问的时间 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-16 + */ +@Component +public class GridLatestRedis { + @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/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/GridVisitedRedis.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/GridVisitedRedis.java new file mode 100644 index 0000000000..9316d6f3c7 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/GridVisitedRedis.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.epmet.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 网格访问记录表 用户对网格访问的一个记录,只有在访问网格首页时才存储数据,一个用户一天对一个网格的访问只有一条记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-16 + */ +@Component +public class GridVisitedRedis { + @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/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridLatestService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridLatestService.java new file mode 100644 index 0000000000..1ddbb716a8 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridLatestService.java @@ -0,0 +1,95 @@ +/** + * 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.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.GridLatestDTO; +import com.epmet.entity.GridLatestEntity; + +import java.util.List; +import java.util.Map; + +/** + * 最近访问网格表 记录用户访问网格的最近一次记录,对同一网格只记录一条记录,同一网格每次只更新最近一次访问的时间 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-16 + */ +public interface GridLatestService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-03-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-03-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return GridLatestDTO + * @author generator + * @date 2020-03-16 + */ + GridLatestDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-03-16 + */ + void save(GridLatestDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-03-16 + */ + void update(GridLatestDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-03-16 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridVisitedService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridVisitedService.java new file mode 100644 index 0000000000..d081fab310 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridVisitedService.java @@ -0,0 +1,95 @@ +/** + * 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.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.GridVisitedDTO; +import com.epmet.entity.GridVisitedEntity; + +import java.util.List; +import java.util.Map; + +/** + * 网格访问记录表 用户对网格访问的一个记录,只有在访问网格首页时才存储数据,一个用户一天对一个网格的访问只有一条记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-16 + */ +public interface GridVisitedService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-03-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-03-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return GridVisitedDTO + * @author generator + * @date 2020-03-16 + */ + GridVisitedDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-03-16 + */ + void save(GridVisitedDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-03-16 + */ + void update(GridVisitedDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-03-16 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java new file mode 100644 index 0000000000..1ab4bac35f --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java @@ -0,0 +1,104 @@ +/** + * 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.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.GridLatestDao; +import com.epmet.dto.GridLatestDTO; +import com.epmet.entity.GridLatestEntity; +import com.epmet.redis.GridLatestRedis; +import com.epmet.service.GridLatestService; +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 generator generator@elink-cn.com + * @since v1.0.0 2020-03-16 + */ +@Service +public class GridLatestServiceImpl extends BaseServiceImpl implements GridLatestService { + + @Autowired + private GridLatestRedis gridLatestRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, GridLatestDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, GridLatestDTO.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 GridLatestDTO get(String id) { + GridLatestEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, GridLatestDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(GridLatestDTO dto) { + GridLatestEntity entity = ConvertUtils.sourceToTarget(dto, GridLatestEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(GridLatestDTO dto) { + GridLatestEntity entity = ConvertUtils.sourceToTarget(dto, GridLatestEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridVisitedServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridVisitedServiceImpl.java new file mode 100644 index 0000000000..fdf5bd0a2f --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridVisitedServiceImpl.java @@ -0,0 +1,104 @@ +/** + * 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.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.GridVisitedDao; +import com.epmet.dto.GridVisitedDTO; +import com.epmet.entity.GridVisitedEntity; +import com.epmet.redis.GridVisitedRedis; +import com.epmet.service.GridVisitedService; +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 generator generator@elink-cn.com + * @since v1.0.0 2020-03-16 + */ +@Service +public class GridVisitedServiceImpl extends BaseServiceImpl implements GridVisitedService { + + @Autowired + private GridVisitedRedis gridVisitedRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, GridVisitedDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, GridVisitedDTO.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 GridVisitedDTO get(String id) { + GridVisitedEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, GridVisitedDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(GridVisitedDTO dto) { + GridVisitedEntity entity = ConvertUtils.sourceToTarget(dto, GridVisitedEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(GridVisitedDTO dto) { + GridVisitedEntity entity = ConvertUtils.sourceToTarget(dto, GridVisitedEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/GridLatestDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/GridLatestDao.xml new file mode 100644 index 0000000000..c05db815e8 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/GridLatestDao.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/GridVisitedDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/GridVisitedDao.xml new file mode 100644 index 0000000000..2ea9a363db --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/GridVisitedDao.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 958b1fb8a4d6d984d4fd90e13a868048aa5e97ee Mon Sep 17 00:00:00 2001 From: hosinokamui Date: Mon, 16 Mar 2020 18:28:45 +0800 Subject: [PATCH 08/18] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E7=A8=BF=E4=BF=9D=E5=AD=98=EF=BC=8C=E9=A6=96=E9=A1=B5=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E7=A8=BF=E5=8F=91=E7=89=88api=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/HomeComponentFormDTO.java | 42 ++++++++++++++++ .../com/epmet/dto/form/HomeDesignFormDTO.java | 33 ++++++++++++ .../com/epmet/controller/HomeController.java | 30 ++++++++++- .../java/com/epmet/dao/CustomerHomeDao.java | 18 +++++-- .../com/epmet/dao/CustomerHomeDetailDao.java | 10 ++++ .../java/com/epmet/service/HomeService.java | 19 +++++++ .../epmet/service/impl/HomeServiceImpl.java | 50 +++++++++++++++++-- .../main/resources/mapper/CustomerHomeDao.xml | 13 +++++ .../mapper/CustomerHomeDetailDao.xml | 7 +++ 9 files changed, 213 insertions(+), 9 deletions(-) create mode 100644 epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/HomeComponentFormDTO.java create mode 100644 epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/HomeDesignFormDTO.java 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 new file mode 100644 index 0000000000..a7833e17a9 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/HomeComponentFormDTO.java @@ -0,0 +1,42 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 运营端-客户定制化服务-首页设计稿组件上传数据-入参 + * @author zhaoqifeng + * @date 2020/3/16 11:27 + */ +@Data +public class HomeComponentFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 组件id + */ + private String componentId; + + /** + * 所属区域 + */ + private Integer region; + + /** + * 高级配置项 + */ + private String configuration; + + /** + * 默认数据 + */ + private String demoData; + + /** + * 显示顺序 + */ + private Integer displayOrder; + +} diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/HomeDesignFormDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/HomeDesignFormDTO.java new file mode 100644 index 0000000000..c51b897775 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/HomeDesignFormDTO.java @@ -0,0 +1,33 @@ +package com.epmet.dto.form; +/** + * 运营端-客户定制化服务-首页设计稿组件上传数据-入参 + * @author zhaoqifeng + * @date 2020/3/16 11:27 + */ + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +@Data +public class HomeDesignFormDTO implements Serializable { + + + private static final long serialVersionUID = -246434129998560246L; + + /** + * 客户id + */ + private String customerId; + + /** + * 所属端类型 0:居民端 1:政府端 + */ + private String clientType; + + /** + * 组件集合 + */ + private List componentList; +} diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/HomeController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/HomeController.java index 3e5fb04a85..2ee5686c71 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/HomeController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/HomeController.java @@ -4,10 +4,10 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.ComponentListByCustomerFormDTO; import com.epmet.dto.form.HomeDesignByCustomerFormDTO; +import com.epmet.dto.form.HomeDesignFormDTO; import com.epmet.dto.result.ComponentListByCustomerResultDTO; import com.epmet.dto.result.HomeDesignByCustomerResultDTO; import com.epmet.service.HomeService; -import net.bytebuddy.asm.Advice; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -48,4 +48,32 @@ public class HomeController { ValidatorUtils.validateEntity(formDTO); return homeService.getHomeDesignByCustomer(formDTO); } + + /** + * 首页设计稿组件上传数据 + * @param formDTO 参数 + * @return com.epmet.commons.tools.utils.Result + * @author zhaoqifeng + * Date 2020/3/16 13:21 + **/ + @PostMapping("savehomedesign") + public Result saveHomeDesign(@RequestBody HomeDesignFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + homeService.saveHomeDesign(formDTO); + return new Result(); + } + + /** + * 首页设计稿发版 + * @param formDTO 参数 + * @return com.epmet.commons.tools.utils.Result + * @author zhaoqifeng + * Date 2020/3/16 13:21 + **/ + @PostMapping("distributehomedesign") + public Result distributeHomeDesign(@RequestBody HomeDesignFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + homeService.distributeHomeDesign(formDTO); + return new Result(); + } } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerHomeDao.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerHomeDao.java index ac9a99cf51..42bc2824b4 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerHomeDao.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerHomeDao.java @@ -18,11 +18,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.CustomerHomeDTO; -import com.epmet.dto.form.HomeDesignByCustomerFormDTO; +import com.epmet.dto.form.HomeDesignFormDTO; import com.epmet.entity.CustomerHomeEntity; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 客户首页表 * @@ -31,6 +32,15 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface CustomerHomeDao extends BaseDao { - //根据客户id,所属端口,查询客户是否有发版模板信息 - CustomerHomeDTO getCustomerHomeDetailByCustomerAndClientType(HomeDesignByCustomerFormDTO form); + + /** + * + * 客户首页列表查询 + * + * @param formDTO + * @return java.util.List + * @author zhaoqifeng + * @date 2020/3/16 14:02 + **/ + List selectCustomerHomeList(HomeDesignFormDTO formDTO); } \ No newline at end of file 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 dd46814c64..9a3d2e4343 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 @@ -33,5 +33,15 @@ import java.util.List; */ @Mapper public interface CustomerHomeDetailDao extends BaseDao { + /** + * + * 根据界面id清除数据 + * + * @param homeId 界面ID + * @author zhaoqifeng + * @date 2020/3/16 14:02 + */ + void deleteCustomerHomeDetailByHomeId(String homeId); + 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/HomeService.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/HomeService.java index f58966ac3b..cb43d8c0c3 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/HomeService.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/HomeService.java @@ -3,6 +3,7 @@ package com.epmet.service; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.form.ComponentListByCustomerFormDTO; import com.epmet.dto.form.HomeDesignByCustomerFormDTO; +import com.epmet.dto.form.HomeDesignFormDTO; import com.epmet.dto.result.ComponentListByCustomerResultDTO; import com.epmet.dto.result.HomeDesignByCustomerResultDTO; @@ -29,4 +30,22 @@ public interface HomeService { * @Date 2020/3/16 13:21 **/ Result getHomeDesignByCustomer(HomeDesignByCustomerFormDTO formDTO); + + /** + * + * 首页设计稿组件上传数据 + * @param: formDTO + * @author: zhaoqifeng + * @date: 2020/03/16 13:49:41 + */ + void saveHomeDesign(HomeDesignFormDTO formDTO); + + /** + * + * 首页设计稿发版 + * @param: formDTO + * @author: zhaoqifeng + * @date: 2020/03/16 13:49:41 + */ + void distributeHomeDesign(HomeDesignFormDTO formDTO); } 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 b84eef3ae9..d68282628e 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 @@ -3,22 +3,22 @@ package com.epmet.service.impl; import com.epmet.commons.tools.utils.Result; import com.epmet.dao.CustomerHomeDao; import com.epmet.dao.CustomerHomeDetailDao; -import com.epmet.dao.CustomerHomeTemplateDao; import com.epmet.dao.HomeComponentDao; -import com.epmet.dto.CustomerHomeDTO; import com.epmet.dto.form.ComponentListByCustomerFormDTO; +import com.epmet.dto.form.HomeComponentFormDTO; import com.epmet.dto.form.HomeDesignByCustomerFormDTO; +import com.epmet.dto.form.HomeDesignFormDTO; import com.epmet.dto.result.CommonComponentDesignResultDTO; import com.epmet.dto.result.ComponentListByCustomerResultDTO; import com.epmet.dto.result.HomeDesignByCustomerResultDTO; +import com.epmet.entity.CustomerHomeDetailEntity; +import com.epmet.entity.CustomerHomeEntity; import com.epmet.service.HomeService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; -import java.util.HashSet; import java.util.List; -import java.util.Set; /** * @Description 客户定制化服务-首页 @@ -31,6 +31,8 @@ public class HomeServiceImpl implements HomeService { private HomeComponentDao homeComponentDao; @Autowired private CustomerHomeDetailDao customerHomeDetailDao; + @Autowired + private CustomerHomeDao customerHomeDao; @Override public Result getComponentListByCustomer(ComponentListByCustomerFormDTO formDTO) { @@ -63,4 +65,44 @@ public class HomeServiceImpl implements HomeService { resultDTO.setUsedComponentIdList(usedComponent); return new Result().ok(resultDTO); } + + @Override + public void saveHomeDesign(HomeDesignFormDTO formDTO) { + + List customerHomeList = customerHomeDao.selectCustomerHomeList(formDTO); + + for(CustomerHomeEntity entity : customerHomeList) { + if (entity.getStatus() == 1) { + saveCustomerHomeDetail(formDTO, entity); + } + } + } + + @Override + public void distributeHomeDesign(HomeDesignFormDTO formDTO) { + + List customerHomeList = customerHomeDao.selectCustomerHomeList(formDTO); + + for(CustomerHomeEntity entity : customerHomeList) { + saveCustomerHomeDetail(formDTO, entity); + } + } + + private void saveCustomerHomeDetail(HomeDesignFormDTO formDTO, CustomerHomeEntity entity) { + //根据homeID清空客户首页详情表中的数据 + customerHomeDetailDao.deleteCustomerHomeDetailByHomeId(entity.getId()); + + //将数据存入客户首页详情表 + for (HomeComponentFormDTO homeComponentForm : formDTO.getComponentList()) { + CustomerHomeDetailEntity customerHomeDetailEntity = new CustomerHomeDetailEntity(); + customerHomeDetailEntity.setHomeId(entity.getId()); + customerHomeDetailEntity.setComponentId(homeComponentForm.getComponentId()); + customerHomeDetailEntity.setRegion(homeComponentForm.getRegion()); + customerHomeDetailEntity.setConfiguration(homeComponentForm.getConfiguration()); + customerHomeDetailEntity.setDemoData(homeComponentForm.getDemoData()); + customerHomeDetailEntity.setDisplayOrder(homeComponentForm.getDisplayOrder()); + customerHomeDetailDao.insert(customerHomeDetailEntity); + + } + } } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerHomeDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerHomeDao.xml index 1ae417cdc0..3bc7dfdb23 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerHomeDao.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerHomeDao.xml @@ -16,5 +16,18 @@ + + + \ No newline at end of file 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 673153b3e1..57a4efe220 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 @@ -18,6 +18,13 @@ + + DELETE + FROM + CUSTOMER_HOME_DETAIL + WHERE + HOME_ID = #{homeId} + Date: Tue, 17 Mar 2020 12:36:16 +0800 Subject: [PATCH 11/18] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/commons/tools/constant/ServiceConstant.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java index 2329a246b6..c358b530b3 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java @@ -48,4 +48,9 @@ public interface ServiceConstant { * 陌生人导览 */ String RESI_GUIDE_SERVER = "resi-guide-server"; + + /** + * 政府端组织架构 + */ + String GOV_ORG_SERVER = "gov-org-server"; } From 50a775ac70f13a0c9c804b3e7f578fddbb13e0e0 Mon Sep 17 00:00:00 2001 From: yangshaoping <123456> Date: Tue, 17 Mar 2020 14:44:19 +0800 Subject: [PATCH 12/18] =?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 14/18] =?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 15/18] =?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 16/18] =?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 17/18] =?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 18/18] =?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); }