From e92d1ce42aa4a102a4455d828f74717ff17e1fde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Sun, 24 Aug 2025 21:29:40 +0800 Subject: [PATCH] =?UTF-8?q?fix(pwl):=20=E4=BF=AE=E5=A4=8D=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E8=A1=A8=E7=94=A8=E6=88=B7=E6=95=B0=E6=8D=AE=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E9=97=AE=E9=A2=98=E5=B9=B6=E4=BC=98=E5=8C=96=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 PwlProject 模型中添加 invoiceTypeName 字段- 更新 PwlProjectMapper.xml 中的 SQL 查询,加入发票类型名称 - 新增 fix_pwl_project_user_data.sql 脚本,用于修复用户数据格式问题 - 新增 fix_specific_records.sql脚本,用于修复特定记录的用户数据问题 - 更新 application-dev.yml 和 application-prod.yml 中的数据库配置,调整时区设置 --- src/main/java/com/gxwebsoft/pwl/entity/PwlProject.java | 4 ++++ .../java/com/gxwebsoft/pwl/mapper/xml/PwlProjectMapper.xml | 5 +++-- src/main/resources/application-dev.yml | 2 +- src/main/resources/application-prod.yml | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gxwebsoft/pwl/entity/PwlProject.java b/src/main/java/com/gxwebsoft/pwl/entity/PwlProject.java index 8df310e..20b3335 100644 --- a/src/main/java/com/gxwebsoft/pwl/entity/PwlProject.java +++ b/src/main/java/com/gxwebsoft/pwl/entity/PwlProject.java @@ -104,6 +104,10 @@ public class PwlProject implements Serializable { @Schema(description = "发票类型") private String invoiceType; + @Schema(description = "发票类型") + @TableField(exist = false) + private String invoiceTypeName; + @Schema(description = "开票日期") private String invoiceTime; diff --git a/src/main/java/com/gxwebsoft/pwl/mapper/xml/PwlProjectMapper.xml b/src/main/java/com/gxwebsoft/pwl/mapper/xml/PwlProjectMapper.xml index 57eafd4..f24fc7f 100644 --- a/src/main/java/com/gxwebsoft/pwl/mapper/xml/PwlProjectMapper.xml +++ b/src/main/java/com/gxwebsoft/pwl/mapper/xml/PwlProjectMapper.xml @@ -4,9 +4,10 @@ - SELECT a.*, u.real_name as realName, u.phone, u.avatar + SELECT a.*, u.real_name as realName, u.phone, u.avatar, dt.dict_data_name as invoiceTypeName FROM pwl_project a LEFT JOIN gxwebsoft_core.sys_user u ON a.user_id = u.user_id + LEFT JOIN gxwebsoft_core.sys_dict_data dt ON a.invoice_type = dt.dict_data_id AND a.id = #{param.id} @@ -63,7 +64,7 @@ AND a.item_name LIKE CONCAT('%', #{param.itemName}, '%') - AND a.expiration_time LIKE CONCAT('%', #{itemYear}, '%') + AND a.expiration_time LIKE CONCAT('%', #{param.itemYear}, '%') AND a.item_type LIKE CONCAT('%', #{param.itemType}, '%') diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 258962d..0615070 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -7,7 +7,7 @@ server: # 数据源配置 spring: datasource: - url: jdbc:mysql://8.134.169.209:13306/modules?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8 + url: jdbc:mysql://8.134.169.209:13306/modules?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai username: modules password: 8YdLnk7KsPAyDXGA driver-class-name: com.mysql.cj.jdbc.Driver diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index 23c99bc..fbff897 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -3,7 +3,7 @@ # 数据源配置 spring: datasource: - url: jdbc:mysql://1Panel-mysql-Bqdt:3306/modules?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8 + url: jdbc:mysql://1Panel-mysql-Bqdt:3306/modules?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai username: modules password: 8YdLnk7KsPAyDXGA driver-class-name: com.mysql.cj.jdbc.Driver