diff --git a/src/main/java/com/greenorange/promotion/controller/course/CourseController.java b/src/main/java/com/greenorange/promotion/controller/course/CourseController.java index 432f914..afcf3cc 100644 --- a/src/main/java/com/greenorange/promotion/controller/course/CourseController.java +++ b/src/main/java/com/greenorange/promotion/controller/course/CourseController.java @@ -109,7 +109,7 @@ public class CourseController { public BaseResponse> miniQueryCourseByKeyword(@Valid @RequestBody CommonStringRequest commonStringRequest) { String keyword = commonStringRequest.getTemplateString(); LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); - lambdaQueryWrapper.eq(Course::getIsShelves, true); + lambdaQueryWrapper.eq(Course::getIsShelves, 1); lambdaQueryWrapper.like(Course::getName, keyword); List courseList = courseService.list(lambdaQueryWrapper); List courseCardVOS = commonService.convertList(courseList, CourseCardVO.class); diff --git a/src/main/java/com/greenorange/promotion/service/userInfo/impl/UserInfoServiceImpl.java b/src/main/java/com/greenorange/promotion/service/userInfo/impl/UserInfoServiceImpl.java index b7c6661..586a875 100644 --- a/src/main/java/com/greenorange/promotion/service/userInfo/impl/UserInfoServiceImpl.java +++ b/src/main/java/com/greenorange/promotion/service/userInfo/impl/UserInfoServiceImpl.java @@ -174,7 +174,7 @@ public class UserInfoServiceImpl extends ServiceImpl LambdaQueryWrapper 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 phoneNumberLambdaQueryWrapper.eq(UserInfo::getPhoneNumber, phoneNumber); phoneNumberLambdaQueryWrapper = getQueryWrapperByUserRole(userRoleEnum, phoneNumberLambdaQueryWrapper); UserInfo userInfo = this.getOne(phoneNumberLambdaQueryWrapper); - String userRole = userInfo.getUserRole(); - UserRoleEnum currentUserRoleEnum = UserRoleEnum.getEnumByValue(userRole); - ThrowUtils.throwIf(userInfo != null, ErrorCode.OPERATION_ERROR, "该手机号为"+ currentUserRoleEnum.getText() +"账号"); + if (userInfo != null) { + String userRole = userInfo.getUserRole(); + UserRoleEnum currentUserRoleEnum = UserRoleEnum.getEnumByValue(userRole); + throw new BusinessException(ErrorCode.OPERATION_ERROR, "该手机号为"+ currentUserRoleEnum.getText() +"账号"); + } } String code = redisTemplate.opsForValue().get(SystemConstant.VERIFICATION_CODE + ":" + verificationCode); ThrowUtils.throwIf(code == null, ErrorCode.OPERATION_ERROR, "验证码已失效"); diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml new file mode 100644 index 0000000..2d24858 --- /dev/null +++ b/src/main/resources/application-prod.yml @@ -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 \ No newline at end of file diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index a17ec4c..fadf7d2 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,4 +1,4 @@ spring: profiles: - active: test + active: prod diff --git a/src/main/resources/static/chenxinzhi.top.jks b/src/main/resources/static/chenxinzhi.top.jks deleted file mode 100644 index 2dd0ff6..0000000 Binary files a/src/main/resources/static/chenxinzhi.top.jks and /dev/null differ diff --git a/src/main/resources/static/install-libs.ps1 b/src/main/resources/static/install-libs.ps1 deleted file mode 100644 index 667dbf2..0000000 --- a/src/main/resources/static/install-libs.ps1 +++ /dev/null @@ -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 -} diff --git a/src/main/resources/static/www.chenxinzhi.top.jks b/src/main/resources/static/www.chenxinzhi.top.jks new file mode 100644 index 0000000..2da43c0 Binary files /dev/null and b/src/main/resources/static/www.chenxinzhi.top.jks differ