From 394dae06d2f8d0f85231079161c52bddf829a469 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Fri, 25 Aug 2023 14:14:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E6=94=B6=E6=8E=A8=E9=80=81=E7=9A=84?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=BD=92=E9=9B=86=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov/manage/GovProjectCollectionManage.java | 12 +++- .../utils/GenerateProjectCodeUtil.java | 1 - .../pmapi/projectlib/model/req/ProjectListReq.java | 1 - pmapi/src/main/resources/application-dev.yml | 3 + pmapi/src/main/resources/application-pre.yml | 3 + pmapi/src/main/resources/application-prod.yml | 3 + pmapi/src/test/resources/application-dev.yml | 73 +++++++------------ pmapi/src/test/resources/application-pre.yml | 72 +++++++------------ pmapi/src/test/resources/application-prod.yml | 83 +++++++++------------- 9 files changed, 104 insertions(+), 147 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/gov/manage/GovProjectCollectionManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/gov/manage/GovProjectCollectionManage.java index 8bc45a8..d0d9fe0 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/gov/manage/GovProjectCollectionManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/gov/manage/GovProjectCollectionManage.java @@ -13,7 +13,6 @@ import com.ningdatech.pmapi.gov.contants.BizProjectContant; import com.ningdatech.pmapi.gov.convert.ProjectConvert; import com.ningdatech.pmapi.gov.model.dto.*; import com.ningdatech.pmapi.gov.model.entity.*; -import com.ningdatech.pmapi.gov.model.req.ProjectApplyReq; import com.ningdatech.pmapi.gov.model.req.ProjectBaseInfoReq; import com.ningdatech.pmapi.gov.model.req.ProjectPushReq; import com.ningdatech.pmapi.gov.model.vo.*; @@ -23,6 +22,7 @@ import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Value; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Component; import org.springframework.web.client.RestTemplate; @@ -62,6 +62,12 @@ public class GovProjectCollectionManage { private final RestTemplate restTemplate; + @Value("${project.push-url}") + private String pushUrl; + + @Value("${project.no-effective-url}") + private String noEffectiveUrl; + public List dictionary(String type) { List dictionaries = dictionaryService.list(Wrappers.lambdaQuery(GovProjectDictionary.class) @@ -384,7 +390,7 @@ public class GovProjectCollectionManage { * @param saveDTO */ private void pushProject(GovBizProjectSaveDTO saveDTO) { - String url = BizProjectContant.PUSH_URL; + String url = pushUrl; ProjectPushReq req = ProjectConvert.convert(saveDTO); try{ ResponseEntity response = restTemplate.postForEntity(url, null, String.class, req); @@ -399,7 +405,7 @@ public class GovProjectCollectionManage { * @param baseinfo */ private void notEffectiveProject(GovBizProjectBaseinfoDTO baseinfo) { - String url = BizProjectContant.NOT_EFFECTIVE_URL; + String url = noEffectiveUrl; baseinfo.setIsEffective(BizProjectContant.NOT_EFFECTIVE_CODE); ProjectBaseInfoReq req = ProjectConvert.convertBase(baseinfo); try{ diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/utils/GenerateProjectCodeUtil.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/utils/GenerateProjectCodeUtil.java index 72f816a..9e9dd42 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/utils/GenerateProjectCodeUtil.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/utils/GenerateProjectCodeUtil.java @@ -7,7 +7,6 @@ import com.ningdatech.pmapi.gov.model.dto.GovBizProjectApplyDTO; import com.ningdatech.pmapi.gov.model.dto.GovBizProjectBaseinfoDTO; import com.ningdatech.pmapi.gov.model.dto.GovBizProjectSaveDTO; import com.ningdatech.pmapi.gov.model.entity.GovBizProjectApply; -import com.ningdatech.pmapi.gov.model.entity.GovBizProjectBaseinfo; import com.ningdatech.pmapi.gov.service.IGovBizProjectApplyService; import com.ningdatech.pmapi.projectdeclared.contants.ProjectCodeContant; import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectListReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectListReq.java index 15495fe..4477a72 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectListReq.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectListReq.java @@ -2,7 +2,6 @@ package com.ningdatech.pmapi.projectlib.model.req; import com.ningdatech.basic.model.PagePo; import com.ningdatech.pmapi.common.enumeration.ExportOptionEnum; -import com.ningdatech.pmapi.projectlib.enumeration.ProjectLibFlagEnum; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.*; diff --git a/pmapi/src/main/resources/application-dev.yml b/pmapi/src/main/resources/application-dev.yml index 2e4e1ea..c22d9c3 100644 --- a/pmapi/src/main/resources/application-dev.yml +++ b/pmapi/src/main/resources/application-dev.yml @@ -230,6 +230,9 @@ irs: request-token-url: https://interface.ls.local/a/api/requestTokenKey?appKey={appKey}&requestTime={requestTime}&sign={sign} refresh-token-url: https://interface.ls.local/a/api/refreshTokenKey?appKey={appKey}&requestTime={requestTime}&sign={sign} hostname: iZbp13nwyvib53j4j1p2xoZ +project: + push-url: http://120.26.44.207:38088/syn-data-task/open/api/v1/project-receive/save + no-effective-url: http://120.26.44.207:38088/syn-data-task/open/api/v1/project-receive/not-effective login: phone-verify-code: diff --git a/pmapi/src/main/resources/application-pre.yml b/pmapi/src/main/resources/application-pre.yml index 12fd35d..96290d9 100644 --- a/pmapi/src/main/resources/application-pre.yml +++ b/pmapi/src/main/resources/application-pre.yml @@ -233,6 +233,9 @@ irs: request-token-url: https://interface.ls.local/a/api/requestTokenKey?appKey={appKey}&requestTime={requestTime}&sign={sign} refresh-token-url: https://interface.ls.local/a/api/refreshTokenKey?appKey={appKey}&requestTime={requestTime}&sign={sign} hostname: iZ6mx01asxnsmennpzoxooZ +project: + push-url: http://10.53.168.41:38088/syn-data-task/open/api/v1/project-receive/save + no-effective-url: http://10.53.168.41:38088/syn-data-task/open/api/v1/project-receive/not-effective login: phone-verify-code: skip: true diff --git a/pmapi/src/main/resources/application-prod.yml b/pmapi/src/main/resources/application-prod.yml index 48fae2a..2d0e9a9 100644 --- a/pmapi/src/main/resources/application-prod.yml +++ b/pmapi/src/main/resources/application-prod.yml @@ -233,6 +233,9 @@ irs: request-token-url: https://interface.ls.local/a/api/requestTokenKey?appKey={appKey}&requestTime={requestTime}&sign={sign} refresh-token-url: https://interface.ls.local/a/api/refreshTokenKey?appKey={appKey}&requestTime={requestTime}&sign={sign} hostname: iZ6mx01gyeodd80imxd2gbZ +project: + push-url: http://10.53.168.41:38088/syn-data-task/open/api/v1/project-receive/save + no-effective-url: http://10.53.168.41:38088/syn-data-task/open/api/v1/project-receive/not-effective login: phone-verify-code: skip: true diff --git a/pmapi/src/test/resources/application-dev.yml b/pmapi/src/test/resources/application-dev.yml index f1cf086..c22d9c3 100644 --- a/pmapi/src/test/resources/application-dev.yml +++ b/pmapi/src/test/resources/application-dev.yml @@ -41,53 +41,29 @@ spring: hibernate: ddl-auto: update datasource: - type: com.alibaba.druid.pool.DruidDataSource + type: com.zaxxer.hikari.HikariDataSource driverClassName: com.kingbase8.Driver + url: jdbc:kingbase8://120.26.44.207:54321/nd_project_management?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8 + username: SYSTEM + password: Ndkj1234 # 数据源 - druid: - url: jdbc:kingbase8://120.26.44.207:54321/nd_project_management?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8 - username: SYSTEM - password: Ndkj1234 - # 初始连接数 - initialSize: 5 - # 最小连接池数量 - minIdle: 10 - # 最大连接池数量 - maxActive: 20 - # 配置获取连接等待超时的时间 - maxWait: 60000 - # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 - timeBetweenEvictionRunsMillis: 60000 - # 配置一个连接在池中最小生存的时间,单位是毫秒 - minEvictableIdleTimeMillis: 300000 - # 配置一个连接在池中最大生存的时间,单位是毫秒 - maxEvictableIdleTimeMillis: 900000 - # 配置检测连接是否有效 - #mysql使用:SELECT 1 FROM DUAL - validationQuery: SELECT 1 - testWhileIdle: true - testOnBorrow: false - testOnReturn: false - webStatFilter: - enabled: true - statViewServlet: - enabled: true - # 设置白名单,不填则允许所有访问 - allow: - url-pattern: /druid/* - # 控制台管理用户名和密码 - login-username: admin - login-password: admin - filter: - stat: - enabled: true - # 慢SQL记录 - log-slow-sql: true - slow-sql-millis: 1000 - merge-sql: true - wall: - config: - multi-statement-allow: true + hikari: + # 是客户端等待连接池连接的最大毫秒数 + connection-timeout: 30000 + # 是允许连接在连接池中空闲的最长时间 + minimum-idle: 5 + # 配置最大池大小 + maximum-pool-size: 20 + # 是允许连接在连接池中空闲的最长时间(以毫秒为单位) + idle-timeout: 60000 + # 池中连接关闭后的最长生命周期(以毫秒为单位) + max-lifetime: 600000 + # 配置从池返回的连接的默认自动提交行为。默认值为true。 + auto-commit: true + # 开启连接监测泄露 + leak-detection-threshold: 5000 + # 测试连接数据库 + connection-test-query: SELECT 1 #设置上传 单个文件的大小 servlet: multipart: @@ -182,7 +158,7 @@ organization: - GO_ff70e47bae684fdba0d64f4acab85661 yxt: - # wsdl-url: http://115.239.137.23:9501/ws/v1?wsdl +# wsdl-url: http://115.239.137.23:9501/ws/v1?wsdl wsdl-url: classpath:/wsdl.xml #账号 user-code: hzndkj @@ -194,7 +170,7 @@ yxt: #省局联审 请求信息 provincial: - # host: http://zj.ningdatech.com/prometheus-zhejiang_foreign +# host: http://zj.ningdatech.com/prometheus-zhejiang_foreign host: http://223.4.72.75/prometheus-zhejiang_foreign pushUrl: /api/v1/foreign/importantPro detailUrl: /api/v1/foreign/importantProView @@ -254,6 +230,9 @@ irs: request-token-url: https://interface.ls.local/a/api/requestTokenKey?appKey={appKey}&requestTime={requestTime}&sign={sign} refresh-token-url: https://interface.ls.local/a/api/refreshTokenKey?appKey={appKey}&requestTime={requestTime}&sign={sign} hostname: iZbp13nwyvib53j4j1p2xoZ +project: + push-url: http://120.26.44.207:38088/syn-data-task/open/api/v1/project-receive/save + no-effective-url: http://120.26.44.207:38088/syn-data-task/open/api/v1/project-receive/not-effective login: phone-verify-code: diff --git a/pmapi/src/test/resources/application-pre.yml b/pmapi/src/test/resources/application-pre.yml index 6319487..96290d9 100644 --- a/pmapi/src/test/resources/application-pre.yml +++ b/pmapi/src/test/resources/application-pre.yml @@ -40,53 +40,29 @@ spring: hibernate: ddl-auto: update datasource: - type: com.alibaba.druid.pool.DruidDataSource + type: com.zaxxer.hikari.HikariDataSource driverClassName: com.kingbase8.Driver + url: jdbc:kingbase8://10.53.168.41:54321/nd_project_management?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&nullCatalogMeansCurrent=true + username: SYSTEM + password: Ndkj1234 # 数据源 - druid: - url: jdbc:kingbase8://10.53.168.41:54321/nd_project_management?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&nullCatalogMeansCurrent=true - username: SYSTEM - password: Ndkj1234 - # 初始连接数 - initialSize: 5 - # 最小连接池数量 - minIdle: 10 - # 最大连接池数量 - maxActive: 20 - # 配置获取连接等待超时的时间 - maxWait: 60000 - # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 - timeBetweenEvictionRunsMillis: 60000 - # 配置一个连接在池中最小生存的时间,单位是毫秒 - minEvictableIdleTimeMillis: 300000 - # 配置一个连接在池中最大生存的时间,单位是毫秒 - maxEvictableIdleTimeMillis: 900000 - # 配置检测连接是否有效 - #mysql使用:SELECT 1 FROM DUAL - validationQuery: SELECT 1 - testWhileIdle: true - testOnBorrow: false - testOnReturn: false - webStatFilter: - enabled: true - statViewServlet: - enabled: true - # 设置白名单,不填则允许所有访问 - allow: - url-pattern: /druid/* - # 控制台管理用户名和密码 - login-username: admin - login-password: admin - filter: - stat: - enabled: true - # 慢SQL记录 - log-slow-sql: true - slow-sql-millis: 1000 - merge-sql: true - wall: - config: - multi-statement-allow: true + hikari: + # 是客户端等待连接池连接的最大毫秒数 + connection-timeout: 30000 + # 是允许连接在连接池中空闲的最长时间 + minimum-idle: 10 + # 配置最大池大小 + maximum-pool-size: 20 + # 是允许连接在连接池中空闲的最长时间(以毫秒为单位) + idle-timeout: 60000 + # 池中连接关闭后的最长生命周期(以毫秒为单位) + max-lifetime: 600000 + # 配置从池返回的连接的默认自动提交行为。默认值为true。 + auto-commit: true + # 开启连接监测泄露 + leak-detection-threshold: 5000 + # 测试连接数据库 + connection-test-query: SELECT 1 #设置上传 单个文件的大小 servlet: multipart: @@ -145,7 +121,7 @@ flowable: async-executor-activate: true #关闭一些不需要的功能服务 rest-api-enabled: false - # database-schema-update: false +# database-schema-update: false idm: enabled: false common: @@ -257,6 +233,10 @@ irs: request-token-url: https://interface.ls.local/a/api/requestTokenKey?appKey={appKey}&requestTime={requestTime}&sign={sign} refresh-token-url: https://interface.ls.local/a/api/refreshTokenKey?appKey={appKey}&requestTime={requestTime}&sign={sign} hostname: iZ6mx01asxnsmennpzoxooZ +project: + push-url: http://10.53.168.41:38088/syn-data-task/open/api/v1/project-receive/save + no-effective-url: http://10.53.168.41:38088/syn-data-task/open/api/v1/project-receive/not-effective login: phone-verify-code: skip: true + url: http://60.188.225.145:8080/login diff --git a/pmapi/src/test/resources/application-prod.yml b/pmapi/src/test/resources/application-prod.yml index 17f34d4..2d0e9a9 100644 --- a/pmapi/src/test/resources/application-prod.yml +++ b/pmapi/src/test/resources/application-prod.yml @@ -13,9 +13,9 @@ spring: namespace: "spring:session" redis: timeout: 5000 - host: 47.98.125.47 - port: 26379 - database: 4 + host: localhost + port: 6379 + database: 0 password: Ndkj1234 jedis: pool: @@ -40,53 +40,29 @@ spring: hibernate: ddl-auto: update datasource: - type: com.alibaba.druid.pool.DruidDataSource + type: com.zaxxer.hikari.HikariDataSource driverClassName: com.kingbase8.Driver + url: jdbc:kingbase8://10.53.172.221:54321/nd_project_management?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&nullCatalogMeansCurrent=true + username: SYSTEM + password: Ndkj1234 # 数据源 - druid: - url: jdbc:kingbase8://10.53.172.221:54321/nd_project_management?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&nullCatalogMeansCurrent=true - username: SYSTEM - password: Ndkj1234 - # 初始连接数 - initialSize: 5 - # 最小连接池数量 - minIdle: 10 - # 最大连接池数量 - maxActive: 20 - # 配置获取连接等待超时的时间 - maxWait: 60000 - # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 - timeBetweenEvictionRunsMillis: 60000 - # 配置一个连接在池中最小生存的时间,单位是毫秒 - minEvictableIdleTimeMillis: 300000 - # 配置一个连接在池中最大生存的时间,单位是毫秒 - maxEvictableIdleTimeMillis: 900000 - # 配置检测连接是否有效 - #mysql使用:SELECT 1 FROM DUAL - validationQuery: SELECT 1 - testWhileIdle: true - testOnBorrow: false - testOnReturn: false - webStatFilter: - enabled: true - statViewServlet: - enabled: true - # 设置白名单,不填则允许所有访问 - allow: - url-pattern: /druid/* - # 控制台管理用户名和密码 - login-username: admin - login-password: admin - filter: - stat: - enabled: true - # 慢SQL记录 - log-slow-sql: true - slow-sql-millis: 1000 - merge-sql: true - wall: - config: - multi-statement-allow: true + hikari: + # 是客户端等待连接池连接的最大毫秒数 + connection-timeout: 30000 + # 是允许连接在连接池中空闲的最长时间 + minimum-idle: 10 + # 配置最大池大小 + maximum-pool-size: 20 + # 是允许连接在连接池中空闲的最长时间(以毫秒为单位) + idle-timeout: 60000 + # 池中连接关闭后的最长生命周期(以毫秒为单位) + max-lifetime: 600000 + # 配置从池返回的连接的默认自动提交行为。默认值为true。 + auto-commit: true + # 开启连接监测泄露 + leak-detection-threshold: 5000 + # 测试连接数据库 + connection-test-query: SELECT 1 #设置上传 单个文件的大小 servlet: multipart: @@ -145,7 +121,7 @@ flowable: async-executor-activate: true #关闭一些不需要的功能服务 rest-api-enabled: false -# database-schema-update: false + # database-schema-update: false idm: enabled: false common: @@ -209,6 +185,11 @@ provincial: #天印服务器接口信息 irs: is-search-app: true + digital-resource-indicators: + url: https://interface.zjzwfw.gov.cn/gateway/api/proxy/001003001029/dataSharing/99E2bic31KdXzaa7.htm + interfaceName: 99E2bic31KdXzaa7 + app-key: A331101453557202109017383 + app-secret: 496f0f2a19994f76b4fd9dae087366c7 seal-platform: project-id: 330001110 project-secret: 70e512d40c8f440484db4acab181570a @@ -252,6 +233,10 @@ irs: request-token-url: https://interface.ls.local/a/api/requestTokenKey?appKey={appKey}&requestTime={requestTime}&sign={sign} refresh-token-url: https://interface.ls.local/a/api/refreshTokenKey?appKey={appKey}&requestTime={requestTime}&sign={sign} hostname: iZ6mx01gyeodd80imxd2gbZ +project: + push-url: http://10.53.168.41:38088/syn-data-task/open/api/v1/project-receive/save + no-effective-url: http://10.53.168.41:38088/syn-data-task/open/api/v1/project-receive/not-effective login: phone-verify-code: skip: true + url: http://60.188.225.145/login