From fc113378296ae3e138ce1e6650feb5082ffebba4 Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期五, 26 十二月 2025 10:44:56 +0800
Subject: [PATCH] 后台接口
---
ruoyi-applet/src/main/resources/application-prod.yml | 14 +++++++-------
ruoyi-system/pom.xml | 1 +
ruoyi-applet/src/main/resources/application.yml | 2 +-
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TPhysicalGoodsOrderServiceImpl.java | 13 +++++++++++--
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TBigGiftPackageOrderServiceImpl.java | 9 ++++-----
ruoyi-admin/src/main/resources/application.yml | 2 +-
ruoyi-system/src/main/resources/mapper/system/TPhysicalGoodsOrderMapper.xml | 8 ++++----
7 files changed, 29 insertions(+), 20 deletions(-)
diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml
index dcc106d..b205a93 100644
--- a/ruoyi-admin/src/main/resources/application.yml
+++ b/ruoyi-admin/src/main/resources/application.yml
@@ -1,4 +1,4 @@
# 项目相关配置
spring:
profiles:
- active: test
+ active: prod
\ No newline at end of file
diff --git a/ruoyi-applet/src/main/resources/application-prod.yml b/ruoyi-applet/src/main/resources/application-prod.yml
index cfa7075..fd352cb 100644
--- a/ruoyi-applet/src/main/resources/application-prod.yml
+++ b/ruoyi-applet/src/main/resources/application-prod.yml
@@ -18,10 +18,10 @@
# 开发环境配置
server:
# 服务器的HTTP端口,默认为8080
- port: 8082
+ port: 9100
servlet:
# 应用的访问路径
- context-path: /
+ context-path: /applet/
tomcat:
# tomcat的URI编码
uri-encoding: UTF-8
@@ -79,11 +79,11 @@
# password: 123456
host: 127.0.0.1
# 端口,默认为6379
- port: 16379
+ port: 6379
# 数据库索引
database: 0
# 密码
- password: 8f5z9g52gx4bg
+ password: jsd2026!
# 连接超时时间
timeout: 10s
lettuce:
@@ -103,9 +103,9 @@
druid:
# 主库数据源
master:
- url: jdbc:mysql://172.27.0.13:3306/xizang?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai
- username: xzgt
- password: changyun!6f2gshj6h3j
+ url: jdbc:mysql://127.0.0.1:3306/jiashida?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
+ username: root
+ password: Jiashida@2026!
# 从库数据源
slave:
# 从数据源开关/默认关闭
diff --git a/ruoyi-applet/src/main/resources/application.yml b/ruoyi-applet/src/main/resources/application.yml
index dcc106d..e673e36 100644
--- a/ruoyi-applet/src/main/resources/application.yml
+++ b/ruoyi-applet/src/main/resources/application.yml
@@ -1,4 +1,4 @@
# 项目相关配置
spring:
profiles:
- active: test
+ active: prod
diff --git a/ruoyi-system/pom.xml b/ruoyi-system/pom.xml
index 3718ac8..f2fbfff 100644
--- a/ruoyi-system/pom.xml
+++ b/ruoyi-system/pom.xml
@@ -115,4 +115,5 @@
</dependency>
</dependencies>
+
</project>
\ No newline at end of file
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TBigGiftPackageOrderServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TBigGiftPackageOrderServiceImpl.java
index 73b4d66..55702f5 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TBigGiftPackageOrderServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TBigGiftPackageOrderServiceImpl.java
@@ -96,12 +96,11 @@
tBigGiftPackageOrder.setCompanyName(tCompany1.getName());
}
});
- List<Integer> goodsIds = tBigGiftPackageOrders.stream().map(TBigGiftPackageOrder::getBigGiftPackageId).collect(Collectors.toList());
- List<TBigGiftPackage> bigGiftPackages = bigGiftPackageMapper.selectBatchIds(goodsIds);
tBigGiftPackageOrders.forEach(tBigGiftPackageOrder -> {
- TBigGiftPackage bigGiftPackage = bigGiftPackages.stream().filter(tBigGiftPackage -> tBigGiftPackage.getId().equals(tBigGiftPackageOrder.getBigGiftPackageId())).findFirst().orElse(null);
- if(bigGiftPackage!=null){
- tBigGiftPackageOrder.setBigGiftPackageName(bigGiftPackage.getName());
+ String bigGiftPackage1 = tBigGiftPackageOrder.getBigGiftPackage();
+ if(bigGiftPackage1!=null){
+ JSONObject jsonObject = JSON.parseObject(bigGiftPackage1);
+ tBigGiftPackageOrder.setBigGiftPackageName(jsonObject.getString("name"));
}
});
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TPhysicalGoodsOrderServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TPhysicalGoodsOrderServiceImpl.java
index 2bb3faf..9094f16 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TPhysicalGoodsOrderServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TPhysicalGoodsOrderServiceImpl.java
@@ -71,12 +71,21 @@
@Override
public Page<TPhysicalGoodsOrder> pageList(BigGiftPackageQuery query) {
Page<TPhysicalGoodsOrder> page = new Page<>(query.getPageNum(), query.getPageSize());
- return this.baseMapper.pageList(page, query);
+ Page<TPhysicalGoodsOrder> tPhysicalGoodsOrderPage = this.baseMapper.pageList(page, query);
+ tPhysicalGoodsOrderPage.getRecords().forEach(order -> {
+
+ order.setPhysicalGoodsName(JSONObject.parseObject(order.getPhysicalGoods()).getString("name"));
+ });
+ return tPhysicalGoodsOrderPage;
}
@Override
public List<TPhysicalGoodsOrder> export(BigGiftPackageQuery query) {
- return this.baseMapper.export(query);
+ List<TPhysicalGoodsOrder> export = this.baseMapper.export(query);
+ export.forEach(order -> {
+ order.setPhysicalGoodsName(JSONObject.parseObject(order.getPhysicalGoods()).getString("name"));
+ });
+ return export;
}
@Override
diff --git a/ruoyi-system/src/main/resources/mapper/system/TPhysicalGoodsOrderMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TPhysicalGoodsOrderMapper.xml
index f3c58bb..8c1218a 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TPhysicalGoodsOrderMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TPhysicalGoodsOrderMapper.xml
@@ -28,25 +28,25 @@
</sql>
<select id="pageList" resultType="com.ruoyi.system.model.TPhysicalGoodsOrder">
- select t1.id,t1.code,t1.create_time as createTime,t1.order_price,t1.payment_price,t1.status,t1.del_flag,t1.remark,t2.name as userName,t2.phone,t3.name as physicalGoodsName
+ select t1.id,t1.code,t1.physical_goods,t1.create_time as createTime,t1.order_price,t1.payment_price,t1.status,t1.del_flag,t1.remark,t2.name as userName,t2.phone,t3.name as physicalGoodsName
from t_physical_goods_order t1
left join t_app_user t2 on t1.app_user_id = t2.id
left join t_physical_goods t3 on t1.physical_goods_id = t3.id
where t1.del_flag = 0 and t1.status != 5
<if test="query.name != null and query.name != ''">
- and t3.name like concat('%',#{query.name},'%')
+ and JSON_EXTRACT(t1.physical_goods, '$.name') like concat('%',#{query.name},'%')
</if>
order by t1.create_time desc
</select>
<select id="export" resultType="com.ruoyi.system.model.TPhysicalGoodsOrder"
parameterType="com.ruoyi.system.query.BigGiftPackageQuery">
- select t1.id,t1.code,t1.create_time as createTime,t1.order_price,t1.payment_price,t1.status,t1.del_flag,t1.remark,t2.name as userName,t2.phone,t3.name as physicalGoodsName
+ select t1.id,t1.code,t1.physical_goods,t1.create_time as createTime,t1.order_price,t1.payment_price,t1.status,t1.del_flag,t1.remark,t2.name as userName,t2.phone,t3.name as physicalGoodsName
from t_physical_goods_order t1
left join t_app_user t2 on t1.app_user_id = t2.id
left join t_physical_goods t3 on t1.physical_goods_id = t3.id
where t1.del_flag = 0 and t1.status != 5
<if test="query.name != null and query.name != ''">
- and t3.name like concat('%',#{query.name},'%')
+ and JSON_EXTRACT(t1.physical_goods, '$.name') like concat('%',#{query.name},'%')
</if>
order by t1.create_time desc
</select>
--
Gitblit v1.7.1