From e1b007a55341dfc3a61266a646d417d91c9b195a Mon Sep 17 00:00:00 2001 From: WendyYang Date: Thu, 17 Aug 2023 17:28:24 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=93=E5=AE=B6?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E5=A2=9E=E5=8A=A0=E6=9D=A1=E7=BA=BF=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ningda-generator/pom.xml | 2 +- pmapi/pom.xml | 11 +---------- .../expert/assembler/ExpertInfoCmdAssembler.java | 1 + .../expert/assembler/ExpertUserInfoAssembler.java | 11 ++++++----- .../pmapi/expert/entity/ExpertGovBusinessStrip.java | 10 ++++++++++ .../pmapi/expert/model/ExpertJobInfo.java | 5 +++++ .../pmapi/expert/model/cmd/ExpertInfoModifyCmd.java | 3 +++ .../expert/model/dto/ExpertFullInfoAllDTO.java | 3 +++ .../service/IExpertGovBusinessStripService.java | 8 +++++++- .../expert/service/impl/ExpertInfoServiceImpl.java | 21 +++++++++++++++++++-- .../pmapi/gov/model/vo/GovBusinessStripVO.java | 2 +- pom.xml | 8 +------- 12 files changed, 58 insertions(+), 27 deletions(-) diff --git a/ningda-generator/pom.xml b/ningda-generator/pom.xml index e2362fc..61c61c4 100644 --- a/ningda-generator/pom.xml +++ b/ningda-generator/pom.xml @@ -19,7 +19,7 @@ com.baomidou mybatis-plus-generator - 3.5.1 + 3.5.3.2 org.freemarker diff --git a/pmapi/pom.xml b/pmapi/pom.xml index 9954d4d..67b6777 100644 --- a/pmapi/pom.xml +++ b/pmapi/pom.xml @@ -128,11 +128,7 @@ org.springframework.boot spring-boot-starter-test - - - org.mapstruct - mapstruct - 1.5.3.Final + test @@ -141,11 +137,6 @@ 3.10.3 - org.mapstruct - mapstruct-processor - 1.5.3.Final - - org.springframework.boot spring-boot-configuration-processor diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertInfoCmdAssembler.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertInfoCmdAssembler.java index 224d990..b34e3fb 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertInfoCmdAssembler.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertInfoCmdAssembler.java @@ -254,6 +254,7 @@ public class ExpertInfoCmdAssembler { expertInfoModifyCmd.setExpertIntentionWorkRegionInfo(expertIntentionWorkRegionInfo); expertInfoModifyCmd.setExpertAvoidCompanyList(expertAvoidCompanyList); expertInfoModifyCmd.setExpertInfoSensitiveFieldCheckBO(expertInfoSensitiveFieldCheckBO); + expertInfoModifyCmd.setBusinessStrips(expertJobInfo.getBusinessStrips()); return expertInfoModifyCmd; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertUserInfoAssembler.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertUserInfoAssembler.java index 859d5bd..c6f6ccb 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertUserInfoAssembler.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertUserInfoAssembler.java @@ -1,6 +1,7 @@ package com.ningdatech.pmapi.expert.assembler; +import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONObject; @@ -9,13 +10,11 @@ import com.ningdatech.pmapi.common.enumeration.BoolDisplayEnum; import com.ningdatech.pmapi.common.helper.RegionCacheHelper; import com.ningdatech.pmapi.common.model.FileBasicInfo; import com.ningdatech.pmapi.expert.constant.ExpertApplyTypeEnum; -import com.ningdatech.pmapi.expert.entity.ExpertAvoidCompany; -import com.ningdatech.pmapi.expert.entity.ExpertIntentionWorkRegion; -import com.ningdatech.pmapi.expert.entity.ExpertMetaApply; -import com.ningdatech.pmapi.expert.entity.ExpertUserFullInfo; +import com.ningdatech.pmapi.expert.entity.*; import com.ningdatech.pmapi.expert.model.*; import com.ningdatech.pmapi.expert.model.dto.*; import com.ningdatech.pmapi.expert.model.vo.ExpertFullInfoVO; +import com.ningdatech.pmapi.gov.model.vo.GovBusinessStripVO; import com.ningdatech.pmapi.meta.constant.DictExpertInfoTypeEnum; import com.ningdatech.pmapi.meta.constant.ExpertTagEnum; import com.ningdatech.pmapi.meta.helper.DictionaryCache; @@ -256,7 +255,8 @@ public class ExpertUserInfoAssembler { List expertDictionaryList, List intentionWorkRegionList, List expertMetaApplyList, - List expertAvoidCompanyList) { + List expertAvoidCompanyList, + List businessStrips) { ExpertUserFullInfoDTO expertFullInfoDto = buildExpertUserFullInfoDTO(expertUserFullInfo); List expertDicts = buildExpertDictionaryDTOList(expertDictionaryList); List expertTags = buildExpertTagDTOList(expertTagList); @@ -273,6 +273,7 @@ public class ExpertUserInfoAssembler { expertFullInfoAll.setExpertIntentionWorkRegionInfo(intentionWorkRegions); expertFullInfoAll.setExpertApplyIntentionWorkRegionInfo(applyIntentionWorkRegions); expertFullInfoAll.setExpertAvoidCompanyList(expertAvoidCompanyDTOList); + expertFullInfoAll.setBusinessStrips(BeanUtil.copyToList(businessStrips, GovBusinessStripVO.class)); return expertFullInfoAll; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/entity/ExpertGovBusinessStrip.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/entity/ExpertGovBusinessStrip.java index 31f8cb7..ff5d292 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/entity/ExpertGovBusinessStrip.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/entity/ExpertGovBusinessStrip.java @@ -1,10 +1,13 @@ package com.ningdatech.pmapi.expert.entity; +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; import lombok.Data; import java.io.Serializable; +import java.time.LocalDateTime; /** *

@@ -28,4 +31,11 @@ public class ExpertGovBusinessStrip implements Serializable { private String businessStripName; private Long expertUserId; + + @TableField(fill = FieldFill.INSERT) + private LocalDateTime createOn; + + @TableField(fill = FieldFill.INSERT) + private Long createBy; + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/ExpertJobInfo.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/ExpertJobInfo.java index ae5c920..b2249e9 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/ExpertJobInfo.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/ExpertJobInfo.java @@ -1,5 +1,6 @@ package com.ningdatech.pmapi.expert.model; +import com.ningdatech.pmapi.gov.model.vo.GovBusinessStripVO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -88,4 +89,8 @@ public class ExpertJobInfo { @NotBlank @ApiModelProperty("工作经历") private String experience; + + @ApiModelProperty("专家条线") + private List businessStrips; + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/cmd/ExpertInfoModifyCmd.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/cmd/ExpertInfoModifyCmd.java index 978d955..f13c1ed 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/cmd/ExpertInfoModifyCmd.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/cmd/ExpertInfoModifyCmd.java @@ -3,6 +3,7 @@ package com.ningdatech.pmapi.expert.model.cmd; import com.ningdatech.pmapi.expert.model.bo.ExpertInfoSensitiveFieldCheckBO; import com.ningdatech.pmapi.expert.model.dto.*; +import com.ningdatech.pmapi.gov.model.vo.GovBusinessStripVO; import lombok.Data; import java.util.List; @@ -35,4 +36,6 @@ public class ExpertInfoModifyCmd { private ExpertInfoSensitiveFieldCheckBO expertInfoSensitiveFieldCheckBO; private ModifyApplyExtraInfoDTO modifyApplyExtraInfo; + + private List businessStrips; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/dto/ExpertFullInfoAllDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/dto/ExpertFullInfoAllDTO.java index c7a2d90..0613820 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/dto/ExpertFullInfoAllDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/dto/ExpertFullInfoAllDTO.java @@ -1,5 +1,6 @@ package com.ningdatech.pmapi.expert.model.dto; +import com.ningdatech.pmapi.gov.model.vo.GovBusinessStripVO; import lombok.Data; import java.util.List; @@ -35,5 +36,7 @@ public class ExpertFullInfoAllDTO { */ private List expertAvoidCompanyList; + private List businessStrips; + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/IExpertGovBusinessStripService.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/IExpertGovBusinessStripService.java index b6bb813..7174149 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/IExpertGovBusinessStripService.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/IExpertGovBusinessStripService.java @@ -2,8 +2,8 @@ package com.ningdatech.pmapi.expert.service; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.ningdatech.pmapi.expert.entity.ExpertGovBusinessStrip; import com.baomidou.mybatisplus.extension.service.IService; +import com.ningdatech.pmapi.expert.entity.ExpertGovBusinessStrip; import java.util.Collection; import java.util.List; @@ -25,4 +25,10 @@ public interface IExpertGovBusinessStripService extends IService query = Wrappers.lambdaQuery(ExpertGovBusinessStrip.class) + .eq(ExpertGovBusinessStrip::getExpertUserId, userId); + return remove(query); + } + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertInfoServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertInfoServiceImpl.java index 4000df0..feffb1d 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertInfoServiceImpl.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertInfoServiceImpl.java @@ -1,5 +1,6 @@ package com.ningdatech.pmapi.expert.service.impl; +import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.PhoneUtil; import com.alibaba.fastjson.JSONObject; @@ -76,6 +77,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { private final IExpertSensitiveInfoModifyDetailRecordService iExpertSensitiveInfoModifyDetailRecordService; private final IUserInfoService userInfoService; private final YxtCallOrSmsHelper yxtCallOrSmsHelper; + private final IExpertGovBusinessStripService expertGovBusinessStripService; @Value("${login.url:}") private String loginUrl; @@ -319,8 +321,10 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { List expertAvoidCompanyList = iExpertAvoidCompanyService .list(Wrappers.lambdaQuery(ExpertAvoidCompany.class).eq(ExpertAvoidCompany::getUserId, userId)); + List businessStrips = expertGovBusinessStripService.listByUserIds(Collections.singletonList(userId)); + return ExpertUserInfoAssembler.buildExpertFullInfoAllDTO(expertUserFullInfo, expertTagList, expertDictionaryList - , expertIntentionWorkRegionList, expertMetaApplyList, expertAvoidCompanyList); + , expertIntentionWorkRegionList, expertMetaApplyList, expertAvoidCompanyList, businessStrips); } @@ -454,6 +458,8 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { List expertTagList = iExpertTagService.list(Wrappers.lambdaQuery(ExpertTag.class) .in(ExpertTag::getUserId, userIds)); Map> expertTagListMap = CollUtils.group(expertTagList, ExpertTag::getUserId); + List businessStrips = expertGovBusinessStripService.listByUserIds(userIds); + Map> stripMap = CollUtils.group(businessStrips, ExpertGovBusinessStrip::getExpertUserId); // 所有专家字典字段 List expertDictionaryList = iExpertDictionaryService.list(Wrappers.lambdaQuery(ExpertDictionary.class) .in(ExpertDictionary::getUserId, userIds)); @@ -478,7 +484,8 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { expertDictMap.getOrDefault(w.getUserId(), Collections.emptyList()), intentionRegionMap.getOrDefault(w.getUserId(), Collections.emptyList()), metaApplyMap.getOrDefault(w.getUserId(), Collections.emptyList()), - avoidInfoMap.getOrDefault(w.getUserId(), Collections.emptyList()))) + avoidInfoMap.getOrDefault(w.getUserId(), Collections.emptyList()), + stripMap.getOrDefault(w.getUserId(), Collections.emptyList()))) .collect(Collectors.toList()); } @@ -551,6 +558,16 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { // 重新保存 iExpertAvoidCompanyService.saveBatch(saveExpertAvoidCompanyList); } + // 保存专家条线 + expertGovBusinessStripService.removeByUserId(userId); + if (CollUtil.isNotEmpty(cmd.getBusinessStrips())) { + List strips = CollUtils.convert(cmd.getBusinessStrips(), w -> { + ExpertGovBusinessStrip strip = BeanUtil.copyProperties(w, ExpertGovBusinessStrip.class); + strip.setExpertUserId(userId); + return strip; + }); + expertGovBusinessStripService.saveBatch(strips); + } // 敏感字段申请 ExpertInfoSensitiveFieldCheckBO expertInfoSensitiveFieldCheckBO = cmd.getExpertInfoSensitiveFieldCheckBO(); ModifyApplyExtraInfoDTO modifyApplyExtraInfo = cmd.getModifyApplyExtraInfo(); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/gov/model/vo/GovBusinessStripVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/gov/model/vo/GovBusinessStripVO.java index 291153a..5189107 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/gov/model/vo/GovBusinessStripVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/gov/model/vo/GovBusinessStripVO.java @@ -9,7 +9,7 @@ import lombok.Data; * @since 2023-03-08 */ @Data -@ApiModel(value = "条线VO", description = "") +@ApiModel(value = "条线VO") public class GovBusinessStripVO { @ApiModelProperty("条线code") diff --git a/pom.xml b/pom.xml index 98d83fe..ef68ce9 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 1.8 3.7.0 1.2.8 - 3.5.1 + 3.5.3.2 3.0.0 3.0.3 1.2.83 @@ -51,12 +51,6 @@ fastjson ${fastjson.version} - - - nl.basjes.parse.useragent - yauaa - ${useragent.yauaa} - org.springframework.boot spring-boot-dependencies From 14e3819ac47afb62a7c79d351fd70516345710c1 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Thu, 17 Aug 2023 17:30:29 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=93=E5=AE=B6?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E5=A2=9E=E5=8A=A0=E6=9D=A1=E7=BA=BF=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pmapi/pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/pmapi/pom.xml b/pmapi/pom.xml index 67b6777..3a80c2d 100644 --- a/pmapi/pom.xml +++ b/pmapi/pom.xml @@ -128,7 +128,6 @@ org.springframework.boot spring-boot-starter-test - test From d27d9023e53609025f87111a7906d57700b4e1c8 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Thu, 17 Aug 2023 17:39:55 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=93=E5=AE=B6?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E5=A2=9E=E5=8A=A0=E6=9D=A1=E7=BA=BF=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pmapi/pom.xml | 11 ++++++++++- pom.xml | 5 +++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/pmapi/pom.xml b/pmapi/pom.xml index 3a80c2d..7cb050b 100644 --- a/pmapi/pom.xml +++ b/pmapi/pom.xml @@ -38,7 +38,10 @@ org.springframework.boot spring-boot-starter-data-redis - + + com.baomidou + mybatis-plus-extension + org.springframework.session spring-session-data-redis @@ -209,6 +212,12 @@ com.ningdatech nd-flowable-starter + + + com.baomidou + mybatis-plus-boot-starter + + diff --git a/pom.xml b/pom.xml index ef68ce9..dc86d2d 100644 --- a/pom.xml +++ b/pom.xml @@ -81,6 +81,11 @@ 1.0.0 + com.baomidou + mybatis-plus-extension + ${mybatis.plus.version} + + com.ningdatech nd-swagger2-starter 1.0.0 From 35076d6324ac80586e0e124398951ac05ddca766 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Thu, 17 Aug 2023 17:55:38 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E6=B1=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pmapi/pom.xml | 4 -- pmapi/src/main/resources/application-dev.yml | 66 +++++++++----------------- pmapi/src/main/resources/application-pre.yml | 66 +++++++++----------------- pmapi/src/main/resources/application-prod.yml | 68 +++++++++------------------ pom.xml | 13 ----- 5 files changed, 64 insertions(+), 153 deletions(-) diff --git a/pmapi/pom.xml b/pmapi/pom.xml index 7cb050b..3be8a63 100644 --- a/pmapi/pom.xml +++ b/pmapi/pom.xml @@ -88,10 +88,6 @@ true - com.alibaba - druid-spring-boot-starter - - org.springframework.boot spring-boot-starter-aop diff --git a/pmapi/src/main/resources/application-dev.yml b/pmapi/src/main/resources/application-dev.yml index 99c66e3..2c26136 100644 --- a/pmapi/src/main/resources/application-dev.yml +++ b/pmapi/src/main/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: diff --git a/pmapi/src/main/resources/application-pre.yml b/pmapi/src/main/resources/application-pre.yml index 203a5ec..feb4beb 100644 --- a/pmapi/src/main/resources/application-pre.yml +++ b/pmapi/src/main/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: diff --git a/pmapi/src/main/resources/application-prod.yml b/pmapi/src/main/resources/application-prod.yml index b2ab273..3ea6380 100644 --- a/pmapi/src/main/resources/application-prod.yml +++ b/pmapi/src/main/resources/application-prod.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.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: diff --git a/pom.xml b/pom.xml index dc86d2d..53b5c4e 100644 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,6 @@ 1.8 1.8 3.7.0 - 1.2.8 3.5.3.2 3.0.0 3.0.3 @@ -25,7 +24,6 @@ 31.1-jre 2.11.1 6.11 - 1.2.8 2.6.3 @@ -37,11 +35,6 @@ 5.2.2 - com.alibaba - druid-spring-boot-starter - ${druid.version} - - org.apache.poi poi-ooxml 5.2.2 @@ -58,12 +51,6 @@ pom import - - - com.alibaba - druid - ${com.alibaba.druid.version} - com.baomidou From e5d7cffd13e6b45f88ee02962bc9cf2866c6d9e9 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Thu, 17 Aug 2023 18:01:35 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E6=B1=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pmapi/pom.xml | 4 ++++ pom.xml | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pmapi/pom.xml b/pmapi/pom.xml index ee19743..c89e950 100644 --- a/pmapi/pom.xml +++ b/pmapi/pom.xml @@ -213,6 +213,10 @@ com.baomidou mybatis-plus-boot-starter + + com.alibaba + druid-spring-boot-starter + diff --git a/pom.xml b/pom.xml index 53b5c4e..f390a92 100644 --- a/pom.xml +++ b/pom.xml @@ -23,8 +23,6 @@ 1.2.83 31.1-jre 2.11.1 - 6.11 - 2.6.3 From 24793de25e4f7f29c6e45c8819ffd2b05fd1bad9 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Thu, 17 Aug 2023 17:42:35 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=93=E5=AE=B6?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E5=A2=9E=E5=8A=A0=E6=9D=A1=E7=BA=BF=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java b/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java index 414a8b0..996322b 100644 --- a/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java +++ b/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java @@ -41,7 +41,7 @@ public class GeneratorCodeKingbaseConfig { // 设置父包模块名 .moduleName("pmapi." + packageName) // 设置mapperXml生成路径 - .pathInfo(Collections.singletonMap(OutputFile.mapperXml, + .pathInfo(Collections.singletonMap(OutputFile.xml, //设置自己的生成路径 path + "/com/ningdatech/pmapi/" + packageName + "/mapper")); })