diff --git a/epmet-auth/deploy/docker-compose-dev.yml b/epmet-auth/deploy/docker-compose-dev.yml index 03a7a57ee3..8fadcbfa6d 100644 --- a/epmet-auth/deploy/docker-compose-dev.yml +++ b/epmet-auth/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-auth-server: container_name: epmet-auth-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-auth:0.3.44 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-auth:0.3.47 ports: - "8081:8081" network_mode: host # 使用现有网络 diff --git a/epmet-auth/pom.xml b/epmet-auth/pom.xml index 7c5f5d6a62..11a9728472 100644 --- a/epmet-auth/pom.xml +++ b/epmet-auth/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.44 + 0.3.47 com.epmet epmet-cloud @@ -182,6 +182,8 @@ wx3d1372029eb816a3 651f02d71ed3f123dfb584b8bf0f4d8b + diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml index de278b5785..309c6a0e83 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml +++ b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-third-server: container_name: epmet-third-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.48 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.55 ports: - "8110:8110" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-third/epmet-third-server/pom.xml b/epmet-module/epmet-third/epmet-third-server/pom.xml index 2efc3df332..cdc5473e70 100644 --- a/epmet-module/epmet-third/epmet-third-server/pom.xml +++ b/epmet-module/epmet-third/epmet-third-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.0.48 + 0.0.55 com.epmet diff --git a/epmet-module/gov-mine/gov-mine-client/src/main/java/com/epmet/dto/form/GovFootBarFormDTO.java b/epmet-module/gov-mine/gov-mine-client/src/main/java/com/epmet/dto/form/GovFootBarFormDTO.java new file mode 100644 index 0000000000..79951ec2a3 --- /dev/null +++ b/epmet-module/gov-mine/gov-mine-client/src/main/java/com/epmet/dto/form/GovFootBarFormDTO.java @@ -0,0 +1,11 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +@Data +public class GovFootBarFormDTO { + //@NotBlank(message = "客户ID不能为空") + private String customerId; +} \ No newline at end of file diff --git a/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-dev.yml b/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-dev.yml index f1539c2d78..cb7563abee 100644 --- a/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-mine-server: container_name: gov-mine-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-mine-server:0.3.32 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-mine-server:0.3.33 ports: - "8098:8098" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-mine/gov-mine-server/pom.xml b/epmet-module/gov-mine/gov-mine-server/pom.xml index 53ce3a23bc..7a38a7a7e5 100644 --- a/epmet-module/gov-mine/gov-mine-server/pom.xml +++ b/epmet-module/gov-mine/gov-mine-server/pom.xml @@ -2,7 +2,7 @@ - 0.3.32 + 0.3.33 com.epmet gov-mine diff --git a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/controller/AppController.java b/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/controller/AppController.java index 93fef03372..d1ab11b618 100644 --- a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/controller/AppController.java +++ b/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/controller/AppController.java @@ -1,9 +1,11 @@ package com.epmet.controller; +import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.CustomerFootBarDTO; import com.epmet.dto.form.CustomerFootBarFormDTO; -import com.epmet.feign.OperCustomizeFeignClient; +import com.epmet.dto.form.GovFootBarFormDTO; +import com.epmet.feign.OperCustomizeOpenFeignClient; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.PostMapping; @@ -18,19 +20,21 @@ import java.util.List; public class AppController { @Autowired - private OperCustomizeFeignClient operCustomizeFeign; + private OperCustomizeOpenFeignClient operCustomizeFeign; /** * 查询 - * @param formDTO * @return */ @PostMapping("getcustomerfootbars") - public Result> getCustomerFootBars(@RequestBody CustomerFootBarFormDTO formDTO) { - Result> result = operCustomizeFeign.getCustomerfootbars(formDTO); + public Result> getCustomerFootBars(@RequestBody GovFootBarFormDTO input) { + CustomerFootBarFormDTO form = new CustomerFootBarFormDTO(); + form.setCustomerId(input.getCustomerId()); + form.setAppType(AppClientConstant.APP_GOV); + Result> result = operCustomizeFeign.getCustomerfootbars(form); if (CollectionUtils.isEmpty(result.getData())) { - formDTO.setCustomerId("default"); - result = operCustomizeFeign.getCustomerfootbars(formDTO); + form.setCustomerId("default"); + result = operCustomizeFeign.getCustomerfootbars(form); } return result; } diff --git a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/OperCustomizeFeignClient.java b/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/OperCustomizeFeignClient.java deleted file mode 100644 index a645d0d44b..0000000000 --- a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/OperCustomizeFeignClient.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.epmet.feign; - -import com.epmet.commons.tools.constant.ServiceConstant; -import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.CustomerFootBarDTO; -import com.epmet.dto.form.CustomerFootBarFormDTO; -import com.epmet.feign.fallback.OperCustomizeFeignClientFallBack; -import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.http.MediaType; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; - -import java.util.List; - -@FeignClient(name = ServiceConstant.OPER_CUSTOMIZE_SERVER, fallback = OperCustomizeFeignClientFallBack.class) -public interface OperCustomizeFeignClient { - - @PostMapping(value = "/oper/customize/customerfootbar/customerfootbars", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) - Result> getCustomerfootbars(@RequestBody CustomerFootBarFormDTO formDTO); - -} diff --git a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/fallback/OperCustomizeFeignClientFallBack.java b/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/fallback/OperCustomizeFeignClientFallBack.java deleted file mode 100644 index 6f343f3857..0000000000 --- a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/fallback/OperCustomizeFeignClientFallBack.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.epmet.feign.fallback; - -import com.epmet.commons.tools.constant.ServiceConstant; -import com.epmet.commons.tools.utils.ModuleUtils; -import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.CustomerFootBarDTO; -import com.epmet.dto.form.CustomerFootBarFormDTO; -import com.epmet.dto.form.CustomerHomeFormDTO; -import com.epmet.dto.result.HomeDesignByCustomerResultDTO; -import com.epmet.feign.OperCustomizeFeignClient; -import org.springframework.stereotype.Component; - -import java.util.List; - -@Component -public class OperCustomizeFeignClientFallBack implements OperCustomizeFeignClient { - - @Override - public Result> getCustomerfootbars(CustomerFootBarFormDTO formDTO) { - return ModuleUtils.feignConError(ServiceConstant.OPER_CUSTOMIZE_SERVER, "getCustomerfootbars",formDTO); - } -} diff --git a/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-dev.yml b/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-dev.yml index 1c4f6845ca..c401ef7909 100644 --- a/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-dev.yml +++ b/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: oper-crm-server: container_name: oper-crm-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/oper-crm-server:0.3.28 + image: 192.168.1.130:10080/epmet-cloud-dev/oper-crm-server:0.3.30 ports: - "8090:8090" network_mode: host # 使用现有网络 diff --git a/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-test.yml b/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-test.yml index ddaa785107..ef1e3d8974 100644 --- a/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-test.yml +++ b/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: oper-crm-server: container_name: oper-crm-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/oper-crm-server:0.3.25 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/oper-crm-server:0.3.29 ports: - "8090:8090" network_mode: host # 使用现有网络 diff --git a/epmet-module/oper-crm/oper-crm-server/pom.xml b/epmet-module/oper-crm/oper-crm-server/pom.xml index d1eaf5367f..6f9b5a7942 100644 --- a/epmet-module/oper-crm/oper-crm-server/pom.xml +++ b/epmet-module/oper-crm/oper-crm-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.28 + 0.3.30 com.epmet oper-crm diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java index c8c17dcfad..508f0ba09b 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java @@ -197,7 +197,7 @@ public class CustomerController { /** * - * 添加管理员 + * 添加根管理员(不能被取消角色的管理员) * @param form * @return */ diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java index 2dc57cd47f..238a90a94a 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java @@ -158,7 +158,7 @@ public class CustomerServiceImpl extends BaseServiceImpl>> managersResult = epmetUserFeignClient.getStaffsInRoleOfOrgs(staffRoleFormDTO); if (managersResult.success()) { Map> rootAgencyManagerMap = managersResult.getData(); @@ -250,7 +250,8 @@ public class CustomerServiceImpl extends BaseServiceImpl getRoleResult = epmetUserFeignClient.getRoleOfCustomer(customerRoleForm); if (!getRoleResult.success()) { log.error("查询客户具有指定RoleKey的角色信息失败:".concat(getRoleResult.toString())); 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 73b4c7b500..1d5218fd4b 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 @@ -10,4 +10,8 @@ public class CustomerFootBarFormDTO { //@NotBlank(message = "客户ID不能为空") private String customerId; + // 哪一个端:gov,resi + @NotBlank(message = "app类型不能为空") + private String appType; + } diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/OperCustomizeOpenFeignClient.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/OperCustomizeOpenFeignClient.java index 9e81857ef7..de1c9c2f83 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/OperCustomizeOpenFeignClient.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/OperCustomizeOpenFeignClient.java @@ -1,9 +1,17 @@ package com.epmet.feign; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.CustomerFootBarDTO; +import com.epmet.dto.form.CustomerFootBarFormDTO; import org.springframework.cloud.openfeign.FeignClient; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.feign.fallback.OperCustomizeOpenFeignClientFallback; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +import java.util.List; /** * 本服务对外开放的API,其他服务通过引用此client调用该服务 @@ -14,4 +22,7 @@ import com.epmet.feign.fallback.OperCustomizeOpenFeignClientFallback; @FeignClient(name = ServiceConstant.OPER_CUSTOMIZE_SERVER, fallback = OperCustomizeOpenFeignClientFallback.class) public interface OperCustomizeOpenFeignClient { + @PostMapping(value = "/oper/customize/customerfootbar/customerfootbars", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) + Result> getCustomerfootbars(@RequestBody CustomerFootBarFormDTO formDTO); + } diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/fallback/OperCustomizeOpenFeignClientFallback.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/fallback/OperCustomizeOpenFeignClientFallback.java index 7b912afc73..0659ab1725 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/fallback/OperCustomizeOpenFeignClientFallback.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/fallback/OperCustomizeOpenFeignClientFallback.java @@ -1,8 +1,15 @@ package com.epmet.feign.fallback; +import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.utils.ModuleUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.CustomerFootBarDTO; +import com.epmet.dto.form.CustomerFootBarFormDTO; import com.epmet.feign.OperCustomizeOpenFeignClient; import org.springframework.stereotype.Component; +import java.util.List; + /** * 本服务对外开放的API,其他服务通过引用此client调用该服务 * @@ -11,4 +18,8 @@ import org.springframework.stereotype.Component; */ @Component public class OperCustomizeOpenFeignClientFallback implements OperCustomizeOpenFeignClient { + @Override + public Result> getCustomerfootbars(CustomerFootBarFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.OPER_CUSTOMIZE_SERVER, "getCustomerfootbars", formDTO); + } } diff --git a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml index 3ddc8108ca..859970bc4c 100644 --- a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml +++ b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: oper-customize-server: container_name: oper-customize-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.23 + image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.24 ports: - "8089:8089" network_mode: host # 使用现有网络 diff --git a/epmet-module/oper-customize/oper-customize-server/pom.xml b/epmet-module/oper-customize/oper-customize-server/pom.xml index 47611b8c4a..73c01696fa 100644 --- a/epmet-module/oper-customize/oper-customize-server/pom.xml +++ b/epmet-module/oper-customize/oper-customize-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.23 + 0.3.24 com.epmet oper-customize 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 895cbf6840..1be0943b60 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 @@ -35,6 +35,7 @@ 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; @@ -104,8 +105,9 @@ public class CustomerFootBarController { public Result> getCustomerfootbars(@RequestBody CustomerFootBarFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO); String customerId = formDTO.getCustomerId(); + String appType = formDTO.getAppType(); - List footbars = customerFootBarService.listCustomerFootBars(customerId); + List footbars = customerFootBarService.listCustomerFootBars(customerId, appType); List barDTOS = new LinkedList<>(); footbars.forEach(barEntity -> { CustomerFootBarDTO barDTO = new CustomerFootBarDTO(); 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 f22bc917ad..480e148b60 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,5 +33,6 @@ import java.util.List; @Mapper public interface CustomerFootBarDao extends BaseDao { - List listCustomerFootBars(@Param("customerId") String customerId); + List listCustomerFootBars(@Param("customerId") String customerId, + @Param("appType") String appType); } \ 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 8bfc92afb1..2161fc4bdc 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 @@ -48,6 +48,8 @@ public class CustomerFootBarEntity extends BaseEpmetEntity { */ private String barKey; + private String appType; + /** * 页面标题 */ @@ -63,4 +65,6 @@ public class CustomerFootBarEntity extends BaseEpmetEntity { */ private String selectedIconPath; + private Integer order; + } 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 f3a793793d..f38eab950d 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 @@ -93,5 +93,5 @@ public interface CustomerFootBarService extends BaseService listCustomerFootBars(String customerId); + List listCustomerFootBars(String customerId, String appType); } \ 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 15336d92fc..417555be13 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 @@ -102,8 +102,8 @@ public class CustomerFootBarServiceImpl extends BaseServiceImpl listCustomerFootBars(String customerId) { - return baseDao.listCustomerFootBars(customerId); + public List listCustomerFootBars(String customerId, String appType) { + return baseDao.listCustomerFootBars(customerId, appType); } } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.2__add_footbar_columns.sql b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.2__add_footbar_columns.sql new file mode 100644 index 0000000000..dc5ac2da3f --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.2__add_footbar_columns.sql @@ -0,0 +1,11 @@ +alter table customer_foot_bar add column `app_type` varchar(20) not null after `CUSTOMER_ID`; +alter table customer_foot_bar add column `order` int(2) not null after `SELECTED_ICON_PATH`; + +update customer_foot_bar set `app_type`='gov' , `order`=1 where CUSTOMER_ID='default' and BAR_KEY='work'; +update customer_foot_bar set `app_type`='gov' , `order`=2 where CUSTOMER_ID='default' and BAR_KEY='org'; +update customer_foot_bar set `app_type`='gov' , `order`=3 where CUSTOMER_ID='default' and BAR_KEY='data'; +update customer_foot_bar set `app_type`='gov' , `order`=4 where CUSTOMER_ID='default' and BAR_KEY='find'; + +INSERT INTO epmet_oper_customize.customer_foot_bar (ID, CUSTOMER_ID, app_type, BAR_KEY, BAR_NAME, PAGE_TITLE, ICON_PATH, SELECTED_ICON_PATH, `order`, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME) VALUES (uuid(), 'default', 'resi', 'garden', '党建园地', '党建园地', null, null, 1, 0, 0, 'APP_USER', now(), 'APP_USER', now()); +INSERT INTO epmet_oper_customize.customer_foot_bar (ID, CUSTOMER_ID, app_type, BAR_KEY, BAR_NAME, PAGE_TITLE, ICON_PATH, SELECTED_ICON_PATH, `order`, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME) VALUES (uuid(), 'default', 'resi', 'issue', '党群议事', '党群议事', null, null, 2, 0, 0, 'APP_USER', now(), 'APP_USER', now()); +INSERT INTO epmet_oper_customize.customer_foot_bar (ID, CUSTOMER_ID, app_type, BAR_KEY, BAR_NAME, PAGE_TITLE, ICON_PATH, SELECTED_ICON_PATH, `order`, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME) VALUES (uuid(), 'default', 'resi', 'group', '楼院小组', '楼院小组', null, null, 3, 0, 0, 'APP_USER', now(), 'APP_USER', now()); 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 a11df38ba6..e41b42ddb3 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 @@ -7,9 +7,11 @@ + + @@ -21,13 +23,31 @@ diff --git a/epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/from/ResiFootBarFormDTO.java b/epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/from/ResiFootBarFormDTO.java new file mode 100644 index 0000000000..b29c4099d7 --- /dev/null +++ b/epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/from/ResiFootBarFormDTO.java @@ -0,0 +1,10 @@ +package com.epmet.resi.mine.dto.from; + +import lombok.Data; + +@Data +public class ResiFootBarFormDTO { + + private String customerId; + +} diff --git a/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-dev.yml b/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-dev.yml index 8e4d0f9d56..7863b22fa0 100644 --- a/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-dev.yml +++ b/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: resi-mine-server: container_name: resi-mine-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/resi-mine-server:0.3.29 + image: 192.168.1.130:10080/epmet-cloud-dev/resi-mine-server:0.3.30 ports: - "8094:8094" network_mode: host # 使用现有网络 diff --git a/epmet-module/resi-mine/resi-mine-server/pom.xml b/epmet-module/resi-mine/resi-mine-server/pom.xml index 37e10716a0..73700bf6ec 100644 --- a/epmet-module/resi-mine/resi-mine-server/pom.xml +++ b/epmet-module/resi-mine/resi-mine-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.29 + 0.3.30 com.epmet resi-mine @@ -83,6 +83,13 @@ 2.0.0 compile + + + com.epmet + oper-customize-client + 2.0.0 + compile + diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/app/controller/AppController.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/app/controller/AppController.java new file mode 100644 index 0000000000..a446f0dc1b --- /dev/null +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/app/controller/AppController.java @@ -0,0 +1,39 @@ +package com.epmet.modules.app.controller; + +import com.epmet.commons.tools.constant.AppClientConstant; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.CustomerFootBarDTO; +import com.epmet.dto.form.CustomerFootBarFormDTO; +import com.epmet.feign.OperCustomizeOpenFeignClient; +import com.epmet.resi.mine.dto.from.ResiFootBarFormDTO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +@RestController +@RequestMapping("app") +public class AppController { + + @Autowired + private OperCustomizeOpenFeignClient operCustomizeFeign; + + @PostMapping("footbar") + public Result getResiFootBars(@RequestBody ResiFootBarFormDTO input) { + CustomerFootBarFormDTO form = new CustomerFootBarFormDTO(); + form.setCustomerId(input.getCustomerId()); + form.setAppType(AppClientConstant.APP_RESI); + Result> result = operCustomizeFeign.getCustomerfootbars(form); + if (CollectionUtils.isEmpty(result.getData())) { + form.setCustomerId("default"); + result = operCustomizeFeign.getCustomerfootbars(form); + } + return result; + + } + +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/constant/RoleKeyConstants.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/constant/RoleKeyConstants.java index 4d82df0d1f..3a8361be2c 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/constant/RoleKeyConstants.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/constant/RoleKeyConstants.java @@ -9,6 +9,11 @@ public class RoleKeyConstants { */ public static final String ROLE_KEY_MANAGER = "manager"; + /** + * 根管理员(不能通过工作端取消的角色,且不会再工作端显示) + */ + public static final String ROLE_KEY_ROOT_MANAGER = "root_manager"; + /** * 党建负责人 */ diff --git a/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml b/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml index a16884cdcd..f6cc6fc0ea 100644 --- a/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml +++ b/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-user-server: container_name: epmet-user-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.77 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.79 ports: - "8087:8087" network_mode: host # 不会创建新的网络 diff --git a/epmet-user/epmet-user-server/deploy/docker-compose-test.yml b/epmet-user/epmet-user-server/deploy/docker-compose-test.yml index 0cc2683457..c0efd1fb64 100644 --- a/epmet-user/epmet-user-server/deploy/docker-compose-test.yml +++ b/epmet-user/epmet-user-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-user-server: container_name: epmet-user-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-user-server:0.3.75 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-user-server:0.3.79 ports: - "8087:8087" network_mode: host # 不会创建新的网络 diff --git a/epmet-user/epmet-user-server/pom.xml b/epmet-user/epmet-user-server/pom.xml index 9ec79e461e..bf248b8b05 100644 --- a/epmet-user/epmet-user-server/pom.xml +++ b/epmet-user/epmet-user-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.77 + 0.3.79 com.epmet epmet-user diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java index 5cf2cd03b7..6de16bc4f8 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java @@ -98,4 +98,6 @@ public interface StaffRoleDao extends BaseDao { * @return java.util.List */ List selectStaffRoles(@Param("staffId") String staffId); + + List listStaffRoleEntytiesByStaffIdAndOrgId(@Param("agencyId") String agencyId, @Param("staffId") String staffId); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffRoleService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffRoleService.java index f3913d588b..e6c238a53f 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffRoleService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffRoleService.java @@ -148,4 +148,6 @@ public interface StaffRoleService extends BaseService { * @return java.util.List */ List getStaffRoles(String staffId); + + List getStaffRoleEntytiesByStaffIdAndOrgId(String agencyId, String staffId); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java index a0f3aab8e2..6be1620f68 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java @@ -31,6 +31,7 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.CpUserDetailRedis; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.CustomerStaffConstant; +import com.epmet.constant.RoleKeyConstants; import com.epmet.constant.UserConstant; import com.epmet.constant.UserRoleConstant; import com.epmet.dao.CustomerStaffDao; @@ -55,6 +56,7 @@ import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; import java.util.ArrayList; import java.util.Arrays; @@ -244,14 +246,17 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl roleList = govStaffRoleService.getGovStaffRoleList(govStaffRoleDTO); //获取工作人员角色 List staffRoles = govStaffRoleService.listRolesByStaffId(fromDTO.getStaffId(), fromDTO.getAgencyId()); - List staffRoleList = roleList.stream().map(p -> { - StaffRoleResultDTO staffRoleResultDTO = new StaffRoleResultDTO(); - staffRoleResultDTO.setRoleId(p.getId()); - staffRoleResultDTO.setRoleName(p.getRoleName()); - staffRoleResultDTO.setFullTimeOnly(p.getFullTimeOnly()); - staffRoleResultDTO.setSelected(false); - return staffRoleResultDTO; - }).collect(Collectors.toList()); + List staffRoleList = roleList + .stream() + .filter(p -> !RoleKeyConstants.ROLE_KEY_ROOT_MANAGER.equals(p.getRoleKey())) + .map(p -> { + StaffRoleResultDTO staffRoleResultDTO = new StaffRoleResultDTO(); + staffRoleResultDTO.setRoleId(p.getId()); + staffRoleResultDTO.setRoleName(p.getRoleName()); + staffRoleResultDTO.setFullTimeOnly(p.getFullTimeOnly()); + staffRoleResultDTO.setSelected(false); + return staffRoleResultDTO; + }).collect(Collectors.toList()); staffRoleList.forEach(role -> staffRoles.forEach(staffRole -> { if (role.getRoleId().equals(staffRole.getId())) { @@ -337,11 +342,18 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl staffRoleEntytiesByStaffIdAndOrgId = staffRoleService.getStaffRoleEntytiesByStaffIdAndOrgId(fromDTO.getAgencyId(), fromDTO.getStaffId()); + List roleIds = new ArrayList<>(); + if (!CollectionUtils.isEmpty(staffRoleEntytiesByStaffIdAndOrgId)) { + roleIds = staffRoleEntytiesByStaffIdAndOrgId.stream().map(sr -> sr.getRoleId()).collect(Collectors.toList()); + } + // redis缓存角色修改 UpdateCachedRolesFormDTO updateRolesForm = new UpdateCachedRolesFormDTO(); updateRolesForm.setOrgId(fromDTO.getAgencyId()); updateRolesForm.setStaffId(fromDTO.getStaffId()); - updateRolesForm.setRoleIds(fromDTO.getRoles()); + updateRolesForm.setRoleIds(roleIds); try { Result result = authFeignClient.updateCachedRoles(updateRolesForm); if (!result.success()) { diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffRoleServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffRoleServiceImpl.java index 38a4924eef..231ab010ea 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffRoleServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffRoleServiceImpl.java @@ -19,7 +19,6 @@ 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.annotation.DataFilter; import com.epmet.commons.mybatis.entity.DataScope; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; @@ -36,9 +35,7 @@ import com.epmet.dto.form.RolesUsersListFormDTO; import com.epmet.dto.result.CustomerStaffRoleResultDTO; import com.epmet.dto.result.CustomerStaffRoleListResultDTO; import com.epmet.dto.result.GovStaffRoleResultDTO; -import com.epmet.dto.result.GovStaffRoleTemplateDTO; import com.epmet.dto.result.StaffRolesResultDTO; -import com.epmet.entity.GovStaffRoleEntity; import com.epmet.entity.StaffRoleEntity; import com.epmet.redis.StaffRoleRedis; import com.epmet.service.StaffRoleService; @@ -180,4 +177,9 @@ public class StaffRoleServiceImpl extends BaseServiceImpl getStaffRoleEntytiesByStaffIdAndOrgId(String agencyId, String staffId) { + return baseDao.listStaffRoleEntytiesByStaffIdAndOrgId(agencyId, staffId); + } + } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.4__add_rootmanager.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.4__add_rootmanager.sql new file mode 100644 index 0000000000..31f2f20fdb --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.4__add_rootmanager.sql @@ -0,0 +1 @@ +INSERT INTO epmet_user.gov_staff_role_template (ID, ROLE_KEY, ROLE_NAME, ORG_TYPE, FULL_TIME_ONLY, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME) VALUES (uuid(), 'root_manager', '根管理员', 'agency', 1, 0, 0, 'APP_USER', now(), 'APP_USER', now()); \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/StaffRoleDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/StaffRoleDao.xml index 94ae4b700d..b02425c697 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/StaffRoleDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/StaffRoleDao.xml @@ -17,11 +17,11 @@ update - staff_role - set DEL_FLAG = '1' - where STAFF_ID = #{staffId} - and ORG_ID = #{orgId} - and DEL_FLAG = '0' + staff_role sr inner join gov_staff_role gsr on (sr.ROLE_ID = gsr.ID and gsr.ROLE_KEY != 'root_manager') + set sr.DEL_FLAG = '1' + where sr.STAFF_ID = #{staffId} + and sr.ORG_ID = #{orgId} + and sr.DEL_FLAG = '0' @@ -156,4 +156,12 @@ AND gsr.del_flag = '0' AND sr.staff_id = #{staffId} + + \ No newline at end of file