添加ssl证书

This commit is contained in:
2025-08-11 08:38:28 +08:00
parent 5b4d2afc5a
commit 6985cf39aa
7 changed files with 120 additions and 18 deletions

View File

@ -109,7 +109,7 @@ public class CourseController {
public BaseResponse<List<CourseCardVO>> miniQueryCourseByKeyword(@Valid @RequestBody CommonStringRequest commonStringRequest) {
String keyword = commonStringRequest.getTemplateString();
LambdaQueryWrapper<Course> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(Course::getIsShelves, true);
lambdaQueryWrapper.eq(Course::getIsShelves, 1);
lambdaQueryWrapper.like(Course::getName, keyword);
List<Course> courseList = courseService.list(lambdaQueryWrapper);
List<CourseCardVO> courseCardVOS = commonService.convertList(courseList, CourseCardVO.class);

View File

@ -174,7 +174,7 @@ public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo>
LambdaQueryWrapper<UserInfo> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(UserInfo::getNickName, nickName).eq(UserInfo::getUserRole, UserConstant.SUPERVISOR_ROLE);
UserInfo userInfo = this.getOne(lambdaQueryWrapper);
ThrowUtils.throwIf(userInfo != null, ErrorCode.OPERATION_ERROR, "昵称重复");
ThrowUtils.throwIf(userInfo != null, ErrorCode.OPERATION_ERROR, "昵称已存在");
}
// 根据邀请码获得上级用户信息
@ -371,9 +371,11 @@ public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo>
phoneNumberLambdaQueryWrapper.eq(UserInfo::getPhoneNumber, phoneNumber);
phoneNumberLambdaQueryWrapper = getQueryWrapperByUserRole(userRoleEnum, phoneNumberLambdaQueryWrapper);
UserInfo userInfo = this.getOne(phoneNumberLambdaQueryWrapper);
if (userInfo != null) {
String userRole = userInfo.getUserRole();
UserRoleEnum currentUserRoleEnum = UserRoleEnum.getEnumByValue(userRole);
ThrowUtils.throwIf(userInfo != null, ErrorCode.OPERATION_ERROR, "该手机号为"+ currentUserRoleEnum.getText() +"账号");
throw new BusinessException(ErrorCode.OPERATION_ERROR, "该手机号为"+ currentUserRoleEnum.getText() +"账号");
}
}
String code = redisTemplate.opsForValue().get(SystemConstant.VERIFICATION_CODE + ":" + verificationCode);
ThrowUtils.throwIf(code == null, ErrorCode.OPERATION_ERROR, "验证码已失效");

View File

@ -0,0 +1,112 @@
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://160.202.242.36:3306/qingcheng_test?serverTimezone=Asia/Shanghai
username: qingcheng
password: Qc@8ls2jf
hikari:
maximum-pool-size: 300
max-lifetime: 120000
rabbitmq:
host: 160.202.242.36
port: 5672
username: qingcheng
password: cksys6509
virtual-host: vhost-test
listener:
simple:
prefetch: 1
data:
redis:
port: 6379
host: 160.202.242.36
database: 8
password: Cksys6509
servlet:
multipart:
max-file-size: 20MB
max-request-size: 20MB
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
# 文件上传和下载地址
file:
upload-dir: /www/wwwroot/fileUpload_qc/
# upload-dir: D:/qingcheng/image/
springdoc:
default-flat-param-object: true
#线程池配置
threadpool:
corePoolSize: 10
maxPoolSize: 50
queueCapacity: 1024
keepAliveTime: 60
server:
port: 9092
ssl:
key-store: classpath:static/www.chenxinzhi.top.jks
key-store-password: 3fqodotz
key-store-type: JKS
mybatis-plus:
mapper-locations: classpath:mapper/*.xml
configuration:
map-underscore-to-camel-case: false
# log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
global-config:
db-config:
logic-delete-field: isDelete #全局逻辑删除的实体字段名
logic-delete-value: 1 #逻辑已删除值(默认为1)
logic-not-delete-value: 0 #逻辑未删除值(默认为0)
type-handlers-package: com.cultural.heritage.handler
wx:
mini:
appId: wx3f968a09e31d6bed
appSecret: 0b23498d19665dc323efdd3ed5367041
pay:
#应用id小程序id
appId: wx61b63e27bddf4ea2
#商户号
merchantId: 1700326544
#商户API私钥
privateKeyPath: apiclient_key.pem
#商户证书序列号
merchantSerialNumber: 6DC8953AB741D309920DA650B92F837BE38A2757
#商户APIv3密钥
apiV3Key: fbemuj4Xql7CYlQJAoTEPYxvPSNgYT2t
#通知地址
notifyUrl: https://winning-mouse-internally.ngrok-free.app
#微信服务器地址
domain: https://api.mch.weixin.qq.com
#商户APIv2密钥
apiV2Key: cvsOH6TgbbdNUUqFJyLmWGaIEKoSqANg
#商户API证书
certificatePath: static/apiclient_cert.p12
knife4j:
enable: true

View File

@ -1,4 +1,4 @@
spring:
profiles:
active: test
active: prod

View File

@ -1,12 +0,0 @@
$libDir = "D:\青橙\backend\src\main\resources\lib" # 使用绝对路径指定 lib 目录
$repositoryDir = "D:\software\Maven\maven-repository" # 设置自定义仓库目录
# 遍历 lib 目录下的所有 JAR 文件并安装到指定的仓库
Get-ChildItem -Path $libDir -Filter "*.jar" | ForEach-Object {
mvn install:install-file -Dfile=$_.FullName `
-DgroupId=com.example `
-DartifactId=$($_.BaseName) `
-Dversion=1.0 `
-Dpackaging=jar `
-DlocalRepositoryPath=$repositoryDir
}

Binary file not shown.