diff --git a/epmet-admin/epmet-admin-server/deploy/docker-compose-prod.yml b/epmet-admin/epmet-admin-server/deploy/docker-compose-prod.yml index 2ba6db9d4d..ba0dd38f67 100644 --- a/epmet-admin/epmet-admin-server/deploy/docker-compose-prod.yml +++ b/epmet-admin/epmet-admin-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-admin-server: container_name: epmet-admin-server-prod - image: 172.22.76.12:5000/epmet-cloud-master/epmet-admin-server:version_placeholder + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-admin-server:version_placeholder ports: - "8082:8082" network_mode: host # 使用现有网络 diff --git a/epmet-admin/epmet-admin-server/pom.xml b/epmet-admin/epmet-admin-server/pom.xml index 4d8d8cc1ac..917387298a 100644 --- a/epmet-admin/epmet-admin-server/pom.xml +++ b/epmet-admin/epmet-admin-server/pom.xml @@ -254,20 +254,19 @@ - + epmet_admin_user EpmEt-db-UsEr 0 - 172.22.76.1:6379,172.22.76.20:6379,172.22.76.36:6379,172.22.76.1:6389,172.22.76.20:6389,172.22.76.36:6389 - cluster - 3 - EpmEtclOUdrEdIs@py + r-m5ez3n1j0qc3ykq2ut.redis.rds.aliyuncs.com + 6379 + EpmEtclOUdrEdIs!Q2w true - 172.22.76.5:8848 - 762652d0-b22e-4d56-93ed-b012ad735309 + 192.168.11.180:8848 + bd205d23-e696-47be-b995-916313f86e99 false @@ -280,7 +279,7 @@ true - 172.22.76.20:9876;172.22.76.36:9876 + 192.168.11.187:9876;192.168.11.184:9876 epmet_message diff --git a/epmet-admin/epmet-admin-server/src/main/resources/bootstrap.yml b/epmet-admin/epmet-admin-server/src/main/resources/bootstrap.yml index 847da3aacc..80503e260f 100644 --- a/epmet-admin/epmet-admin-server/src/main/resources/bootstrap.yml +++ b/epmet-admin/epmet-admin-server/src/main/resources/bootstrap.yml @@ -19,21 +19,11 @@ spring: time-zone: GMT+8 date-format: yyyy-MM-dd HH:mm:ss redis: - # 平阴cluster模式下使用cluster:配置段 - # database: @spring.redis.index@ - # host: @spring.redis.host@ - # port: @spring.redis.port@ - # password: @spring.redis.password@ - # timeout: 30s - database: @spring.redis.index@ + host: @spring.redis.host@ + port: @spring.redis.port@ password: @spring.redis.password@ timeout: 30s - cluster: - nodes: @spring.redis.cluster.nodes@ - max-redirects: @spring.redis.cluster.max-redirects@ - shardingsphere: - enabled: false datasource: druid: #MySQL @@ -136,12 +126,6 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 - threadpool: - default: - coreSize: 20 - maximumSize: 50 - maxQueueSize: 500 - queueSizeRejectionThreshold: 200 ribbon: ReadTimeout: 300000 @@ -166,4 +150,4 @@ thread: queueCapacity: @thread.threadPool.queue-capacity@ keepAliveSeconds: @thread.threadPool.keep-alive-seconds@ threadNamePrefix: @thread.threadPool.thread-name-prefix@ - rejectedExecutionHandler: @thread.threadPool.rejected-execution-handler@ + rejectedExecutionHandler: @thread.threadPool.rejected-execution-handler@ \ No newline at end of file diff --git a/epmet-auth/deploy/docker-compose-prod.yml b/epmet-auth/deploy/docker-compose-prod.yml index e5ad417b4d..56c4a0a17b 100644 --- a/epmet-auth/deploy/docker-compose-prod.yml +++ b/epmet-auth/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-auth-server: container_name: epmet-auth-server-prod - image: 172.22.76.12:5000/epmet-cloud-master/epmet-auth:version_placeholder + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-auth:version_placeholder ports: - "8081:8081" network_mode: host # 使用现有网络 diff --git a/epmet-auth/pom.xml b/epmet-auth/pom.xml index 489d4c324e..1822235cdc 100644 --- a/epmet-auth/pom.xml +++ b/epmet-auth/pom.xml @@ -376,14 +376,13 @@ 0 - 172.22.76.1:6379,172.22.76.20:6379,172.22.76.36:6379,172.22.76.1:6389,172.22.76.20:6389,172.22.76.36:6389 - cluster - 3 - EpmEtclOUdrEdIs@py + r-m5ez3n1j0qc3ykq2ut.redis.rds.aliyuncs.com + 6379 + EpmEtclOUdrEdIs!Q2w true - 172.22.76.5:8848 - 762652d0-b22e-4d56-93ed-b012ad735309 + 192.168.11.180:8848 + bd205d23-e696-47be-b995-916313f86e99 false diff --git a/epmet-auth/src/main/java/com/epmet/controller/ThirdLoginController.java b/epmet-auth/src/main/java/com/epmet/controller/ThirdLoginController.java index a615dcdf6c..3f23ee88c8 100644 --- a/epmet-auth/src/main/java/com/epmet/controller/ThirdLoginController.java +++ b/epmet-auth/src/main/java/com/epmet/controller/ThirdLoginController.java @@ -108,7 +108,7 @@ public class ThirdLoginController { **/ @PostMapping(value = "/getmyorgbyaccount") public Result> getMyOrgByAccount(@RequestBody ThirdStaffOrgByAccountFormDTO formDTO) { - ValidatorUtils.validateEntity(formDTO); + ValidatorUtils.validateEntity(formDTO, StaffOrgByAccountFormDTO.AddUserShowGroup.class, StaffOrgByAccountFormDTO.GetMyOrgByPassWordGroup.class); List staffOrgs = thirdLoginService.getMyOrgByAccount(formDTO); return new Result>().ok(staffOrgs); } diff --git a/epmet-auth/src/main/java/com/epmet/dto/form/ThirdStaffOrgByAccountFormDTO.java b/epmet-auth/src/main/java/com/epmet/dto/form/ThirdStaffOrgByAccountFormDTO.java index fd1d93b725..3cad308ab6 100644 --- a/epmet-auth/src/main/java/com/epmet/dto/form/ThirdStaffOrgByAccountFormDTO.java +++ b/epmet-auth/src/main/java/com/epmet/dto/form/ThirdStaffOrgByAccountFormDTO.java @@ -1,5 +1,6 @@ package com.epmet.dto.form; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; import javax.validation.constraints.NotBlank; @@ -12,20 +13,36 @@ import java.io.Serializable; @Data public class ThirdStaffOrgByAccountFormDTO implements Serializable { private static final long serialVersionUID = 4193133227120225342L; + /** + * 添加用户操作的用户可见异常分组 + * 该分组用于校验需要返回给前端错误信息提示的列,需要继承CustomerClientShowGroup + * 返回错误码为8999,提示信息为DTO中具体的列的校验注解message的内容 + */ + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + public interface GetMyOrgByPassWordGroup extends CustomerClientShowGroup { + } + public interface GetMyOrgByLoginWxmp extends CustomerClientShowGroup{} /** * 小程序appId */ - @NotBlank(message = "appId不能为空") + @NotBlank(message = "appId不能为空", groups = {AddUserShowGroup.class}) private String appId; /** * 手机号 */ - @NotBlank(message = "账号不能为空") + @NotBlank(message = "账号不能为空", groups = {AddUserShowGroup.class}) private String userAccount; - @NotBlank(message = "密码不能为空") + /** + * 验证码 + */ + @NotBlank(message="验证码不能为空", groups = {GetMyOrgByLoginWxmp.class}) + private String smsCode; + + @NotBlank(message = "密码不能为空",groups ={GetMyOrgByPassWordGroup.class}) private String password; } diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java index 933d936d81..07f60c2ecd 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java @@ -19,8 +19,6 @@ import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.feign.ResultDataResolver; -import com.epmet.commons.tools.redis.RedisKeys; -import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.redis.common.CustomerDingDingRedis; import com.epmet.commons.tools.redis.common.bean.DingMiniInfoCache; import com.epmet.commons.tools.security.dto.GovTokenDto; @@ -91,8 +89,6 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol @Autowired private LoginUserUtil loginUserUtil; @Autowired - private RedisUtils redisUtils; - @Autowired private DingTalkClientToken dingTalkClientToken; @Autowired private DingTalkClientUser dingTalkClientUser; @@ -648,42 +644,11 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol result.getMsg())); return new ArrayList<>(); } - //临时解决方案 - private static final List resultTemp = new ArrayList<>(); - static { - StaffOrgsResultDTO t = new StaffOrgsResultDTO(); - t.setRootAgencyId("53613e1c5de6ed473467f0159a10b135"); - t.setRootAgencyName("平阴县"); - t.setCustomerId("6f203e30de1a65aab7e69c058826cd80"); - t.setCustomerName("平音"); - resultTemp.add(t); - } + @Override public List getMyOrgByAccount(ThirdStaffOrgByAccountFormDTO formDTO) { - String appId = formDTO.getAppId(); - String userAccount = formDTO.getUserAccount(); - String password = formDTO.getPassword(); - //{"code":0,"msg":"success","internalMsg":"","data":[{"rootAgencyId":"53613e1c5de6ed473467f0159a10b135","rootAgencyName":"平阴县","customerId":"6f203e30de1a65aab7e69c058826cd80","customerName":"平音"}]} - if ("wx2b75d556ba867750".equals(appId)){ - if("18700011111".equals(userAccount)){ - if (!"Py02222".equals(password)){ - throw new RenException(EpmetErrorCode.PASSWORD_ERROR.getCode()); - } - //String result = "[{\"rootAgencyId\":\"53613e1c5de6ed473467f0159a10b135\",\"rootAgencyName\":\"平阴县\",\"customerId\":\"6f203e30de1a65aab7e69c058826cd80\",\"customerName\":\"平音\"}]"; - return resultTemp; - } - if (userAccount.startsWith("187000111")){ - throw new EpmetException(EpmetErrorCode.GOV_STAFF_ACCOUNT_NOT_EXISTS.getCode()); - } - } - //{"isNovice":false,"mobile":"","userAccount":"18700011111","password":"Py011111","appId":"wx2b75d556ba867750"} - - logger.info("getMyOrgByAccountService at :{}",System.currentTimeMillis()); - long start = System.currentTimeMillis(); //0.根据appId查询对应客户Id PaCustomerDTO customer = this.getCustomerInfo(formDTO.getAppId()); - logger.info("getMyOrgByAccountService getCustomerInfo cost:{}",System.currentTimeMillis() - start ); - start = System.currentTimeMillis(); //7.28 上边根据appId只能锁定一条客户id,后边的批量循环操作暂不做调整,还是使用之前的代码 sun //1、根据手机号查询到用户信息 ThirdCustomerStaffByAccountFormDTO dto = new ThirdCustomerStaffByAccountFormDTO(); @@ -694,31 +659,30 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol logger.warn(String.format("账户密码登录异常,账户[%s],code[%s],msg[%s]", formDTO.getUserAccount(), customerStaffResult.getCode(), customerStaffResult.getMsg())); throw new RenException(customerStaffResult.getCode()); } - logger.info("getMyOrgByAccountService getCustsomerStaffByIdAndAccount cost:{}",System.currentTimeMillis()- start); - start = System.currentTimeMillis(); //2、密码是否正确 List customerStaffList=customerStaffResult.getData(); - if (CollectionUtils.isEmpty(customerStaffList)){ - throw new EpmetException(EpmetErrorCode.GOV_STAFF_ACCOUNT_NOT_EXISTS.getCode()); - } //3、查询用户所有的组织信息 List customerIdList = new ArrayList<>(); //是否设置过密码 boolean havePasswordFlag=false; //密码是否正确 boolean passwordRightFlag=false; - CustomerStaffDTO customerStaffDTO = customerStaffList.get(0); + for (CustomerStaffDTO customerStaffDTO : customerStaffList) { + if(StringUtils.isNotBlank(customerStaffDTO.getPassword())){ + havePasswordFlag=true; + }else{ + logger.warn(String.format("当前用户:账户%s,客户Id%s下未设置密码.",formDTO.getUserAccount(),customerStaffDTO.getCustomerId())); + continue; + } + if (!PasswordUtils.matches(formDTO.getPassword(), customerStaffDTO.getPassword())) { + logger.warn(String.format("当前用户:账户%s,客户Id%s密码匹配错误.",formDTO.getUserAccount(),customerStaffDTO.getCustomerId())); - if (StringUtils.isNotBlank(customerStaffDTO.getPassword())) { - havePasswordFlag = true; - } - long start2 = System.currentTimeMillis(); - if (PasswordUtils.matches(formDTO.getPassword(), customerStaffDTO.getPassword())) { - passwordRightFlag = true; - customerIdList.add(customerStaffDTO.getCustomerId()); + }else{ + logger.warn(String.format("当前用户:账户%s,客户Id%s密码匹配正确.",formDTO.getUserAccount(),customerStaffDTO.getCustomerId())); + passwordRightFlag=true; + customerIdList.add(customerStaffDTO.getCustomerId()); + } } - logger.info("getMyOrgByAccountService PasswordUtils.matches cost:{}", System.currentTimeMillis() - start2); - //根据手机号查出来所有用户,密码都为空,表明用户未激活账户,未设置密码 if(!havePasswordFlag){ logger.warn(String.format("当前账户(%s)下所有账户都未设置密码,请先使用验证码登录激活账户",formDTO.getUserAccount())); @@ -729,27 +693,11 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol logger.warn(String.format("根据当前账户(%s)密码未找到所属组织,密码错误",formDTO.getUserAccount())); throw new RenException(EpmetErrorCode.PASSWORD_ERROR.getCode()); } - logger.info("getMyOrgByAccountService checkpassword cost:{}",System.currentTimeMillis() - start); - start = System.currentTimeMillis(); - String tempKey = RedisKeys.getCustomerStaffTempKey(customerStaffDTO.getUserId()); - List redisTemp = (List)redisUtils.get(tempKey); - if (redisTemp != null){ - logger.info("getMyOrgByAccountService end redis :{}",System.currentTimeMillis()); - return redisTemp; - } - logger.info("getMyOrgByAccountService getCustomerStaffTempKey cost:{}",System.currentTimeMillis()-start); - start = System.currentTimeMillis(); StaffOrgFormDTO staffOrgFormDTO = new StaffOrgFormDTO(); staffOrgFormDTO.setCustomerIdList(customerIdList); Result> result = govOrgOpenFeignClient.getStaffOrgList(staffOrgFormDTO); if(result.success()&&null!=result.getData()){ - List data = result.getData(); - logger.info("getMyOrgByAccountService getStaffOrgList from db cost:{}",System.currentTimeMillis() -start); - start = System.currentTimeMillis(); - redisUtils.set(tempKey,data); - logger.info("getMyOrgByAccountService getCustomerStaffTempKey set redis cost:{}",System.currentTimeMillis()-start); - logger.info("getMyOrgByAccountService end DB :{}",System.currentTimeMillis()); - return data; + return result.getData(); } logger.warn(String .format("手机验证码获取组织,调用%s服务失败,入参账户%s,密码%s,返回错误码%s,错误提示信息%s", ServiceConstant.GOV_ORG_SERVER, @@ -766,11 +714,6 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol * @author zxc */ public PaCustomerDTO getCustomerInfo(String appId){ - String redisKey = RedisKeys.getThirdCustomerInfoByAppId(appId); - PaCustomerDTO customer = (PaCustomerDTO) redisUtils.get(redisKey); - if (customer != null && StringUtils.isNotBlank(customer.getId())){ - return customer; - } JSONObject jsonObject = new JSONObject(); String data = HttpClientManager.getInstance().sendPostByJSON(AuthHttpUrlConstant.CUSTOMER_MSG_URL + appId, JSON.toJSONString(jsonObject)).getData(); logger.info("ThirdLoginServiceImpl.getCustomerInfo:httpclient->url:"+AuthHttpUrlConstant.CUSTOMER_MSG_URL+",结果->"+data); @@ -786,9 +729,8 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol Object PublicCustomerResultDTO = mapToResult.getData(); JSONObject json = JSON.parseObject(PublicCustomerResultDTO.toString()); Map map = (Map)json.get("customer"); - customer = ConvertUtils.mapToEntity(map, PaCustomerDTO.class); + PaCustomerDTO customer = ConvertUtils.mapToEntity(map, PaCustomerDTO.class); logger.info("小程序登陆third服务获取客户用户信息PaCustomerDTO->"+customer); - redisUtils.set(redisKey,customer); return customer; } diff --git a/epmet-auth/src/main/resources/bootstrap.yml b/epmet-auth/src/main/resources/bootstrap.yml index 57ea62a98e..8cdc2c21db 100644 --- a/epmet-auth/src/main/resources/bootstrap.yml +++ b/epmet-auth/src/main/resources/bootstrap.yml @@ -19,19 +19,11 @@ spring: time-zone: GMT+8 date-format: yyyy-MM-dd HH:mm:ss redis: - # 平阴cluster模式下使用cluster:配置段 - # database: @spring.redis.index@ - # host: @spring.redis.host@ - # port: @spring.redis.port@ - # password: @spring.redis.password@ - # timeout: 30s - database: @spring.redis.index@ + host: @spring.redis.host@ + port: @spring.redis.port@ password: @spring.redis.password@ timeout: 30s - cluster: - nodes: @spring.redis.cluster.nodes@ - max-redirects: @spring.redis.cluster.max-redirects@ cloud: nacos: discovery: @@ -91,12 +83,6 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 - threadpool: - default: - coreSize: 20 - maximumSize: 50 - maxQueueSize: 500 - queueSizeRejectionThreshold: 200 ribbon: ReadTimeout: 300000 @@ -161,8 +147,7 @@ thirdplat: appkey: @thirdplat.jcet.g.appkey@ appsecret: @thirdplat.jcet.g.appsecret@ pyld: - domain: https://epmet-cloud-pingyin.elinkservice.cn/platform -# domain: https://epmet-ext1.pingyin.gov.cn/platform + domain: https://epmet-ext1.pingyin.gov.cn/platform appId: 7a5aec009ba4eba8e254ee64fe3775e1 appKey: 14faef9af508d1c253b720ea5a43f9de appSecret: 38e7c2604c8dd33c445705d25eebbfc12a2f7ed8a87111e9e10a40312d3a1595 @@ -185,4 +170,4 @@ thread: queueCapacity: @thread.threadPool.queue-capacity@ keepAliveSeconds: @thread.threadPool.keep-alive-seconds@ threadNamePrefix: @thread.threadPool.thread-name-prefix@ - rejectedExecutionHandler: @thread.threadPool.rejected-execution-handler@ + rejectedExecutionHandler: @thread.threadPool.rejected-execution-handler@ \ No newline at end of file diff --git a/epmet-commons/epmet-commons-mybatis/pom.xml b/epmet-commons/epmet-commons-mybatis/pom.xml index df0ecffb56..db396c4042 100644 --- a/epmet-commons/epmet-commons-mybatis/pom.xml +++ b/epmet-commons/epmet-commons-mybatis/pom.xml @@ -70,12 +70,6 @@ pagehelper-spring-boot-starter 1.2.12 - - - org.apache.shardingsphere - sharding-jdbc-spring-boot-starter - 4.0.0-RC1 - diff --git a/epmet-commons/epmet-commons-tools/pom.xml b/epmet-commons/epmet-commons-tools/pom.xml index 3f75302370..b0f7737940 100644 --- a/epmet-commons/epmet-commons-tools/pom.xml +++ b/epmet-commons/epmet-commons-tools/pom.xml @@ -75,12 +75,6 @@ commons-fileupload commons-fileupload ${commons.fileupload.version} - - - commons-io - commons-io - - commons-io diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/config/RedissonConfig.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/config/RedissonConfig.java index 45c81d3a4c..8a96e5ccbd 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/config/RedissonConfig.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/config/RedissonConfig.java @@ -25,10 +25,6 @@ public class RedissonConfig { private String port; @Value("${spring.redis.password}") private String password; - @Value("${spring.redis.cluster.nodes}") - private String clusterNodesStr; - @Value("${spring.redis.cluster.max-redirects}") - private Integer rediTimes; @Bean @@ -45,17 +41,10 @@ public class RedissonConfig { config.setNettyThreads(NumConstant.FOUR); //redis://ip:port //redis的部署方式有单节点部署、主从方式部署、哨兵方式部署、集群方式部署 - - //单机模式 - //config.useSingleServer().setAddress("redis://".concat(host).concat(StrConstant.COLON).concat(port)); - //config.useSingleServer().setPassword(password); - //config.useSingleServer().setConnectTimeout(NumConstant.ONE_THOUSAND * NumConstant.FIVE); - //config.useSingleServer().setDatabase(NumConstant.TEN); - - //集群模式 - config.useClusterServers().addNodeAddress(getClusterNodes()); - config.useClusterServers().setPassword(password); - config.useClusterServers().setConnectTimeout(NumConstant.ONE_THOUSAND * NumConstant.FIVE); + config.useSingleServer().setAddress("redis://".concat(host).concat(StrConstant.COLON).concat(port)); + config.useSingleServer().setPassword(password); + config.useSingleServer().setConnectTimeout(NumConstant.ONE_THOUSAND * NumConstant.FIVE); + config.useSingleServer().setDatabase(NumConstant.TEN); return Redisson.create(config); } catch (Exception e) { log.error("初始化redisson失败", e); @@ -64,19 +53,4 @@ public class RedissonConfig { } - /** - * @Description 获取集群节点列表 - * @param - * @return java.lang.String[] - * @author wxz - * @date 2021.08.23 15:21:28 - */ - private String[] getClusterNodes() { - log.info("RedssionClient::clusterNodes:{}", clusterNodesStr); - String[] nodeArray = clusterNodesStr.split(","); - for (int index = 0; index < nodeArray.length; index++) { - nodeArray[index] = "redis://".concat(nodeArray[index]); - } - return nodeArray; - } } \ No newline at end of file diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/EnvEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/EnvEnum.java index feb5539e42..708878e4f5 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/EnvEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/EnvEnum.java @@ -19,7 +19,7 @@ public enum EnvEnum { LOCAL("local", "本地环境", "http://localhost:8080/api/"), DEV("dev", "开发环境", "http://192.168.1.140:8080/api/"), TEST("test", "体验环境", "https://epmet-dev.elinkservice.cn/api/"), - PROD("prod", "平阴环境", "https://epmet-cloud-pingyin.elinkservice.cn/api/"), + PROD("prod", "生产环境", "https://epmet-cloud.elinkservice.cn/api/"), UN_KNOWN("un_known", "未知", "https://epmet-dev.elinkservice.cn/api/"), ; diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java index 68c24e523f..63f27f195b 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java @@ -888,25 +888,6 @@ public class RedisKeys { return rootPrefix.concat("dh:token"); } - /** - * desc:根据appId 获取 客户信息key - * @param appId - * @return - */ - public static String getThirdCustomerInfoByAppId(String appId) { - if (StringUtils.isBlank(appId)){ - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"参数错误"); - } - return rootPrefix.concat("third:customerInfo:appId:")+appId; - } - - public static String getCustomerStaffTempKey(String staffId) { - if (StringUtils.isBlank(staffId)){ - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"参数错误"); - } - return rootPrefix.concat("gov:staff:temp:staffId:")+staffId; - } - /** * Desc: 票据 * @param suiteKey diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/password/BCryptPasswordEncoder.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/password/BCryptPasswordEncoder.java index ef4050a5c3..babcf5c91f 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/password/BCryptPasswordEncoder.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/password/BCryptPasswordEncoder.java @@ -16,7 +16,7 @@ import java.util.regex.Pattern; * */ public class BCryptPasswordEncoder implements PasswordEncoder { - private static final Pattern BCRYPT_PATTERN = Pattern + private Pattern BCRYPT_PATTERN = Pattern .compile("\\A\\$2a?\\$\\d\\d\\$[./0-9A-Za-z]{53}"); private final Log logger = LogFactory.getLog(getClass()); @@ -72,10 +72,10 @@ public class BCryptPasswordEncoder implements PasswordEncoder { return false; } - /*if (!BCRYPT_PATTERN.matcher(encodedPassword).matches()) { + if (!BCRYPT_PATTERN.matcher(encodedPassword).matches()) { logger.warn("Encoded password does not look like BCrypt"); return false; - }*/ + } return BCrypt.checkpw(rawPassword.toString(), encodedPassword); } diff --git a/epmet-gateway/deploy/docker-compose-prod.yml b/epmet-gateway/deploy/docker-compose-prod.yml index 3cb7ee641b..1f12405890 100644 --- a/epmet-gateway/deploy/docker-compose-prod.yml +++ b/epmet-gateway/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-gateway-server: container_name: epmet-gateway-server-prod - image: 172.22.76.12:5000/epmet-cloud-master/epmet-gateway:version_placeholder + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-gateway:version_placeholder ports: - "8080:8080" network_mode: host # 使用现有网络 diff --git a/epmet-gateway/pom.xml b/epmet-gateway/pom.xml index 542bd02188..301fb79a81 100644 --- a/epmet-gateway/pom.xml +++ b/epmet-gateway/pom.xml @@ -507,14 +507,13 @@ 0 - 172.22.76.1:6379,172.22.76.20:6379,172.22.76.36:6379,172.22.76.1:6389,172.22.76.20:6389,172.22.76.36:6389 - cluster - 3 - EpmEtclOUdrEdIs@py + r-m5ez3n1j0qc3ykq2ut.redis.rds.aliyuncs.com + 6379 + EpmEtclOUdrEdIs!Q2w true - 172.22.76.5:8848 - 762652d0-b22e-4d56-93ed-b012ad735309 + 192.168.11.180:8848 + bd205d23-e696-47be-b995-916313f86e99 false diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml index 8ee43f7f83..c723860629 100644 --- a/epmet-gateway/src/main/resources/bootstrap.yml +++ b/epmet-gateway/src/main/resources/bootstrap.yml @@ -18,19 +18,11 @@ spring: encoding: UTF-8 basename: i18n/messages_common redis: - # 平阴cluster模式下使用cluster:配置段 - # database: @spring.redis.index@ - # host: @spring.redis.host@ - # port: @spring.redis.port@ - # password: @spring.redis.password@ - # timeout: 30s - database: @spring.redis.index@ + host: @spring.redis.host@ + port: @spring.redis.port@ password: @spring.redis.password@ timeout: 30s - cluster: - nodes: @spring.redis.cluster.nodes@ - max-redirects: @spring.redis.cluster.max-redirects@ cloud: gateway: locator: @@ -477,12 +469,6 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 - threadpool: - default: - coreSize: 20 - maximumSize: 50 - maxQueueSize: 500 - queueSizeRejectionThreshold: 200 ribbon: ReadTimeout: 300000 diff --git a/epmet-module/data-aggregator/data-aggregator-server/deploy/docker-compose-prod.yml b/epmet-module/data-aggregator/data-aggregator-server/deploy/docker-compose-prod.yml index ca3874e88b..8f887c8b2e 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/deploy/docker-compose-prod.yml +++ b/epmet-module/data-aggregator/data-aggregator-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: data-aggregator-server: container_name: data-aggregator-server-prod - image: 172.22.76.12:5000/epmet-cloud-master/data-aggregator-server:version_placeholder + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/data-aggregator-server:version_placeholder ports: - "8114:8114" network_mode: host # 使用现有网络 diff --git a/epmet-module/data-aggregator/data-aggregator-server/pom.xml b/epmet-module/data-aggregator/data-aggregator-server/pom.xml index a47711d12f..333a287b4c 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/pom.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/pom.xml @@ -32,13 +32,6 @@ com.epmet epmet-commons-mybatis 2.0.0 - - - - org.apache.shardingsphere - sharding-jdbc-spring-boot-starter - - com.epmet @@ -625,63 +618,63 @@ - + epmet_gov_org_user EpmEt-db-UsEr - + epmet_gov_issue_user EpmEt-db-UsEr - + epmet_gov_project_user EpmEt-db-UsEr - + epmet_resi_group_user EpmEt-db-UsEr - + epmet_user_user EpmEt-db-UsEr - + epmet_common_service_user EpmEt-db-UsEr - + epmet_oper_crm_user EpmEt-db-UsEr - + epmet_data_statistical EpmEt-db-UsEr - + epmet_evaluation_index_user EpmEt-db-UsEr @@ -693,49 +686,48 @@ EpmEtclOUdvIEwEr@w - + epmet_oper_customize_user EpmEt-db-UsEr - + epmet_message_user EpmEt-db-UsEr - + epmet_tduck EpmEt-db-UsEr - + epmet_heart_user EpmEt-db-UsEr - + epmet_resi_partymember_user EpmEt-db-UsEr 0 - 172.22.76.1:6379,172.22.76.20:6379,172.22.76.36:6379,172.22.76.1:6389,172.22.76.20:6389,172.22.76.36:6389 - cluster - 3 - EpmEtclOUdrEdIs@py + r-m5ez3n1j0qc3ykq2ut.redis.rds.aliyuncs.com + 6379 + EpmEtclOUdrEdIs!Q2w true - 172.22.76.5:8848 - 762652d0-b22e-4d56-93ed-b012ad735309 + 192.168.11.180:8848 + bd205d23-e696-47be-b995-916313f86e99 false diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/bootstrap.yml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/bootstrap.yml index 28dd494f7c..e800647308 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/bootstrap.yml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/bootstrap.yml @@ -10,19 +10,11 @@ spring: application: name: data-aggregator-server redis: - # 平阴cluster模式下使用cluster:配置段 - # database: @spring.redis.index@ - # host: @spring.redis.host@ - # port: @spring.redis.port@ - # password: @spring.redis.password@ - # timeout: 30s - database: @spring.redis.index@ + host: @spring.redis.host@ + port: @spring.redis.port@ password: @spring.redis.password@ timeout: 30s - cluster: - nodes: @spring.redis.cluster.nodes@ - max-redirects: @spring.redis.cluster.max-redirects@ datasource: #MySQL druid: @@ -196,13 +188,6 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 - threadpool: - default: - coreSize: 20 - maximumSize: 50 - maxQueueSize: 500 - queueSizeRejectionThreshold: 200 - ribbon: ReadTimeout: 300000 diff --git a/epmet-module/data-report/data-report-server/deploy/docker-compose-prod.yml b/epmet-module/data-report/data-report-server/deploy/docker-compose-prod.yml index 4516fa03e3..3d4bcd6279 100644 --- a/epmet-module/data-report/data-report-server/deploy/docker-compose-prod.yml +++ b/epmet-module/data-report/data-report-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: data-report-server: container_name: data-report-server-prod - image: 172.22.76.12:5000/epmet-cloud-master/data-report-server:version_placeholder + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/data-report-server:version_placeholder ports: - "8108:8108" network_mode: host # 使用现有网络 diff --git a/epmet-module/data-report/data-report-server/pom.xml b/epmet-module/data-report/data-report-server/pom.xml index 839272531e..dd4ade5343 100644 --- a/epmet-module/data-report/data-report-server/pom.xml +++ b/epmet-module/data-report/data-report-server/pom.xml @@ -28,13 +28,6 @@ com.epmet epmet-commons-mybatis 2.0.0 - - - - org.apache.shardingsphere - sharding-jdbc-spring-boot-starter - - com.epmet @@ -341,34 +334,33 @@ - + epmet_data_statistical EpmEt-db-UsEr - + epmet_data_stats_display_user EpmEt-db-UsEr - + epmet_evaluation_index_user EpmEt-db-UsEr 0 - 172.22.76.1:6379,172.22.76.20:6379,172.22.76.36:6379,172.22.76.1:6389,172.22.76.20:6389,172.22.76.36:6389 - cluster - 3 - EpmEtclOUdrEdIs@py + r-m5ez3n1j0qc3ykq2ut.redis.rds.aliyuncs.com + 6379 + EpmEtclOUdrEdIs!Q2w true - 172.22.76.5:8848 - 762652d0-b22e-4d56-93ed-b012ad735309 + 192.168.11.180:8848 + bd205d23-e696-47be-b995-916313f86e99 false diff --git a/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml b/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml index 205f7efffa..8f7e9c61c4 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml +++ b/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml @@ -16,19 +16,11 @@ spring: time-zone: GMT+8 date-format: yyyy-MM-dd HH:mm:ss redis: - # 平阴cluster模式下使用cluster:配置段 - # database: @spring.redis.index@ - # host: @spring.redis.host@ - # port: @spring.redis.port@ - # password: @spring.redis.password@ - # timeout: 30s - database: @spring.redis.index@ + host: @spring.redis.host@ + port: @spring.redis.port@ password: @spring.redis.password@ timeout: 30s - cluster: - nodes: @spring.redis.cluster.nodes@ - max-redirects: @spring.redis.cluster.max-redirects@ datasource: druid: #MySQL @@ -138,12 +130,6 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 - threadpool: - default: - coreSize: 20 - maximumSize: 50 - maxQueueSize: 500 - queueSizeRejectionThreshold: 200 ribbon: ReadTimeout: 300000 diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DataSourceConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DataSourceConstant.java index b3a184947f..543b3865b3 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DataSourceConstant.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DataSourceConstant.java @@ -17,8 +17,4 @@ public interface DataSourceConstant { String EPMET_HEART="epmetHeart"; String EPMET_POINT = "epmetPoint"; String OPER_CUSTOMIZE="operCustomize"; - /** - * 济南的中间数据库 - */ - String JI_NAN = "jinan"; } diff --git a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml index d22092f9ae..a590e95d75 100644 --- a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml +++ b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: data-statistical-server: container_name: data-statistical-server-prod - image: 172.22.76.12:5000/epmet-cloud-master/data-statistical-server:version_placeholder + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/data-statistical-server:version_placeholder ports: - "8108:8108" network_mode: host # 使用现有网络 diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml index 9140f9f099..35c84f863b 100644 --- a/epmet-module/data-statistical/data-statistical-server/pom.xml +++ b/epmet-module/data-statistical/data-statistical-server/pom.xml @@ -22,13 +22,6 @@ com.epmet epmet-commons-mybatis 2.0.0 - - - - org.apache.shardingsphere - sharding-jdbc-spring-boot-starter - - org.springframework.boot @@ -606,105 +599,104 @@ - + epmet_data_statistical EpmEt-db-UsEr - + epmet_gov_org_user EpmEt-db-UsEr - + epmet_gov_issue_user EpmEt-db-UsEr - + epmet_gov_project_user EpmEt-db-UsEr - + epmet_gov_voice_user EpmEt-db-UsEr - + epmet_oper_crm_user EpmEt-db-UsEr - + epmet_resi_group_user EpmEt-db-UsEr - + epmet_user_user EpmEt-db-UsEr - + epmet_data_stats_display_user EpmEt-db-UsEr - + epmet_evaluation_index_user EpmEt-db-UsEr - + epmet_cloud_viewer EpmEtclOUdvIEwEr@w - + epmet_resi_partymember_user EpmEt-db-UsEr - + epmet_heart_user EpmEt-db-UsEr - + epmet_point_user EpmEt-db-UsEr - + epmet_oper_customize_user EpmEt-db-UsEr 0 - 172.22.76.1:6379,172.22.76.20:6379,172.22.76.36:6379,172.22.76.1:6389,172.22.76.20:6389,172.22.76.36:6389 - cluster - 3 - EpmEtclOUdrEdIs@py + r-m5ez3n1j0qc3ykq2ut.redis.rds.aliyuncs.com + 6379 + EpmEtclOUdrEdIs!Q2w true - 172.22.76.5:8848 - 762652d0-b22e-4d56-93ed-b012ad735309 + 192.168.11.180:8848 + bd205d23-e696-47be-b995-916313f86e99 false @@ -730,7 +722,7 @@ true - 172.22.76.20:9876;172.22.76.36:9876 + 192.168.11.187:9876;192.168.11.184:9876 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/BaseReportDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/BaseReportDao.java index f371759d60..e11ba2d776 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/BaseReportDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/BaseReportDao.java @@ -94,8 +94,6 @@ public interface BaseReportDao { */ int delAgencyProject(@Param("customerId") String customerId, @Param("dateId") String dateId); - void delAgencyProjectDaily(@Param("customerId") String customerId,@Param("dateIdList")List dateIdList); - /** * @Description 批量新增组织项目数据 * @Param dataList diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/BaseReportServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/BaseReportServiceImpl.java index 9d3158e06b..1f8fdf806c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/BaseReportServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/BaseReportServiceImpl.java @@ -11,7 +11,6 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import java.util.ArrayList; import java.util.List; /** @@ -289,22 +288,10 @@ public class BaseReportServiceImpl implements BaseReportService { @Override public void agencyProject(AgencyProjectFormDTO formDTO) { if (formDTO.getIsFirst()) { - // 20220711修改逻辑 -// int deleteNum; -// do { -// deleteNum = baseReportDao.delAgencyProject(formDTO.getDataList().get(NumConstant.ZERO).getCustomerId(), formDTO.getDataList().get(NumConstant.ZERO).getDateId()); -// } while (deleteNum > NumConstant.ZERO); - - List dataList = formDTO.getDataList(); - List dateIdList = new ArrayList(); - String customerId = dataList.get(NumConstant.ZERO).getCustomerId(); - for(AgencyProjectFormDTO.DataList d : dataList){ - if(!dateIdList.contains(d.getDateId())){ - dateIdList.add(d.getDateId()); - } - } - baseReportDao.delAgencyProjectDaily(customerId,dateIdList); - + int deleteNum; + do { + deleteNum = baseReportDao.delAgencyProject(formDTO.getDataList().get(NumConstant.ZERO).getCustomerId(), formDTO.getDataList().get(NumConstant.ZERO).getDateId()); + } while (deleteNum > NumConstant.ZERO); } List> partition = ListUtils.partition(formDTO.getDataList(), NumConstant.ONE_HUNDRED); partition.forEach(p -> { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml index f60ad30d00..ed65817966 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml @@ -16,19 +16,11 @@ spring: time-zone: GMT+8 date-format: yyyy-MM-dd HH:mm:ss redis: - # 平阴cluster模式下使用cluster:配置段 - # database: @spring.redis.index@ - # host: @spring.redis.host@ - # port: @spring.redis.port@ - # password: @spring.redis.password@ - # timeout: 30s - database: @spring.redis.index@ + host: @spring.redis.host@ + port: @spring.redis.port@ password: @spring.redis.password@ timeout: 30s - cluster: - nodes: @spring.redis.cluster.nodes@ - max-redirects: @spring.redis.cluster.max-redirects@ datasource: druid: #MySQL @@ -120,12 +112,6 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 - threadpool: - default: - coreSize: 20 - maximumSize: 50 - maxQueueSize: 500 - queueSizeRejectionThreshold: 200 ribbon: ReadTimeout: 300000 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenPyHistoryScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenPyHistoryScoreDao.xml index c8d61d6d6d..1b311eb25c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenPyHistoryScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenPyHistoryScoreDao.xml @@ -58,7 +58,7 @@ SELECT - id, customer_id, user_id, user_account, real_name, gender, mobile, active_flag, active_time, enable_flag, password, id_card + * FROM customer_staff WHERE del_flag='0' AND customer_id = #{customerId} AND user_account = #{userAccount} + ORDER BY active_time DESC, created_time ASC diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index 3a65fd24e9..b3e82440ef 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -130,9 +130,9 @@ - + - ${subCondition.tableName}.${colValue} ='1' + and ${subCondition.tableName}.${colValue} ='1'