feat(shop): 更新数据库配置并添加订单状态关联查询
- 修改 application-glt2.yml 中的数据源配置,将数据库从 modules 更改为 gltdb - 修改 application-glt3.yml 中的数据源配置,将数据库从 modules 更改为 gltdb - 在 ShopDealerCapital 实体类中添加 orderStatus 字段用于存储订单状态 - 更新 ShopDealerCapitalMapper.xml 查询语句,关联 shop_order 表获取订单状态 - 添加 LEFT JOIN 条件连接 shop_order 表以获取订单状态信息
This commit is contained in:
@@ -37,6 +37,10 @@ public class ShopDealerCapital implements Serializable {
|
|||||||
@Schema(description = "订单编号")
|
@Schema(description = "订单编号")
|
||||||
private String orderNo;
|
private String orderNo;
|
||||||
|
|
||||||
|
@Schema(description = "订单状态")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer orderStatus;
|
||||||
|
|
||||||
@Schema(description = "资金流动类型 (10佣金收入 20提现支出 30转账支出 40转账收入 50佣金解冻 60配送奖励)")
|
@Schema(description = "资金流动类型 (10佣金收入 20提现支出 30转账支出 40转账收入 50佣金解冻 60配送奖励)")
|
||||||
private Integer flowType;
|
private Integer flowType;
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,12 @@
|
|||||||
|
|
||||||
<!-- 关联查询sql -->
|
<!-- 关联查询sql -->
|
||||||
<sql id="selectSql">
|
<sql id="selectSql">
|
||||||
SELECT a.*, b.order_no, b.month, c.nickname AS nickName, d.nickname AS toNickName
|
SELECT a.*, b.order_no, b.month, c.nickname AS nickName, d.nickname AS toNickName, e.order_status AS orderStatus
|
||||||
FROM shop_dealer_capital a
|
FROM shop_dealer_capital a
|
||||||
LEFT JOIN shop_dealer_order b ON a.order_no = b.order_no
|
LEFT JOIN shop_dealer_order b ON a.order_no = b.order_no
|
||||||
LEFT JOIN gxwebsoft_core.sys_user c ON a.user_id = c.user_id and c.deleted = 0
|
LEFT JOIN gxwebsoft_core.sys_user c ON a.user_id = c.user_id and c.deleted = 0
|
||||||
LEFT JOIN gxwebsoft_core.sys_user d ON a.to_user_id = d.user_id and d.deleted = 0
|
LEFT JOIN gxwebsoft_core.sys_user d ON a.to_user_id = d.user_id and d.deleted = 0
|
||||||
|
LEFT JOIN shop_order e ON a.order_no = e.order_no
|
||||||
<where>
|
<where>
|
||||||
<if test="param.id != null">
|
<if test="param.id != null">
|
||||||
AND a.id = #{param.id}
|
AND a.id = #{param.id}
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ server:
|
|||||||
# 数据源配置
|
# 数据源配置
|
||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://8.134.55.105:13306/modules?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8
|
url: jdbc:mysql://8.134.55.105:13306/gltdb?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8
|
||||||
username: modules
|
username: gltdb
|
||||||
password: tYmmMGh5wpwXR3ae
|
password: EeD4FtzyA5ksj7Bk
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
type: com.alibaba.druid.pool.DruidDataSource
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ server:
|
|||||||
# 数据源配置
|
# 数据源配置
|
||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://1Panel-mysql-XsWW:3306/modules?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
|
url: jdbc:mysql://1Panel-mysql-XsWW:3306/gltdb?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||||
username: modules
|
username: gltdb
|
||||||
password: tYmmMGh5wpwXR3ae
|
password: EeD4FtzyA5ksj7Bk
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
type: com.alibaba.druid.pool.DruidDataSource
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
druid:
|
druid:
|
||||||
|
|||||||
Reference in New Issue
Block a user