Browse Source

Merge branch 'dev_temp' of http://git.elinkit.com.cn:7070/r/epmet-cloud into dev_plugins

dev_shibei_match
wangchao 5 years ago
parent
commit
7a0246de40
  1. 10
      epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/annotation/DataSource.java
  2. 42
      epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/aspect/DataSourceAspect.java
  3. 12
      epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/bean/DataSourceParam.java
  4. 2
      epmet-commons/epmet-commons-extapp-auth/src/main/java/com/epmet/commons/extappauth/aspect/ExternalAppRequestAuthAspect.java
  5. 4
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
  6. 25
      epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/ExternalAppFormDTO.java
  7. 23
      epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/ExternalCustomerFormDTO.java
  8. 29
      epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/result/ExternalAppResultDTO.java
  9. 2
      epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/result/ExternalCustomerResultDTO.java
  10. 2
      epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-dev.yml
  11. 2
      epmet-module/epmet-common-service/common-service-server/pom.xml
  12. 54
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ExternalAppController.java
  13. 44
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ExternalCustomerController.java
  14. 11
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/ExternalAppDao.java
  15. 15
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/ExternalCustomerDao.java
  16. 1
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/ExternalAppAuthService.java
  17. 8
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/ExternalAppService.java
  18. 9
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/ExternalCustomerService.java
  19. 8
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalAppAuthServiceImpl.java
  20. 100
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalAppServiceImpl.java
  21. 44
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalCustomerServiceImpl.java
  22. 45
      epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/ExternalAppDao.xml
  23. 18
      epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/ExternalCustomerDao.xml
  24. 2
      epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-dev.yml
  25. 2
      epmet-module/epmet-ext/epmet-ext-server/pom.xml
  26. 2
      epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml
  27. 2
      epmet-module/gov-org/gov-org-server/pom.xml
  28. 4
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/WebviewDomainFormDTO.java
  29. 7
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/FunctionCustomizedDetailResultDTO.java
  30. 2
      epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml
  31. 2
      epmet-module/oper-customize/oper-customize-server/pom.xml
  32. 19
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/FunctionController.java
  33. 8
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/FunctionService.java
  34. 12
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java
  35. 24
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/FunctionCustomizedServiceImpl.java
  36. 42
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/FunctionServiceImpl.java
  37. 5
      epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.5__add_del_flag.sql
  38. 3
      epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/FunctionCustomizedDao.xml
  39. 2
      epmet-user/epmet-user-server/deploy/docker-compose-dev.yml
  40. 2
      epmet-user/epmet-user-server/pom.xml

10
epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/annotation/DataSource.java

@ -21,5 +21,15 @@ import java.lang.annotation.*;
@Documented
@Inherited
public @interface DataSource {
/**
* 直接指定数据源名称
* @return
*/
String value() default "";
/**
* 是否从参数中获取数据源名称优先级高于value
* @return
*/
boolean datasourceNameFromArg() default false;
}

42
epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/aspect/DataSourceAspect.java

@ -9,7 +9,9 @@
package com.epmet.commons.dynamic.datasource.aspect;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.dynamic.datasource.bean.DataSourceParam;
import com.epmet.commons.dynamic.datasource.config.DynamicContextHolder;
import org.apache.commons.lang3.StringUtils;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
@ -22,6 +24,7 @@ import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import java.lang.reflect.Method;
import java.lang.reflect.Parameter;
/**
* 多数据源切面处理类
@ -52,9 +55,9 @@ public class DataSourceAspect {
if(targetDataSource != null || methodDataSource != null){
String value;
if(methodDataSource != null){
value = methodDataSource.value();
value = getDatasourceName(methodDataSource, signature.getMethod().getParameters(), point.getArgs());
}else {
value = targetDataSource.value();
value = getDatasourceName(targetDataSource, signature.getMethod().getParameters(), point.getArgs());
}
DynamicContextHolder.push(value);
@ -68,4 +71,39 @@ public class DataSourceAspect {
logger.debug("clean datasource");
}
}
/**
* 获取要用到的数据源名称
* @param dataSource
* @return
*/
public String getDatasourceName(DataSource dataSource, Parameter[] methodParameters, Object[] methodArgValues) {
if (dataSource.datasourceNameFromArg()) {
// 1.从参数中动态获取数据源名称
String datasourceNameFromParam = getDatasourceNameFromArg(methodParameters, methodArgValues);
if (StringUtils.isNotBlank(datasourceNameFromParam)) {
// 如果有DatasourceParam类型的参数并且设置了datasourceName值,那么返回这个值,否则使用硬编码的
return datasourceNameFromParam;
}
}
// 2.硬编码指定数据源名称
return dataSource.value();
}
/**
* 从参数中取数据源名称
* @param parameters
* @param argsObject
* @return
*/
public String getDatasourceNameFromArg(Parameter[] parameters, Object[] argsObject) {
for (int i = 0; i < parameters.length; i++) {
if (parameters[i].getType() == DataSourceParam.class) {
DataSourceParam param = (DataSourceParam) argsObject[i];
return param.getDatasourceName();
}
}
return null;
}
}

12
epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/bean/DataSourceParam.java

@ -0,0 +1,12 @@
package com.epmet.commons.dynamic.datasource.bean;
import lombok.AllArgsConstructor;
import lombok.Data;
@Data
@AllArgsConstructor
public class DataSourceParam {
private String datasourceName;
}

2
epmet-commons/epmet-commons-extapp-auth/src/main/java/com/epmet/commons/extappauth/aspect/ExternalAppRequestAuthAspect.java

@ -64,7 +64,7 @@ public class ExternalAppRequestAuthAspect {
form.setToken(token);
Result<ExternalAppAuthResultDTO> result = commonServiceOpenFeignClient.externalAppAuth(form);
if (result == null) {
throw new RenException("调用external鉴权服务,返回null");
throw new RenException("调用服务进行外部应用认证,返回null");
}
if (!result.success()) {
throw new RenException(result.getInternalMsg());

4
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java

@ -101,7 +101,9 @@ public enum EpmetErrorCode {
OPER_ADD_CUSTOMER_MANAGER_ERROR(8706, "新增客户管理员失败"),
OPER_UPLOAD_FILE_OVER_SIZE(8707, "文件体积过大"),
OPER_UPLOAD_FILE_TYPE_ERROR(8708, "文件类型错误"),
OPER_EXTERNAL_APP_AUTH_ERROR(8709, "外部应用鉴权失败"),
OPER_EXTERNAL_APP_AUTH_ERROR(8709, "外部应用认证失败"),
OPER_EXTERNAL_CUSTOMER_NOT_EXISTS(8710, "该客户不存在"),
OPER_EXTERNAL_APP_EXISTS(8711, "应用已存在"),
// 党建声音 前端提示 88段
DRAFT_CONTENT_IS_NULL(8801, "至少需要添加一个段落"),

25
epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/ExternalAppFormDTO.java

@ -0,0 +1,25 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
@Data
public class ExternalAppFormDTO {
public interface AddExternalApp {}
public interface UpdateExternalApp {}
@NotBlank(message = "缺少应用ID", groups = { UpdateExternalApp.class })
private String appId;
@NotBlank(message = "缺少应用名称", groups = { AddExternalApp.class, UpdateExternalApp.class })
private String appName;
@NotBlank(message = "缺少所属客户ID", groups = { AddExternalApp.class, UpdateExternalApp.class })
private String customerId;
private Integer pageNo = 1;
private Integer pageSize = 10;
}

23
epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/ExternalCustomerFormDTO.java

@ -3,13 +3,28 @@ package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
@Data
public class ExternalCustomerFormDTO {
@Min(0)
private Integer pageNo;
public interface ListExternalCustomerGroup {}
public interface AddExternalCustomerGroup {}
public interface UpdateExternalCustomerGroup {}
@Min(0)
private Integer pageSize;
@NotBlank(message = "缺少客户ID参数", groups = { UpdateExternalCustomerGroup.class })
private String customerId;
/**
* 客户名称
*/
@NotBlank(message = "请填写客户名称", groups = { AddExternalCustomerGroup.class, UpdateExternalCustomerGroup.class })
private String customerName;
@Min(value = 0, groups = { ListExternalCustomerGroup.class })
private Integer pageNo = 1;
@Min(value = 0, groups = { ListExternalCustomerGroup.class })
private Integer pageSize = 10;
}

29
epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/result/ExternalAppResultDTO.java

@ -0,0 +1,29 @@
package com.epmet.dto.result;
import lombok.Data;
@Data
public class ExternalAppResultDTO {
public String appId;
/**
* APP名字
*/
private String appName;
/**
* 客户ID
*/
private String customerId;
/**
* 客户名称
*/
private String customerName;
/**
* 秘钥
*/
private String secret;
}

2
epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/result/ExternalCustomerResultDTO.java

@ -36,7 +36,7 @@ public class ExternalCustomerResultDTO implements Serializable {
/**
* 客户ID
*/
private String id;
private String customerId;
/**
* 客户名称

2
epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
common-service-server:
container_name: common-service-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/common-service-server:0.3.13
image: 192.168.1.130:10080/epmet-cloud-dev/common-service-server:0.3.16
ports:
- "8103:8103"
network_mode: host # 使用现有网络

2
epmet-module/epmet-common-service/common-service-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.13</version>
<version>0.3.16</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-common-service</artifactId>

54
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ExternalAppController.java

@ -1,10 +1,15 @@
package com.epmet.controller;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.ExternalAppAuthFormDTO;
import com.epmet.dto.form.ExternalAppFormDTO;
import com.epmet.dto.result.ExternalAppAuthResultDTO;
import com.epmet.dto.result.ExternalAppResultDTO;
import com.epmet.service.ExternalAppAuthService;
import com.epmet.service.ExternalAppService;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -23,6 +28,9 @@ public class ExternalAppController {
@Autowired
private ExternalAppAuthService externalAppAuthService;
@Autowired
private ExternalAppService externalAppService;
/**
* 外部请求认证
* @param formDTO
@ -41,4 +49,50 @@ public class ExternalAppController {
return new Result<ExternalAppAuthResultDTO>().ok(auth);
}
/**
* 添加应用
* @param formDTO
* @return
*/
@PostMapping("/add")
public Result<ExternalAppResultDTO> add(@RequestBody ExternalAppFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, ExternalAppFormDTO.AddExternalApp.class);
String appName = formDTO.getAppName();
String customerId = formDTO.getCustomerId();
ExternalAppResultDTO dto = externalAppService.add(appName, customerId);
return new Result<ExternalAppResultDTO>().ok(dto);
}
/**
* 修改应用
* @param formDTO
* @return
*/
@PostMapping("/update")
public Result<ExternalAppResultDTO> update(@RequestBody ExternalAppFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, ExternalAppFormDTO.UpdateExternalApp.class);
String appId = formDTO.getAppId();
String appName = formDTO.getAppName();
String customerId = formDTO.getCustomerId();
ExternalAppResultDTO dto = externalAppService.updateById(appId, appName, customerId);
return new Result<ExternalAppResultDTO>().ok(dto);
}
/**
* 查询列表
* @param formDTO
* @return
*/
@PostMapping("/list")
public Result<PageData<ExternalAppResultDTO>> list(@RequestBody ExternalAppFormDTO formDTO) {
PageData<ExternalAppResultDTO> page = externalAppService.listPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getCustomerId());
return new Result<PageData<ExternalAppResultDTO>>().ok(page);
}
}

44
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ExternalCustomerController.java

@ -1,13 +1,11 @@
package com.epmet.controller;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.ExternalAppAuthFormDTO;
import com.epmet.dto.form.ExternalCustomerFormDTO;
import com.epmet.dto.result.ExternalAppAuthResultDTO;
import com.epmet.service.ExternalAppAuthService;
import org.apache.commons.lang3.StringUtils;
import com.epmet.dto.result.ExternalCustomerResultDTO;
import com.epmet.service.ExternalCustomerService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -16,8 +14,6 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.constraints.Min;
/**
* 外部客户管理
*/
@ -28,20 +24,46 @@ public class ExternalCustomerController {
private static Logger logger = LoggerFactory.getLogger(ExternalCustomerController.class);
@Autowired
private ExternalAppAuthService externalAppAuthService;
private ExternalCustomerService externalCustomerService;
/**
* 外部客户管理
* @return
*/
@PostMapping("/list")
public Result<ExternalAppAuthResultDTO> list(@RequestBody ExternalCustomerFormDTO form) {
ValidatorUtils.validateEntity(form);
public Result<PageData<ExternalCustomerResultDTO>> list(@RequestBody ExternalCustomerFormDTO form) {
ValidatorUtils.validateEntity(form, ExternalCustomerFormDTO.ListExternalCustomerGroup.class);
Integer pageNo = form.getPageNo();
Integer pageSize = form.getPageSize();
PageData<ExternalCustomerResultDTO> page = externalCustomerService.listPage(pageNo, pageSize);
return new Result<PageData<ExternalCustomerResultDTO>>().ok(page);
}
/**
* 添加外部客户
* @param formDTO
* @return
*/
@PostMapping("add")
public Result<ExternalCustomerResultDTO> add(@RequestBody ExternalCustomerFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, ExternalCustomerFormDTO.AddExternalCustomerGroup.class);
String customerName = formDTO.getCustomerName();
ExternalCustomerResultDTO result = externalCustomerService.add(customerName);
return new Result<ExternalCustomerResultDTO>().ok(result);
}
return null;
/**
* 更新客户信息
* @param formDTO
* @return
*/
@PostMapping("update")
public Result<ExternalCustomerResultDTO> update(@RequestBody ExternalCustomerFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, ExternalCustomerFormDTO.UpdateExternalCustomerGroup.class);
String customerId = formDTO.getCustomerId();
String customerName = formDTO.getCustomerName();
ExternalCustomerResultDTO result = externalCustomerService.update(customerId, customerName);
return new Result<ExternalCustomerResultDTO>().ok(result);
}
}

11
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/ExternalAppDao.java

@ -18,8 +18,12 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.result.ExternalAppResultDTO;
import com.epmet.entity.ExternalAppEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 外部应用列表
@ -29,5 +33,10 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface ExternalAppDao extends BaseDao<ExternalAppEntity> {
Integer countByAppNameAndCustomerId(@Param("appName") String appName, @Param("customerId") String customerId);
ExternalAppResultDTO getByNameAndCustomerId(@Param("appName") String appName, @Param("customerId") String customerId);
List<ExternalAppResultDTO> list(@Param("customerId") String customerId);
}

15
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/ExternalCustomerDao.java

@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.result.ExternalCustomerResultDTO;
import com.epmet.entity.ExternalCustomerEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -38,4 +39,18 @@ public interface ExternalCustomerDao extends BaseDao<ExternalCustomerEntity> {
* @return
*/
List<ExternalCustomerResultDTO> listBaseInfo();
/**
* 根据名称查询客户
* @param customerName
* @return
*/
ExternalCustomerResultDTO getByCustomerName(@Param("customerName") String customerName);
/**
* 根据客户名称计数
* @param customerName
* @return
*/
Integer countByCustomerName(@Param("customerName") String customerName);
}

1
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/ExternalAppAuthService.java

@ -1,6 +1,7 @@
package com.epmet.service;
import com.epmet.dto.result.ExternalAppAuthResultDTO;
import com.epmet.dto.result.ExternalAppResultDTO;
public interface ExternalAppAuthService {

8
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/ExternalAppService.java

@ -17,6 +17,9 @@
package com.epmet.service;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.result.ExternalAppResultDTO;
/**
* 外部应用列表
*
@ -24,4 +27,9 @@ package com.epmet.service;
* @since v1.0.0 2020-08-18
*/
public interface ExternalAppService {
ExternalAppResultDTO add(String appName, String customerId);
ExternalAppResultDTO updateById(String appId, String appName, String customerId);
PageData<ExternalAppResultDTO> listPage(Integer pageNo, Integer pageSize, String customerId);
}

9
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/ExternalCustomerService.java

@ -1,11 +1,14 @@
package com.epmet.service;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.result.ExternalCustomerResultDTO;
import java.util.List;
import com.epmet.entity.ExternalCustomerEntity;
public interface ExternalCustomerService {
public List<ExternalCustomerResultDTO> list(Integer pageNo, Integer pageSize);
PageData<ExternalCustomerResultDTO> listPage(Integer pageNo, Integer pageSize);
ExternalCustomerResultDTO add(String customerName);
ExternalCustomerResultDTO update(String customerId, String customerName);
}

8
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalAppAuthServiceImpl.java

@ -1,10 +1,15 @@
package com.epmet.service.impl;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.redis.RedisKeys;
import com.epmet.commons.tools.redis.RedisUtils;
import com.epmet.dao.ExternalAppDao;
import com.epmet.dao.ExternalAppSecretDao;
import com.epmet.dto.result.ExternalAppAuthResultDTO;
import com.epmet.dto.result.ExternalAppResultDTO;
import com.epmet.entity.ExternalAppEntity;
import com.epmet.entity.ExternalAppSecretEntity;
import com.epmet.service.ExternalAppAuthService;
import com.epmet.utils.externalapp.ExtAppJwtTokenUtils;
@ -29,6 +34,9 @@ public class ExternalAppAuthServiceImpl implements ExternalAppAuthService {
@Autowired
private ExternalAppSecretDao externalAppSecretDao;
@Autowired
private ExternalAppDao externalAppDao;
private int diffMillins = 1000 * 60 * 5;
@Override

100
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalAppServiceImpl.java

@ -17,8 +17,24 @@
package com.epmet.service.impl;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dao.ExternalAppDao;
import com.epmet.dao.ExternalAppSecretDao;
import com.epmet.dao.ExternalCustomerDao;
import com.epmet.dto.result.ExternalAppResultDTO;
import com.epmet.entity.ExternalAppEntity;
import com.epmet.entity.ExternalAppSecretEntity;
import com.epmet.service.ExternalAppService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.UUID;
/**
* 外部应用列表
@ -29,5 +45,89 @@ import org.springframework.stereotype.Service;
@Service
public class ExternalAppServiceImpl implements ExternalAppService {
@Autowired
private ExternalAppDao externalAppDao;
@Autowired
private ExternalAppSecretDao externalAppSecretDao;
@Autowired
private ExternalCustomerDao externalCustomerDao;
@Transactional
@Override
public ExternalAppResultDTO add(String appName, String customerId) {
Integer count = externalAppDao.countByAppNameAndCustomerId(appName, customerId);
if (count > 0) {
throw new RenException(EpmetErrorCode.OPER_EXTERNAL_APP_EXISTS.getCode(),
EpmetErrorCode.OPER_EXTERNAL_APP_EXISTS.getMsg());
}
if (externalCustomerDao.selectById(customerId) == null) {
throw new RenException(EpmetErrorCode.OPER_EXTERNAL_CUSTOMER_NOT_EXISTS.getCode(),
EpmetErrorCode.OPER_EXTERNAL_CUSTOMER_NOT_EXISTS.getMsg());
}
// 应用表插入
ExternalAppEntity appEntity = new ExternalAppEntity();
appEntity.setAppName(appName);
appEntity.setCustomerId(customerId);
externalAppDao.insert(appEntity);
// 秘钥表插入
ExternalAppSecretEntity secretEntity = new ExternalAppSecretEntity();
secretEntity.setAppId(appEntity.getId());
secretEntity.setSecret(genSecret());
externalAppSecretDao.insert(secretEntity);
ExternalAppResultDTO dto = new ExternalAppResultDTO();
dto.setAppName(appName);
dto.setCustomerId(customerId);
dto.setAppId(appEntity.getId());
return dto;
}
/**
* 生成秘钥
* @return
*/
private String genSecret() {
String part1 = UUID.randomUUID().toString();
String part2 = UUID.randomUUID().toString();
return part1.concat(part2).replace("-", "");
}
@Override
public ExternalAppResultDTO updateById(String appId, String appName, String customerId) {
ExternalAppEntity exists = externalAppDao.selectById(appId);
if (exists == null) {
throw new RenException(EpmetErrorCode.OPER_EXTERNAL_CUSTOMER_NOT_EXISTS.getCode(),
EpmetErrorCode.OPER_EXTERNAL_CUSTOMER_NOT_EXISTS.getMsg());
}
ExternalAppResultDTO byName = externalAppDao.getByNameAndCustomerId(appName, customerId);
if (byName != null && !byName.getAppId().equals(appId)) {
// 说明改了之后的名字跟当前客户内的其他应用重复
throw new RenException(EpmetErrorCode.OPER_EXTERNAL_APP_EXISTS.getCode(), "应用名称重复");
}
exists.setAppName(appName);
exists.setCustomerId(customerId);
externalAppDao.updateById(exists);
ExternalAppResultDTO resultDTO = new ExternalAppResultDTO();
resultDTO.setAppId(appId);
resultDTO.setCustomerId(customerId);
resultDTO.setAppName(appName);
return resultDTO;
}
@Override
public PageData<ExternalAppResultDTO> listPage(Integer pageNo, Integer pageSize, String customerId) {
PageHelper.startPage(pageNo, pageSize);
List<ExternalAppResultDTO> list = externalAppDao.list(customerId);
PageInfo<ExternalAppResultDTO> pageInfo = new PageInfo<>(list);
return new PageData<>(list, pageInfo.getTotal());
}
}

44
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalCustomerServiceImpl.java

@ -1,7 +1,11 @@
package com.epmet.service.impl;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dao.ExternalCustomerDao;
import com.epmet.dto.result.ExternalCustomerResultDTO;
import com.epmet.entity.ExternalCustomerEntity;
import com.epmet.service.ExternalCustomerService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
@ -17,10 +21,44 @@ public class ExternalCustomerServiceImpl implements ExternalCustomerService {
private ExternalCustomerDao externalCustomerDao;
@Override
public List<ExternalCustomerResultDTO> list(Integer pageNo, Integer pageSize) {
public PageData<ExternalCustomerResultDTO> listPage(Integer pageNo, Integer pageSize) {
PageHelper.startPage(pageNo, pageSize);
List<ExternalCustomerResultDTO> customers = externalCustomerDao.listBaseInfo();
PageInfo<ExternalCustomerResultDTO> pageInfo = new PageInfo<>(customers);
return null;
long total = new PageInfo<>(customers).getTotal();
PageData<ExternalCustomerResultDTO> pageData = new PageData<>(customers, (int) total);
return pageData;
}
@Override
public ExternalCustomerResultDTO add(String customerName) {
Integer exitsCustomerCount = externalCustomerDao.countByCustomerName(customerName);
if (exitsCustomerCount > 0) {
throw new RenException(EpmetErrorCode.OPER_CUSTOMER_EXISTS.getCode(), "客户已存在");
}
ExternalCustomerEntity entity = new ExternalCustomerEntity();
entity.setCustomerName(customerName);
externalCustomerDao.insert(entity);
ExternalCustomerResultDTO resultDTO = new ExternalCustomerResultDTO();
resultDTO.setCustomerId(entity.getId());
resultDTO.setCustomerName(customerName);
return resultDTO;
}
@Override
public ExternalCustomerResultDTO update(String customerId, String customerName) {
ExternalCustomerEntity existsCustomer = externalCustomerDao.selectById(customerId);
if (existsCustomer == null) {
throw new RenException(EpmetErrorCode.OPER_EXTERNAL_CUSTOMER_NOT_EXISTS.getCode(),
EpmetErrorCode.OPER_EXTERNAL_CUSTOMER_NOT_EXISTS.getMsg());
}
existsCustomer.setCustomerName(customerName);
externalCustomerDao.updateById(existsCustomer);
ExternalCustomerResultDTO resultDTO = new ExternalCustomerResultDTO();
resultDTO.setCustomerId(customerId);
resultDTO.setCustomerName(customerName);
return resultDTO;
}
}

45
epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/ExternalAppDao.xml

@ -15,5 +15,50 @@
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<!-- appName和客户ID查询-->
<select id="countByAppNameAndCustomerId" resultType="java.lang.Integer">
SELECT
count(0)
FROM
external_app
WHERE
APP_NAME = #{appName}
AND CUSTOMER_ID = #{customerId}
AND DEL_FLAG = 0
</select>
<select id="list" resultType="com.epmet.dto.result.ExternalAppResultDTO">
SELECT
ea.ID appId,
ea.APP_NAME,
ea.CUSTOMER_ID,
ec.CUSTOMER_NAME ,
eas.SECRET
FROM
external_app ea
INNER JOIN external_customer ec ON ( ea.CUSTOMER_ID = ec.ID )
LEFT JOIN external_app_secret eas ON (ea.ID = eas.APP_ID)
<where>
ea.DEL_FLAG = 0
<if test="customerId != null and customerId != ''">
AND ea.CUSTOMER_ID = #{customerId}
</if>
</where>
</select>
<select id="getByNameAndCustomerId" resultType="com.epmet.dto.result.ExternalAppResultDTO">
SELECT
ID AS appId,
APP_NAME ,
CUSTOMER_ID
FROM
external_app
WHERE
APP_NAME = #{appName}
AND
CUSTOMER_ID = #{customerId}
AND DEL_FLAG = 0
</select>
</mapper>

18
epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/ExternalCustomerDao.xml

@ -17,7 +17,7 @@
<!-- 列出客户基本信息-->
<select id="listBaseInfo" resultType="com.epmet.dto.result.ExternalCustomerResultDTO">
SELECT
id,
id customerId,
CUSTOMER_NAME
FROM
external_customer
@ -25,5 +25,21 @@
DEL_FLAG = 0
</select>
<select id="getByCustomerName" resultType="com.epmet.dto.result.ExternalCustomerResultDTO">
SELECT
ID, CUSTOMER_NAME
from
external_customer
WHERE CUSTOMER_NAME = #{customerName}
</select>
<select id="countByCustomerName" resultType="int">
SELECT
count(1)
from
external_customer
WHERE CUSTOMER_NAME = #{customerName}
</select>
</mapper>

2
epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-ext-server:
container_name: epmet-ext-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-ext-server:0.0.3
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-ext-server:0.0.4
ports:
- "8113:8113"
network_mode: host # 使用现有网络

2
epmet-module/epmet-ext/epmet-ext-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.0.3</version>
<version>0.0.4</version>
<parent>
<groupId>com.epmet</groupId>

2
epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
gov-org-server:
container_name: gov-org-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/gov-org-server:0.3.85
image: 192.168.1.130:10080/epmet-cloud-dev/gov-org-server:0.3.86
ports:
- "8092:8092"
network_mode: host # 使用现有网络

2
epmet-module/gov-org/gov-org-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.85</version>
<version>0.3.86</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>gov-org</artifactId>

4
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/WebviewDomainFormDTO.java

@ -21,6 +21,10 @@ public class WebviewDomainFormDTO implements Serializable {
* 客户端类型
*/
private String clientType;
/**
* 操作类型:add 添加,delete 删除,set 覆盖
*/
private String action;
/**
* 业务域名
*/

7
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/FunctionCustomizedDetailResultDTO.java

@ -32,7 +32,7 @@ public class FunctionCustomizedDetailResultDTO implements Serializable {
/**
* 默认名称
*/
private String customizedName;
private String functionName;
/**
* 默认大图标
@ -58,4 +58,9 @@ public class FunctionCustomizedDetailResultDTO implements Serializable {
* 来源app(工作端:gov居民端:resi)
*/
private String fromApp;
/**
* 是否有客户在使用(0: 1:)
*/
private Integer isApply;
}

2
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.32
image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.37
ports:
- "8089:8089"
network_mode: host # 使用现有网络

2
epmet-module/oper-customize/oper-customize-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.32</version>
<version>0.3.37</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>oper-customize</artifactId>

19
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/FunctionController.java

@ -17,14 +17,16 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
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.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.FunctionDTO;
import com.epmet.excel.FunctionExcel;
import com.epmet.service.FunctionService;
@ -102,4 +104,19 @@ public class FunctionController {
public Result<List<FunctionDTO>> queryFunctionList() {
return functionService.queryFunctionList();
}
/**
* @param dto
* @return
* @Author sun
* @Description 默认功能新增
**/
@PostMapping("savefunction")
public Result saveFunction(@LoginUser TokenDto tokenDto, @RequestBody FunctionDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
functionService.saveFunction(dto);
return new Result();
}
}

8
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/FunctionService.java

@ -102,4 +102,12 @@ public interface FunctionService extends BaseService<FunctionEntity> {
* @Date 2020/3/23 22:10
**/
Result<List<FunctionDTO>> queryFunctionList();
/**
* @param dto
* @return
* @Author sun
* @Description 默认功能新增
**/
void saveFunction(FunctionDTO dto);
}

12
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java

@ -28,6 +28,7 @@ import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.CustomerFunctionDao;
import com.epmet.dao.CustomerFunctionDetailDao;
import com.epmet.dao.FunctionCustomizedDao;
import com.epmet.dao.FunctionShoppingHistoryDao;
@ -40,6 +41,7 @@ import com.epmet.dto.result.CustomerResultDTO;
import com.epmet.dto.result.FunctionDetailResultDTO;
import com.epmet.dto.result.FunctionResultDTO;
import com.epmet.entity.CustomerFunctionDetailEntity;
import com.epmet.entity.CustomerFunctionEntity;
import com.epmet.entity.FunctionShoppingHistoryEntity;
import com.epmet.redis.CustomerFunctionDetailRedis;
import com.epmet.service.CustomerFunctionDetailService;
@ -71,6 +73,8 @@ public class CustomerFunctionDetailServiceImpl extends BaseServiceImpl<CustomerF
@Autowired
private FunctionCustomizedDao functionCustomizedDao;
@Autowired
private CustomerFunctionDao customerFunctionDao;
@Autowired
private FunctionShoppingHistoryDao functionShoppingHistoryDao;
@Override
@ -241,7 +245,13 @@ public class CustomerFunctionDetailServiceImpl extends BaseServiceImpl<CustomerF
entity.setDisplayOrder(displayOrder);
baseDao.insert(entity);
//4.记录上下架操作日志
//4.客户功能权限表绑定关系
CustomerFunctionEntity customerFunctionEntity = new CustomerFunctionEntity();
customerFunctionEntity.setCustomerId(formDTO.getCustomerId());
customerFunctionEntity.setFunctionId(formDTO.getFunctionId());
customerFunctionDao.insert(customerFunctionEntity);
//5.记录上下架操作日志
FunctionShoppingHistoryEntity historyEntity = new FunctionShoppingHistoryEntity();
historyEntity.setCustomerId(formDTO.getCustomerId());
historyEntity.setFunctionId(functionDTO.getFunctionId());

24
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/FunctionCustomizedServiceImpl.java

@ -144,7 +144,17 @@ public class FunctionCustomizedServiceImpl extends BaseServiceImpl<FunctionCusto
@Override
public Result<FunctionCustomizedDetailResultDTO> getFunctionCustomized(CommonFunctionIdFormDTO formDTO) {
//1.查询定制功能详情信息
FunctionCustomizedDetailResultDTO resultDTO = baseDao.getFunctionCustomizedByFunctionId(formDTO);
//2.查询是否有客户在使用当前定制功能
CustomerFunctionDetailEntity entity = customerFunctionDetailService.selectById(formDTO.getFunctionId());
if (null == entity || null == entity.getFunctionId()) {
resultDTO.setIsApply(NumConstant.ZERO);
} else {
resultDTO.setIsApply(NumConstant.ONE);
}
return new Result<FunctionCustomizedDetailResultDTO>().ok(resultDTO);
}
@ -178,6 +188,8 @@ public class FunctionCustomizedServiceImpl extends BaseServiceImpl<FunctionCusto
List<CustomerFunctionDetailEntity> upCustomizedInfo = new ArrayList<>();
// 统一提示 不能进行修改的客户id
StringBuilder tipCustomizedInfoUserId = new StringBuilder();
// 如果客户全都是使用的自定义模板,则只修改 功能表、定制功能表
int flag = 0;
// 如果这个功能,被客户重新定义了,则不会修改
for (int i = 0; i < customizedId.size(); i++){
@ -207,10 +219,17 @@ public class FunctionCustomizedServiceImpl extends BaseServiceImpl<FunctionCusto
customer.setId(customizedId.get(i).getId());
upCustomizedInfo.add(customer);
}
} else {
// 3.2 用户使用的是自定义的功能,则不予处理
// 但如果所有的客户,都是使用的自定义功能,则修改 功能表、定制功能表
flag = flag + NumConstant.ONE;
}
// 3.2 用户使用的是自定义的功能,则不予处理
}
}
if(flag == customizedId.size()){
// 3.3 没有客户使用该 功能,根据入参参数,修改功能表、定制功能表
this.functionNotUsed(formDTO);
}
if (upCustomizedInfo != null && upCustomizedInfo.size() > NumConstant.ZERO){
// 5.1 修改 客户定制功能详情表
customerFunctionDetailService.updateBatchById(upCustomizedInfo);
@ -263,10 +282,12 @@ public class FunctionCustomizedServiceImpl extends BaseServiceImpl<FunctionCusto
WebviewDomainFormDTO domainFormDTO = new WebviewDomainFormDTO();
domainFormDTO.setCustomerId(formDTO.getCustomerId());
domainFormDTO.setClientType("resi");
domainFormDTO.setAction("set");
domainFormDTO.setWebViewDomain(resiDomains);
String domainData = HttpClientManager.getInstance().sendPostByJSON(domainUrl, JSON.toJSONString(domainFormDTO)).getData();
JSONObject domainObject = JSON.parseObject(domainData);
Result domainResult = ConvertUtils.mapToEntity(domainObject, Result.class);
domainResult.setCode(domainObject.getInteger("code"));
if (!domainResult.success()) {
throw new RenException(domainResult.getCode(), domainResult.getInternalMsg());
}
@ -277,6 +298,7 @@ public class FunctionCustomizedServiceImpl extends BaseServiceImpl<FunctionCusto
WebviewDomainFormDTO domainFormDTO = new WebviewDomainFormDTO();
domainFormDTO.setCustomerId(formDTO.getCustomerId());
domainFormDTO.setClientType("work");
domainFormDTO.setAction("set");
domainFormDTO.setWebViewDomain(workDomains);
String domainData = HttpClientManager.getInstance().sendPostByJSON(domainUrl, JSON.toJSONString(domainFormDTO)).getData();
JSONObject domainObject = JSON.parseObject(domainData);

42
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/FunctionServiceImpl.java

@ -20,20 +20,26 @@ 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.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.commons.tools.utils.Result;
import com.epmet.dao.FunctionDao;
import com.epmet.dto.CustomerDTO;
import com.epmet.dto.FunctionDTO;
import com.epmet.entity.CustomerFunctionEntity;
import com.epmet.entity.FunctionEntity;
import com.epmet.feign.OperCrmOpenFeignClient;
import com.epmet.redis.FunctionRedis;
import com.epmet.service.CustomerFunctionService;
import com.epmet.service.FunctionService;
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.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@ -49,6 +55,10 @@ public class FunctionServiceImpl extends BaseServiceImpl<FunctionDao, FunctionEn
@Autowired
private FunctionRedis functionRedis;
@Autowired
private OperCrmOpenFeignClient operCrmOpenFeignClient;
@Autowired
private CustomerFunctionService customerFunctionService;
@Override
public PageData<FunctionDTO> page(Map<String, Object> params) {
@ -119,4 +129,36 @@ public class FunctionServiceImpl extends BaseServiceImpl<FunctionDao, FunctionEn
return new Result<List<FunctionDTO>>().ok(baseDao.selectFunctionList());
}
/**
* @param dto
* @return
* @Author sun
* @Description 默认功能新增
**/
@Override
@Transactional(rollbackFor = Exception.class)
public void saveFunction(FunctionDTO dto) {
//1.调用oper-crm服务,查询有效客户列表
Result<List<CustomerDTO>> result = operCrmOpenFeignClient.getAllCustomerList();
if(!result.success()){
throw new RenException("调用oper_crm服务 获取有效客户列表失败");
}
List<CustomerDTO> list = result.getData();
//2.新增默认功能
FunctionEntity functionEntity = ConvertUtils.sourceToTarget(dto, FunctionEntity.class);
insert(functionEntity);
//3.为已有客户绑定新的默认功能关系
List<CustomerFunctionEntity> listEntity = new ArrayList<>();
list.forEach(l->{
CustomerFunctionEntity entity = new CustomerFunctionEntity();
entity.setCustomerId(l.getId());
entity.setFunctionId(functionEntity.getId());
listEntity.add(entity);
});
customerFunctionService.insertBatch(listEntity);
}
}

5
epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.5__add_del_flag.sql

@ -1 +1,6 @@
ALTER TABLE function_shopping_history ADD ( DEL_FLAG INT ( 11 ) NOT NULL COMMENT '删除标识(0.未删除 1.已删除)');
ALTER TABLE `customer_function_detail`
MODIFY COLUMN `DOMAIN_NAME` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '自定义业务域名(可设置多个 用分号分隔)' AFTER `ICON_SMALL_IMG`;

3
epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/FunctionCustomizedDao.xml

@ -9,7 +9,7 @@
cu.FUNCTION_ID functionId,
f.SHOPPING_STATUS shoppingStatus,
f.FUNCTION_EXPLAIN functionExplain,
cu.CUSTOMIZED_NAME customizedName,
cu.CUSTOMIZED_NAME functionName,
cu.ICON_LARGE_IMG iconLargeImg,
cu.ICON_SMALL_IMG iconSmallImg,
cu.TARGET_LINK targetLink,
@ -113,6 +113,7 @@
WHERE
fc.DEL_FLAG = '0'
AND f.DEL_FLAG = '0'
AND f.shopping_status = '1' <!-- 只查询客户上架状态的 -->
<foreach collection="functionIds" item="functionId" index="index" open="AND ( " separator=" AND " close=")">
fc.FUNCTION_ID != #{functionId}
</foreach>

2
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.119
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.120
ports:
- "8087:8087"
network_mode: host # 不会创建新的网络

2
epmet-user/epmet-user-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.119</version>
<version>0.3.120</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-user</artifactId>

Loading…
Cancel
Save