fix(credit): 修复公司名称字段映射问题

- 移除实体类中的多余 TableField 注解
- 修改 SQL 查询逻辑,使用 match_name 字段替代原来的 company_name
- 统一多个信用相关实体的字段映射方式
- 添加新的生产环境配置文件 application-ysb2.yml
- 更新默认激活的环境配置为 ysb2
This commit is contained in:
2026-02-27 12:34:01 +08:00
parent f25e2c3707
commit 9b18851aaf
12 changed files with 107 additions and 11 deletions

View File

@@ -72,7 +72,6 @@ public class CreditAdministrativeLicense implements Serializable {
private Integer companyId;
@Schema(description = "主体企业")
@TableField("company_name")
private String companyName;
@Schema(description = "是否推荐")

View File

@@ -56,7 +56,6 @@ public class CreditBranch implements Serializable {
private Integer companyId;
@Schema(description = "主题企业")
@TableField("company_name")
private String companyName;
@Schema(description = "是否推荐")

View File

@@ -50,7 +50,6 @@ public class CreditHistoricalLegalPerson implements Serializable {
private Integer companyId;
@Schema(description = "主体企业")
@TableField("company_name")
private String companyName;
@Schema(description = "是否推荐")

View File

@@ -80,7 +80,6 @@ public class CreditNearbyCompany implements Serializable {
private Integer companyId;
@Schema(description = "主体企业")
@TableField("company_name")
private String companyName;
@Schema(description = "纳税人识别号")

View File

@@ -65,7 +65,6 @@ public class CreditSuspectedRelationship implements Serializable {
private Integer companyId;
@Schema(description = "主体企业")
@TableField("company_name")
private String companyName;
@Schema(description = "是否推荐")

View File

@@ -4,7 +4,7 @@
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*, COALESCE(b.name, a.company_name) AS companyName, u.real_name AS realName
SELECT a.*, b.match_name AS companyName, u.real_name AS realName
FROM credit_administrative_license a
LEFT JOIN credit_company b ON a.company_id = b.id
LEFT JOIN gxwebsoft_core.sys_user u ON a.user_id = u.user_id

View File

@@ -4,7 +4,7 @@
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*, COALESCE(b.name, a.company_name) AS companyName, u.real_name AS realName
SELECT a.*, COALESCE(match_name, a.company_name) AS companyName, u.real_name AS realName
FROM credit_branch a
LEFT JOIN credit_company b ON a.company_id = b.id
LEFT JOIN gxwebsoft_core.sys_user u ON a.user_id = u.user_id

View File

@@ -4,7 +4,7 @@
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*, COALESCE(b.name, a.company_name) AS companyName, u.real_name AS realName
SELECT a.*, COALESCE(match_name, a.company_name) AS companyName, u.real_name AS realName
FROM credit_historical_legal_person a
LEFT JOIN credit_company b ON a.company_id = b.id
LEFT JOIN gxwebsoft_core.sys_user u ON a.user_id = u.user_id

View File

@@ -4,7 +4,7 @@
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*, COALESCE(b.name, a.company_name) AS companyName, u.real_name AS realName
SELECT a.*, COALESCE(match_name, a.company_name) AS companyName, u.real_name AS realName
FROM credit_nearby_company a
LEFT JOIN credit_company b ON a.company_id = b.id
LEFT JOIN gxwebsoft_core.sys_user u ON a.user_id = u.user_id

View File

@@ -4,7 +4,7 @@
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*, COALESCE(b.name, a.company_name) AS companyName, u.real_name AS realName
SELECT a.*, COALESCE(match_name, a.company_name) AS companyName, u.real_name AS realName
FROM credit_suspected_relationship a
LEFT JOIN credit_company b ON a.company_id = b.id
LEFT JOIN gxwebsoft_core.sys_user u ON a.user_id = u.user_id

View File

@@ -0,0 +1,101 @@
# 生产环境配置
server:
port: 9200
# 数据源配置
spring:
datasource:
url: jdbc:mysql://47.119.165.234:13308/ysb?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
username: ysb
password: 5Zf45CE2YneBfXkR
driver-class-name: com.mysql.cj.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource
druid:
remove-abandoned: true
# redis
redis:
database: 0
host: 47.119.165.234
port: 16379
password: redis_WSDb88
# 日志配置
logging:
file:
name: websoft-modules.log
level:
root: WARN
com.gxwebsoft: ERROR
com.baomidou.mybatisplus: ERROR
socketio:
host: 0.0.0.0 #IP地址
# MQTT配置
mqtt:
enabled: false # 启用MQTT服务
host: tcp://132.232.214.96:1883
username: swdev
password: Sw20250523
client-id-prefix: hjm_car_
topic: /SW_GPS/#
qos: 2
connection-timeout: 10
keep-alive-interval: 20
auto-reconnect: true
# Mybatis-plus配置
mybatis-plus:
mapper-locations: classpath*:com/gxwebsoft/**/*Mapper.xml
configuration:
map-underscore-to-camel-case: true
cache-enabled: true
global-config:
banner: false
# SqlRunner.db().xxx 需要开启该开关,否则会报:
# Mapped Statements collection does not contain value for com.baomidou.mybatisplus.core.mapper.SqlRunner.Delete
enable-sql-runner: true
db-config:
id-type: auto
logic-delete-value: 1
logic-not-delete-value: 0
# 框架配置
config:
# 文件服务器
file-server: https://file-s209.shoplnk.cn
# 生产环境接口
server-url: https://server.websoft.top/api
# 业务模块接口
api-url: https://ysb-api.websoft.top/api
upload-path: /www/wwwroot/file.ws
# 阿里云OSS云存储
endpoint: https://oss-cn-shenzhen.aliyuncs.com
accessKeyId: LTAI4GKGZ9Z2Z8JZ77c3GNZP
accessKeySecret: BiDkpS7UXj72HWwDWaFZxiXjNFBNCM
bucketName: oss-gxwebsoft
bucketDomain: https://oss.wsdns.cn
aliyunDomain: https://oss-gxwebsoft.oss-cn-shenzhen.aliyuncs.com
# 生产环境证书配置
certificate:
load-mode: VOLUME # 生产环境从Docker挂载卷加载
cert-root-path: /www/wwwroot/file.ws
# 支付配置缓存
payment:
cache:
# 支付配置缓存键前缀,生产环境使用 Payment:1* 格式
key-prefix: "Payment:1"
# 缓存过期时间(小时)
expire-hours: 24
# 阿里云翻译配置
aliyun:
translate:
access-key-id: LTAI5tEsyhW4GCKbds1qsopg
access-key-secret: zltFlQrYVAoq2KMFDWgLa3GhkMNeyO
endpoint: mt.cn-hangzhou.aliyuncs.com
wechatpay:
transfer:
scene-id: 1005
scene-report-infos-json: '[{"info_type":"岗位类型","info_content":"配送员"},{"info_type":"报酬说明","info_content":"12月份配送费"}]'

View File

@@ -4,7 +4,7 @@ server:
# 多环境配置
spring:
profiles:
active: glt2
active: ysb2
application:
name: server