From 704a495346a7276659726a1139b3329041b60bd2 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 1 Sep 2020 17:06:07 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E6=96=B0=E5=A2=9Efootbar=E7=BB=B4?= =?UTF-8?q?=E6=8A=A4=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/exception/EpmetErrorCode.java | 2 + .../com/epmet/dto/CustomerFootBarDTO.java | 7 ++ .../dto/form/CustomerFootBarFormDTO.java | 76 +++++++++++++++- .../dto/result/CustomerFootBarResultDTO.java | 6 ++ .../controller/CustomerFootBarController.java | 68 ++++++++++++++- .../com/epmet/dao/CustomerFootBarDao.java | 33 +++++++ .../epmet/entity/CustomerFootBarEntity.java | 15 +++- .../epmet/service/CustomerFootBarService.java | 14 +++ .../impl/CustomerFootBarServiceImpl.java | 87 +++++++++++++++++++ .../migration/V0.0.5__footbar_add_column.sql | 2 + .../resources/mapper/CustomerFootBarDao.xml | 60 ++++++++++++- 11 files changed, 361 insertions(+), 9 deletions(-) create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.5__footbar_add_column.sql diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index d3d2b8ccd1..4be3bd90b9 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -104,6 +104,8 @@ public enum EpmetErrorCode { OPER_EXTERNAL_APP_AUTH_ERROR(8709, "外部应用认证失败"), OPER_EXTERNAL_CUSTOMER_NOT_EXISTS(8710, "该客户不存在"), OPER_EXTERNAL_APP_EXISTS(8711, "应用已存在"), + OPER_CUSTOMER_FOOTBAR_EXISTS(8712, "footbar已存在"), + OPER_CUSTOMER_FOOTBAR_NOT_FOUND(8713, "footbar不存在"), // 党建声音 前端提示 88段 DRAFT_CONTENT_IS_NULL(8801, "至少需要添加一个段落"), diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/CustomerFootBarDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/CustomerFootBarDTO.java index 2cc9b89b0e..9a33b3161d 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/CustomerFootBarDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/CustomerFootBarDTO.java @@ -43,6 +43,11 @@ public class CustomerFootBarDTO implements Serializable { */ private String barName; + /** + * 默认的bar名称 + */ + private String defaultBarName; + /** * KEY */ @@ -93,4 +98,6 @@ public class CustomerFootBarDTO implements Serializable { */ private Date updatedTime; + private Boolean display; + } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CustomerFootBarFormDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CustomerFootBarFormDTO.java index 1d5218fd4b..fc09cbffd6 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CustomerFootBarFormDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CustomerFootBarFormDTO.java @@ -1,17 +1,89 @@ package com.epmet.dto.form; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.util.List; @Data public class CustomerFootBarFormDTO { - //@NotBlank(message = "客户ID不能为空") + // 创建footbar的分组 + public interface CreateFootBarGroup extends CustomerClientShowGroup {} + + // 查询footbar列表分组 + public interface ListFootBarGroup {} + + // 更新footbar + public interface UpdateFootBarGroup {} + + // 保存顺序 + public interface SaveOrderGroup {} + + // 明细分组 + public interface FootBarDetailGroup {} + + // 更新显示状态分组 + public interface UpdateDisplayStatusGroup {} + + @NotBlank(message = "FootBar的ID不能为空", groups = { UpdateFootBarGroup.class, FootBarDetailGroup.class, UpdateDisplayStatusGroup.class }) + private String id; + + @NotBlank(message = "客户ID不能为空", groups = { CreateFootBarGroup.class }) private String customerId; // 哪一个端:gov,resi - @NotBlank(message = "app类型不能为空") + @NotBlank(message = "app类型不能为空", groups = { ListFootBarGroup.class, CreateFootBarGroup.class }) private String appType; + @NotBlank(message = "名称不能为空", groups = { CreateFootBarGroup.class, UpdateFootBarGroup.class }) + private String barName; + + @NotBlank(message = "key不能为空", groups = { CreateFootBarGroup.class }) + private String barKey; + + @NotBlank(message = "页面标题不能为空", groups = { CreateFootBarGroup.class, UpdateFootBarGroup.class }) + private String pageTitle; + + @NotBlank(message = "图标路径不能为空", groups = { CreateFootBarGroup.class, UpdateFootBarGroup.class }) + private String iconPath; + + @NotBlank(message = "选中的图标路径不能为空", groups = { CreateFootBarGroup.class, UpdateFootBarGroup.class }) + private String selectedIconPath; + + @NotEmpty(message = "顺序不能为空", groups = { SaveOrderGroup.class }) + private List orderList; + + @NotNull(message = "显示状态不能为空", groups = { UpdateDisplayStatusGroup.class }) + private Boolean display; + + /** + * 排序索引号dto + */ + public static class OrderIndexDTO { + private String id; + private Integer orderIndex; + + public OrderIndexDTO() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Integer getOrderIndex() { + return orderIndex; + } + + public void setOrderIndex(Integer orderIndex) { + this.orderIndex = orderIndex; + } + } } diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFootBarResultDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFootBarResultDTO.java index 832e06944c..bda303ce57 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFootBarResultDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFootBarResultDTO.java @@ -39,6 +39,10 @@ public class CustomerFootBarResultDTO implements Serializable { */ private String id; + private String customerId; + + private String appType; + /** * bar名称 */ @@ -94,4 +98,6 @@ public class CustomerFootBarResultDTO implements Serializable { */ private Date updatedTime; + private Boolean display; + } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFootBarController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFootBarController.java index 1be0943b60..aa6e0e58d2 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFootBarController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFootBarController.java @@ -27,6 +27,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.CustomerFootBarDTO; import com.epmet.dto.form.CustomerFootBarFormDTO; +import com.epmet.dto.result.CustomerFootBarResultDTO; import com.epmet.entity.CustomerFootBarEntity; import com.epmet.excel.CustomerFootBarExcel; import com.epmet.service.CustomerFootBarService; @@ -35,7 +36,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; -import javax.validation.constraints.NotBlank; import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -103,17 +103,81 @@ public class CustomerFootBarController { */ @PostMapping("customerfootbars") public Result> getCustomerfootbars(@RequestBody CustomerFootBarFormDTO formDTO) { - ValidatorUtils.validateEntity(formDTO); + ValidatorUtils.validateEntity(formDTO, CustomerFootBarFormDTO.ListFootBarGroup.class); String customerId = formDTO.getCustomerId(); String appType = formDTO.getAppType(); List footbars = customerFootBarService.listCustomerFootBars(customerId, appType); List barDTOS = new LinkedList<>(); footbars.forEach(barEntity -> { + CustomerFootBarEntity defaultFootBarEntity = customerFootBarService.getByAppTypeAndBarKeyOfCustomer("default", barEntity.getAppType(), barEntity.getBarKey()); + CustomerFootBarDTO barDTO = new CustomerFootBarDTO(); BeanUtils.copyProperties(barEntity, barDTO); + barDTO.setDefaultBarName(defaultFootBarEntity.getBarName()); barDTOS.add(barDTO); }); return new Result>().ok(barDTOS); } + + /** + * 创建footbar + * @param form + * @return + */ + @PostMapping("createfootbar") + public Result createFootBar(@RequestBody CustomerFootBarFormDTO form) { + ValidatorUtils.validateEntity(form, CustomerFootBarFormDTO.CreateFootBarGroup.class); + customerFootBarService.createFootBar(form); + return new Result(); + } + + /** + * 更新footbar + * @param form + * @return + */ + @PostMapping("updatefootbar") + public Result updateFootbar(@RequestBody CustomerFootBarFormDTO form) { + ValidatorUtils.validateEntity(form, CustomerFootBarFormDTO.UpdateFootBarGroup.class); + customerFootBarService.updateFootBar(form); + return new Result(); + } + + /** + * + * @param form + * @return + */ + @PostMapping("footbardetail") + public Result footbarDetail(@RequestBody CustomerFootBarFormDTO form) { + ValidatorUtils.validateEntity(form, CustomerFootBarFormDTO.FootBarDetailGroup.class); + CustomerFootBarResultDTO dto = customerFootBarService.getFootBarDetail(form.getId()); + return new Result().ok(dto); + } + + /** + * 保存排序 + * @param form + * @return + */ + @PostMapping("saveorder") + public Result saveOrder(@RequestBody CustomerFootBarFormDTO form) { + ValidatorUtils.validateEntity(form, CustomerFootBarFormDTO.SaveOrderGroup.class); + customerFootBarService.saveOrder(form.getOrderList()); + return new Result(); + } + + /** + * 更新显示状态 + * @param form + * @return + */ + @PostMapping("updatedisplaystatus") + public Result updateDisplayStatus(@RequestBody CustomerFootBarFormDTO form) { + ValidatorUtils.validateEntity(form, CustomerFootBarFormDTO.UpdateDisplayStatusGroup.class); + customerFootBarService.updateDisplayStatus(form.getId(), form.getDisplay()); + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFootBarDao.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFootBarDao.java index 480e148b60..01d2a2c0dc 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFootBarDao.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFootBarDao.java @@ -35,4 +35,37 @@ public interface CustomerFootBarDao extends BaseDao { List listCustomerFootBars(@Param("customerId") String customerId, @Param("appType") String appType); + + /** + * 唯一性count + * @param appType + * @param barKey + * @return + */ + int count4Unique(@Param("customerId") String customerId, + @Param("appType") String appType, + @Param("barKey") String barKey, + @Param("barName") String barName); + + /** + * 获取下一个顺序号 + * @param customerId + * @param appType + * @return + */ + Integer fetchNextOrder(@Param("customerId") String customerId, @Param("appType") String appType); + + /** + * 更新顺序号 + * @param id + * @param orderIndex + * @return + */ + Integer updateOrder(@Param("id") String id, @Param("orderIndex") Integer orderIndex); + + CustomerFootBarEntity getByAppTypeAndBarKeyOfCustomer(@Param("customerId") String customerId, + @Param("appType") String appType, + @Param("barKey") String barKey); + + void updateDisplayStatus(@Param("id") String id, @Param("display") Boolean display); } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/CustomerFootBarEntity.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/CustomerFootBarEntity.java index 2161fc4bdc..9abc736b13 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/CustomerFootBarEntity.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/CustomerFootBarEntity.java @@ -38,6 +38,11 @@ public class CustomerFootBarEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; + /** + * 客户id + */ + private String customerId; + /** * bar名称 */ @@ -65,6 +70,14 @@ public class CustomerFootBarEntity extends BaseEpmetEntity { */ private String selectedIconPath; - private Integer order; + /** + * 顺序号 + */ + private Integer orderIndex; + + /** + * 是否显示 + */ + private Boolean display; } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFootBarService.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFootBarService.java index f38eab950d..eb9a3288b4 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFootBarService.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFootBarService.java @@ -20,6 +20,8 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.CustomerFootBarDTO; +import com.epmet.dto.form.CustomerFootBarFormDTO; +import com.epmet.dto.result.CustomerFootBarResultDTO; import com.epmet.entity.CustomerFootBarEntity; import java.util.List; @@ -94,4 +96,16 @@ public interface CustomerFootBarService extends BaseService listCustomerFootBars(String customerId, String appType); + + void createFootBar(CustomerFootBarFormDTO form); + + void updateFootBar(CustomerFootBarFormDTO form); + + CustomerFootBarResultDTO getFootBarDetail(String id); + + void saveOrder(List orderList); + + CustomerFootBarEntity getByAppTypeAndBarKeyOfCustomer(String customerId, String appType, String barKey); + + void updateDisplayStatus(String id, Boolean display); } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java index 417555be13..a6f6a40a1b 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java @@ -20,11 +20,15 @@ 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.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; 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.CustomerFootBarDao; import com.epmet.dto.CustomerFootBarDTO; +import com.epmet.dto.form.CustomerFootBarFormDTO; +import com.epmet.dto.result.CustomerFootBarResultDTO; import com.epmet.entity.CustomerFootBarEntity; import com.epmet.redis.CustomerFootBarRedis; import com.epmet.service.CustomerFootBarService; @@ -106,4 +110,87 @@ public class CustomerFootBarServiceImpl extends BaseServiceImpl orderList) { + for (CustomerFootBarFormDTO.OrderIndexDTO idx : orderList) { + baseDao.updateOrder(idx.getId(), idx.getOrderIndex()); + } + } + + @Override + public CustomerFootBarEntity getByAppTypeAndBarKeyOfCustomer(String customerId, String appType, String barKey) { + return baseDao.getByAppTypeAndBarKeyOfCustomer(customerId, appType, barKey); + } + + @Override + public void updateDisplayStatus(String id, Boolean display) { + baseDao.updateDisplayStatus(id, display); + } + + /** + * 添加footbar之前的校验 + * @param form + */ + private void validateBeforeCreate(CustomerFootBarFormDTO form) { + synchronized (this) { + int uniqueCount1 = baseDao.count4Unique(form.getCustomerId(), form.getAppType(), form.getBarKey(), null); + int uniqueCount2 = baseDao.count4Unique(form.getCustomerId(), form.getAppType(), null, form.getBarName()); + if (uniqueCount1 > 0 || uniqueCount2 > 0) { + throw new RenException(EpmetErrorCode.OPER_CUSTOMER_FOOTBAR_EXISTS.getCode(), + EpmetErrorCode.OPER_CUSTOMER_FOOTBAR_EXISTS.getMsg()); + } + } + } + + private void validateBeforeUpdate(CustomerFootBarFormDTO form) { + synchronized (this) { + int uniqueCount2 = baseDao.count4Unique(form.getCustomerId(), form.getAppType(), null, form.getBarName()); + if (uniqueCount2 > 0) { + throw new RenException(EpmetErrorCode.OPER_CUSTOMER_FOOTBAR_EXISTS.getCode(), + EpmetErrorCode.OPER_CUSTOMER_FOOTBAR_EXISTS.getMsg()); + } + } + } } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.5__footbar_add_column.sql b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.5__footbar_add_column.sql new file mode 100644 index 0000000000..d6301a196a --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.5__footbar_add_column.sql @@ -0,0 +1,2 @@ +alter table customer_foot_bar add column DISPLAY tinyint(1) default 1; +alter table customer_foot_bar change `ORDER` ORDER_INDEX tinyint(1) default 1; \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFootBarDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFootBarDao.xml index e41b42ddb3..5807755285 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFootBarDao.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFootBarDao.xml @@ -11,7 +11,8 @@ - + + @@ -20,6 +21,19 @@ + + + update customer_foot_bar + set ORDER_INDEX = #{orderIndex} + where ID = #{id} + + + + update customer_foot_bar + set DISPLAY=#{display} + where ID = #{id} + + + + + + + + From 346a97adfc7638d69ac89119c6fc82f91f2d8d1e Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 1 Sep 2020 17:43:05 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E6=96=B0=E5=A2=9E:=E4=B8=BA=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E5=88=9D=E5=A7=8B=E5=8C=96=E9=BB=98=E8=AE=A4=E7=9A=84?= =?UTF-8?q?footbar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/CustomerFootBarFormDTO.java | 7 +++-- .../dto/result/CustomerFootBarResultDTO.java | 6 ++++ .../controller/CustomerFootBarController.java | 12 ++++++++ .../com/epmet/dao/CustomerFootBarDao.java | 3 ++ .../epmet/service/CustomerFootBarService.java | 2 ++ .../impl/CustomerFootBarServiceImpl.java | 29 +++++++++++++++++++ .../resources/mapper/CustomerFootBarDao.xml | 22 ++++++++++++++ 7 files changed, 79 insertions(+), 2 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CustomerFootBarFormDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CustomerFootBarFormDTO.java index fc09cbffd6..d699264d4b 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CustomerFootBarFormDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CustomerFootBarFormDTO.java @@ -29,14 +29,17 @@ public class CustomerFootBarFormDTO { // 更新显示状态分组 public interface UpdateDisplayStatusGroup {} + // 为客户添加默认footbar + public interface AddDefaultFootbars4Customer {} + @NotBlank(message = "FootBar的ID不能为空", groups = { UpdateFootBarGroup.class, FootBarDetailGroup.class, UpdateDisplayStatusGroup.class }) private String id; - @NotBlank(message = "客户ID不能为空", groups = { CreateFootBarGroup.class }) + @NotBlank(message = "客户ID不能为空", groups = { CreateFootBarGroup.class, AddDefaultFootbars4Customer.class }) private String customerId; // 哪一个端:gov,resi - @NotBlank(message = "app类型不能为空", groups = { ListFootBarGroup.class, CreateFootBarGroup.class }) + @NotBlank(message = "app类型不能为空", groups = { ListFootBarGroup.class, CreateFootBarGroup.class, AddDefaultFootbars4Customer.class }) private String appType; @NotBlank(message = "名称不能为空", groups = { CreateFootBarGroup.class, UpdateFootBarGroup.class }) diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFootBarResultDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFootBarResultDTO.java index bda303ce57..0afed5aa74 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFootBarResultDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFootBarResultDTO.java @@ -100,4 +100,10 @@ public class CustomerFootBarResultDTO implements Serializable { private Boolean display; + private String defaultBarName; + + private String defaultIconPath; + + private String defaultSelectedIconPath; + } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFootBarController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFootBarController.java index aa6e0e58d2..3dae048df4 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFootBarController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFootBarController.java @@ -180,4 +180,16 @@ public class CustomerFootBarController { return new Result(); } + /** + * 为客户初始化默认的footbar + * @param form + * @return + */ + @PostMapping("initdefault4customer") + public Result initDefault4Customer(@RequestBody CustomerFootBarFormDTO form) { + ValidatorUtils.validateEntity(form, CustomerFootBarFormDTO.AddDefaultFootbars4Customer.class); + customerFootBarService.addDefault4Customer(form.getCustomerId(), form.getAppType()); + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFootBarDao.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFootBarDao.java index 01d2a2c0dc..3d8c9e6b3b 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFootBarDao.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFootBarDao.java @@ -67,5 +67,8 @@ public interface CustomerFootBarDao extends BaseDao { @Param("appType") String appType, @Param("barKey") String barKey); + List listByAppTypeAndCustomerId(@Param("customerId") String customerId, + @Param("appType") String appType); + void updateDisplayStatus(@Param("id") String id, @Param("display") Boolean display); } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFootBarService.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFootBarService.java index eb9a3288b4..938d05a979 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFootBarService.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFootBarService.java @@ -108,4 +108,6 @@ public interface CustomerFootBarService extends BaseService footBarsOfCustomer = baseDao.listByAppTypeAndCustomerId(customerId, appType); + if (!CollectionUtils.isEmpty(footBarsOfCustomer)) { + throw new RenException(EpmetErrorCode.OPER_CUSTOMER_FOOTBAR_EXISTS.getCode(), + EpmetErrorCode.OPER_CUSTOMER_FOOTBAR_EXISTS.getMsg()); + } + + List defaultBars = baseDao.listByAppTypeAndCustomerId("default", appType); + for (CustomerFootBarEntity defaultBar : defaultBars) { + defaultBar.setCustomerId(customerId); + defaultBar.setId(null); + defaultBar.setCreatedTime(null); + defaultBar.setCreatedBy(null); + defaultBar.setUpdatedTime(null); + defaultBar.setUpdatedBy(null); + baseDao.insert(defaultBar); + } + } + /** * 添加footbar之前的校验 * @param form diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFootBarDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFootBarDao.xml index 5807755285..f8bc70c1da 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFootBarDao.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFootBarDao.xml @@ -102,5 +102,27 @@ and BAR_KEY = #{barKey} + + \ No newline at end of file From 22631d5f009409330d87e86f34420150f5c06eeb Mon Sep 17 00:00:00 2001 From: wxz Date: Wed, 2 Sep 2020 12:32:36 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0footbar=EF=BC=8C=E5=90=8C=E6=AD=A5=E5=88=B0=E5=B7=B2?= =?UTF-8?q?=E7=BB=8F=E6=9C=89=E8=87=AA=E5=AE=9A=E4=B9=89footbar=E7=9A=84?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/CustomerFootBarFormDTO.java | 14 ++++----- .../controller/CustomerFootBarController.java | 2 +- .../com/epmet/dao/CustomerFootBarDao.java | 2 ++ .../impl/CustomerFootBarServiceImpl.java | 29 ++++++++++++++++++- .../resources/mapper/CustomerFootBarDao.xml | 6 ++++ 5 files changed, 44 insertions(+), 9 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CustomerFootBarFormDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CustomerFootBarFormDTO.java index d699264d4b..37674bfa8f 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CustomerFootBarFormDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CustomerFootBarFormDTO.java @@ -15,27 +15,27 @@ public class CustomerFootBarFormDTO { public interface CreateFootBarGroup extends CustomerClientShowGroup {} // 查询footbar列表分组 - public interface ListFootBarGroup {} + public interface ListFootBarGroup extends CustomerClientShowGroup {} // 更新footbar - public interface UpdateFootBarGroup {} + public interface UpdateFootBarGroup extends CustomerClientShowGroup {} // 保存顺序 - public interface SaveOrderGroup {} + public interface SaveOrderGroup extends CustomerClientShowGroup {} // 明细分组 - public interface FootBarDetailGroup {} + public interface FootBarDetailGroup extends CustomerClientShowGroup {} // 更新显示状态分组 - public interface UpdateDisplayStatusGroup {} + public interface UpdateDisplayStatusGroup extends CustomerClientShowGroup {} // 为客户添加默认footbar - public interface AddDefaultFootbars4Customer {} + public interface AddDefaultFootbars4Customer extends CustomerClientShowGroup {} @NotBlank(message = "FootBar的ID不能为空", groups = { UpdateFootBarGroup.class, FootBarDetailGroup.class, UpdateDisplayStatusGroup.class }) private String id; - @NotBlank(message = "客户ID不能为空", groups = { CreateFootBarGroup.class, AddDefaultFootbars4Customer.class }) + @NotBlank(message = "客户ID不能为空", groups = { AddDefaultFootbars4Customer.class }) private String customerId; // 哪一个端:gov,resi diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFootBarController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFootBarController.java index 3dae048df4..299298a0f0 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFootBarController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFootBarController.java @@ -121,7 +121,7 @@ public class CustomerFootBarController { } /** - * 创建footbar + * 创建footbar,只能创建默认的,不能直接为客户创建 * @param form * @return */ diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFootBarDao.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFootBarDao.java index 3d8c9e6b3b..eff4970807 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFootBarDao.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFootBarDao.java @@ -71,4 +71,6 @@ public interface CustomerFootBarDao extends BaseDao { @Param("appType") String appType); void updateDisplayStatus(@Param("id") String id, @Param("display") Boolean display); + + List listFootBarOwnerCustomerIds(); } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java index 2527adf140..b72edf0ed4 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java @@ -118,7 +118,7 @@ public class CustomerFootBarServiceImpl extends BaseServiceImpl customerIds = baseDao.listFootBarOwnerCustomerIds(); + for (String customerId : customerIds) { + CustomerFootBarEntity bar = baseDao.getByAppTypeAndBarKeyOfCustomer(customerId, entity.getAppType(), entity.getBarKey()); + if (bar == null) { + // 该客户还没有该bar + CustomerFootBarEntity newBar = new CustomerFootBarEntity(); + newBar.setCustomerId(customerId); + newBar.setIconPath(entity.getIconPath()); + newBar.setPageTitle(entity.getPageTitle()); + newBar.setBarKey(entity.getBarKey()); + newBar.setBarName(entity.getBarName()); + newBar.setSelectedIconPath(entity.getSelectedIconPath()); + newBar.setOrderIndex(baseDao.fetchNextOrder(customerId, entity.getAppType())); + newBar.setAppType(entity.getAppType()); + newBar.setDisplay(true); + baseDao.insert(newBar); + } + } } @Override diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFootBarDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFootBarDao.xml index f8bc70c1da..54dec77c47 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFootBarDao.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFootBarDao.xml @@ -124,5 +124,11 @@ and app_type = #{appType} + + \ No newline at end of file From 94b81f624fdbb397c6e6a62a34b25a2da2b3ab4b Mon Sep 17 00:00:00 2001 From: wxz Date: Wed, 2 Sep 2020 12:37:56 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E5=AE=A2=E6=88=B7=E7=9A=84footbar=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99=EF=BC=8C=E4=BF=AE=E6=94=B9bar=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E6=80=A7=E9=AA=8C=E8=AF=81=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/CustomerFootBarServiceImpl.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java index b72edf0ed4..1b732343e4 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java @@ -207,14 +207,14 @@ public class CustomerFootBarServiceImpl extends BaseServiceImpl footBarsOfCustomer = baseDao.listByAppTypeAndCustomerId(customerId, appType); - if (!CollectionUtils.isEmpty(footBarsOfCustomer)) { - throw new RenException(EpmetErrorCode.OPER_CUSTOMER_FOOTBAR_EXISTS.getCode(), - EpmetErrorCode.OPER_CUSTOMER_FOOTBAR_EXISTS.getMsg()); - } - List defaultBars = baseDao.listByAppTypeAndCustomerId("default", appType); for (CustomerFootBarEntity defaultBar : defaultBars) { + CustomerFootBarEntity bar = baseDao.getByAppTypeAndBarKeyOfCustomer(customerId, appType, defaultBar.getBarKey()); + if (bar != null) { + // 该客户已经有该bar了,不再添加 + continue; + } + defaultBar.setCustomerId(customerId); defaultBar.setId(null); defaultBar.setCreatedTime(null); From 16097c98996340fa953c552747dcc3b65e37f1e9 Mon Sep 17 00:00:00 2001 From: wxz Date: Wed, 2 Sep 2020 14:43:18 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=EF=BC=9Afootbar?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8A=9F=E8=83=BD=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=EF=BC=9Aoper=E8=BF=90=E8=90=A5=E7=AB=AF=E6=9F=A5=E8=AF=A2footb?= =?UTF-8?q?ar=E5=88=97=E8=A1=A8=E5=8A=9F=E8=83=BD=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=EF=BC=9Afootbar=E5=88=97=E8=A1=A8=E5=A2=9E=E5=8A=A0display?= =?UTF-8?q?=E6=96=B0=E5=88=97=E7=9A=84=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/CustomerFootBarFormDTO.java | 12 ++++-- .../controller/CustomerFootBarController.java | 37 ++++++++++++++++++ .../com/epmet/dao/CustomerFootBarDao.java | 5 ++- .../epmet/service/CustomerFootBarService.java | 4 ++ .../impl/CustomerFootBarServiceImpl.java | 13 ++++++- .../resources/mapper/CustomerFootBarDao.xml | 38 ++++++++++++++++--- 6 files changed, 98 insertions(+), 11 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CustomerFootBarFormDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CustomerFootBarFormDTO.java index 37674bfa8f..0533048a93 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CustomerFootBarFormDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CustomerFootBarFormDTO.java @@ -17,6 +17,9 @@ public class CustomerFootBarFormDTO { // 查询footbar列表分组 public interface ListFootBarGroup extends CustomerClientShowGroup {} + // 运营端查询footbar列表分组 + public interface ListFootBarGroup4Oper extends CustomerClientShowGroup {} + // 更新footbar public interface UpdateFootBarGroup extends CustomerClientShowGroup {} @@ -32,14 +35,17 @@ public class CustomerFootBarFormDTO { // 为客户添加默认footbar public interface AddDefaultFootbars4Customer extends CustomerClientShowGroup {} - @NotBlank(message = "FootBar的ID不能为空", groups = { UpdateFootBarGroup.class, FootBarDetailGroup.class, UpdateDisplayStatusGroup.class }) + // 删除footbar + public interface DeleteFootbarsGroup extends CustomerClientShowGroup {} + + @NotBlank(message = "FootBar的ID不能为空", groups = { UpdateFootBarGroup.class, FootBarDetailGroup.class, UpdateDisplayStatusGroup.class, DeleteFootbarsGroup.class }) private String id; - @NotBlank(message = "客户ID不能为空", groups = { AddDefaultFootbars4Customer.class }) + @NotBlank(message = "客户ID不能为空", groups = { AddDefaultFootbars4Customer.class, ListFootBarGroup4Oper.class }) private String customerId; // 哪一个端:gov,resi - @NotBlank(message = "app类型不能为空", groups = { ListFootBarGroup.class, CreateFootBarGroup.class, AddDefaultFootbars4Customer.class }) + @NotBlank(message = "app类型不能为空", groups = { ListFootBarGroup.class, CreateFootBarGroup.class, AddDefaultFootbars4Customer.class, ListFootBarGroup4Oper.class }) private String appType; @NotBlank(message = "名称不能为空", groups = { CreateFootBarGroup.class, UpdateFootBarGroup.class }) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFootBarController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFootBarController.java index 299298a0f0..5b9c7a0da8 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFootBarController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFootBarController.java @@ -120,6 +120,31 @@ public class CustomerFootBarController { return new Result>().ok(barDTOS); } + /** + * 运营端查询footbar列表 + * @param formDTO + * @return + */ + @PostMapping("customerfootbars4oper") + public Result> getCustomerfootbars4Oper(@RequestBody CustomerFootBarFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, CustomerFootBarFormDTO.ListFootBarGroup4Oper.class); + String customerId = formDTO.getCustomerId(); + String appType = formDTO.getAppType(); + + List footbars = customerFootBarService.listAllCustomerFootBars(customerId, appType); + List barDTOS = new LinkedList<>(); + footbars.forEach(barEntity -> { + CustomerFootBarEntity defaultFootBarEntity = customerFootBarService.getByAppTypeAndBarKeyOfCustomer("default", barEntity.getAppType(), barEntity.getBarKey()); + + CustomerFootBarDTO barDTO = new CustomerFootBarDTO(); + BeanUtils.copyProperties(barEntity, barDTO); + barDTO.setDefaultBarName(defaultFootBarEntity.getBarName()); + barDTOS.add(barDTO); + }); + return new Result>().ok(barDTOS); + } + + /** * 创建footbar,只能创建默认的,不能直接为客户创建 * @param form @@ -192,4 +217,16 @@ public class CustomerFootBarController { return new Result(); } + /** + * 删除footbar + * @param form + * @return + */ + @PostMapping("deletefootbar") + public Result deleteFootBar(@RequestBody CustomerFootBarFormDTO form) { + ValidatorUtils.validateEntity(form, CustomerFootBarFormDTO.DeleteFootbarsGroup.class); + customerFootBarService.deleteFootBar(form.getId()); + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFootBarDao.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFootBarDao.java index eff4970807..4c668abafe 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFootBarDao.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFootBarDao.java @@ -33,7 +33,10 @@ import java.util.List; @Mapper public interface CustomerFootBarDao extends BaseDao { - List listCustomerFootBars(@Param("customerId") String customerId, + List listDisplayCustomerFootBars(@Param("customerId") String customerId, + @Param("appType") String appType); + + List listAllCustomerFootBars(@Param("customerId") String customerId, @Param("appType") String appType); /** diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFootBarService.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFootBarService.java index 938d05a979..0ed3c9e0e5 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFootBarService.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFootBarService.java @@ -97,6 +97,8 @@ public interface CustomerFootBarService extends BaseService listCustomerFootBars(String customerId, String appType); + List listAllCustomerFootBars(String customerId, String appType); + void createFootBar(CustomerFootBarFormDTO form); void updateFootBar(CustomerFootBarFormDTO form); @@ -110,4 +112,6 @@ public interface CustomerFootBarService extends BaseService listCustomerFootBars(String customerId, String appType) { - return baseDao.listCustomerFootBars(customerId, appType); + return baseDao.listDisplayCustomerFootBars(customerId, appType); + } + + @Override + public List listAllCustomerFootBars(String customerId, String appType) { + return baseDao.listAllCustomerFootBars(customerId, appType); } @Override @@ -225,6 +229,11 @@ public class CustomerFootBarServiceImpl extends BaseServiceImpl - SELECT id, customer_id, app_type, bar_key, bar_name, - app_type, page_title, icon_path, selected_icon_path, - `order_index`, + display, + order_index, del_flag, revision, created_by, created_time, updated_by, - updated_time, - ORDER_INDEX + updated_time FROM customer_foot_bar + + DEL_FLAG = '0' + AND CUSTOMER_ID = #{customerId} + AND APP_TYPE = #{appType} + AND DISPLAY = 1 + + ORDER BY `ORDER_INDEX` ASC + + + SELECT @@ -123,7 +130,22 @@ + + \ No newline at end of file From 8d228f870bd34a1e24824e34c03b6b9904f0e22b Mon Sep 17 00:00:00 2001 From: wxz Date: Wed, 2 Sep 2020 16:52:04 +0800 Subject: [PATCH 07/11] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbarname=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/CustomerFootBarServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java index 956417476c..4a702ce088 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java @@ -252,7 +252,7 @@ public class CustomerFootBarServiceImpl extends BaseServiceImpl Date: Wed, 2 Sep 2020 16:56:00 +0800 Subject: [PATCH 08/11] =?UTF-8?q?footbar=E8=AF=A6=E6=83=85=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0"defaultPageTilte"=E7=9A=84=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/result/CustomerFootBarResultDTO.java | 2 ++ .../java/com/epmet/service/impl/CustomerFootBarServiceImpl.java | 1 + 2 files changed, 3 insertions(+) diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFootBarResultDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFootBarResultDTO.java index 0afed5aa74..c517c835ad 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFootBarResultDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFootBarResultDTO.java @@ -106,4 +106,6 @@ public class CustomerFootBarResultDTO implements Serializable { private String defaultSelectedIconPath; + private String defaultPageTitle; + } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java index 4a702ce088..7351c6222f 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java @@ -187,6 +187,7 @@ public class CustomerFootBarServiceImpl extends BaseServiceImpl Date: Wed, 2 Sep 2020 17:13:18 +0800 Subject: [PATCH 09/11] =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=BB=98=E8=AE=A4footb?= =?UTF-8?q?ar=EF=BC=8C=E8=BF=9E=E5=B8=A6=E5=88=A0=E9=99=A4=E6=89=80?= =?UTF-8?q?=E6=9C=89=E5=AE=A2=E6=88=B7=E7=9A=84footbar=EF=BC=88=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E4=B8=8A=E4=B8=8D=E7=94=A8=EF=BC=8C=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=94=A8=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dao/CustomerFootBarDao.java | 2 ++ .../com/epmet/service/impl/CustomerFootBarServiceImpl.java | 3 ++- .../src/main/resources/mapper/CustomerFootBarDao.xml | 7 +++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFootBarDao.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFootBarDao.java index 82c2aa0b55..30fac6164c 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFootBarDao.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFootBarDao.java @@ -82,4 +82,6 @@ public interface CustomerFootBarDao extends BaseDao { List listFootBarOwnerCustomerIds(); void physicsDeleteById(@Param("id") String id); + + void physicsDeleteByAppTypeAndBarKey(@Param("appType") String appType, @Param("barKey") String barKey); } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java index 7351c6222f..594674b283 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java @@ -232,7 +232,8 @@ public class CustomerFootBarServiceImpl extends BaseServiceImpl + + delete + from customer_foot_bar + where app_type = #{appType} + and BAR_KEY = #{barKey} + +