From 8e00170ba1adf41f68388b90e4296bd73905fda5 Mon Sep 17 00:00:00 2001 From: wangzhiwei Date: Tue, 24 Feb 2026 09:36:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(config):=20=E6=9B=B4=E6=96=B0=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E7=8E=AF=E5=A2=83=E6=95=B0=E6=8D=AE=E5=BA=93=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=92=8C=E6=90=9C=E7=B4=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将生产环境数据库连接URL从远程地址改为本地地址 - 修改CMS内容搜索逻辑,支持标题和摘要同时搜索 - 修复用户手机号验证正则表达式语法错误 --- .../com/kexue/skills/service/impl/SysUserServiceImpl.java | 2 +- src/main/resources/application-prod.yml | 2 +- src/main/resources/mapper/CmsContentMapper.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/kexue/skills/service/impl/SysUserServiceImpl.java b/src/main/java/com/kexue/skills/service/impl/SysUserServiceImpl.java index cbfda48..8830f13 100644 --- a/src/main/java/com/kexue/skills/service/impl/SysUserServiceImpl.java +++ b/src/main/java/com/kexue/skills/service/impl/SysUserServiceImpl.java @@ -653,7 +653,7 @@ public class SysUserServiceImpl implements SysUserService { Assert.notBlank(phone, "手机号不能为空"); // 验证手机号格式 - String phoneRegex = "^1[3-9\\d{9}$"; + String phoneRegex = "^1[3-9]\\d{9}$"; if (!phone.matches(phoneRegex)) { Assert.isTrue(false, "手机号格式不正确"); } diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index c9fbc98..39fd501 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -8,7 +8,7 @@ spring: driver-class-name: com.mysql.cj.jdbc.Driver username: agent_skills password: agent_skills@xueai666 - url: jdbc:mysql://43.248.97.19:12306/agent_skills?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&autoReconnect=true&maxReconnects=10&failOverReadOnly=false&allowPublicKeyRetrieval=true + url: jdbc:mysql://127.0.0.1:12306/agent_skills?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&autoReconnect=true&maxReconnects=10&failOverReadOnly=false&allowPublicKeyRetrieval=true hikari: pool-name: ProdHikariPool maximum-pool-size: 30 diff --git a/src/main/resources/mapper/CmsContentMapper.xml b/src/main/resources/mapper/CmsContentMapper.xml index 625c176..4ab92fd 100644 --- a/src/main/resources/mapper/CmsContentMapper.xml +++ b/src/main/resources/mapper/CmsContentMapper.xml @@ -62,7 +62,7 @@ and content_id = #{contentId} - and title like concat('%', #{title}, '%') + and (title like concat('%', #{title}, '%') or summary like concat('%', #{title}, '%')) and content_type = #{contentType} @@ -125,7 +125,7 @@ and content_id = #{contentId} - and title like concat('%', #{title}, '%') + and (title like concat('%', #{title}, '%') or summary like concat('%', #{title}, '%')) and content_type = #{contentType}