From efb2e83c808fa874fb6c66ee6424ce5c7abb8ac7 Mon Sep 17 00:00:00 2001
From: “mitao” <“2763622819@qq.com”>
Date: 星期四, 25 十二月 2025 14:26:05 +0800
Subject: [PATCH] bugfix

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java    |    3 +++
 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AppletOrderServiceImpl.java |    7 +++++++
 ruoyi-system/src/main/resources/mapper/system/TBigGiftPackageOrderMapper.xml         |   16 ++++++++--------
 ruoyi-system/src/main/resources/mapper/system/TPhysicalGoodsOrderMapper.xml          |    4 ++--
 4 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
index 6693677..26c7baa 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
@@ -1,5 +1,6 @@
 package com.ruoyi.web.controller.system;
 
+import cn.hutool.core.date.DateUtil;
 import com.alibaba.fastjson.JSON;
 import com.ruoyi.common.constant.Constants;
 import com.ruoyi.common.core.domain.AjaxResult;
@@ -24,6 +25,8 @@
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.Calendar;
+import java.util.Date;
 import java.util.List;
 import java.util.Set;
 
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AppletOrderServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AppletOrderServiceImpl.java
index 8a54dbb..4dc5b93 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AppletOrderServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AppletOrderServiceImpl.java
@@ -3,6 +3,8 @@
 import cn.hutool.core.bean.BeanUtil;
 import com.alibaba.fastjson2.JSON;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.system.enums.BigGiftPackageOrderStatusEnum;
+import com.ruoyi.system.enums.PhysicalGoodsOrderStatusEnum;
 import com.ruoyi.system.mapper.AppletOrderMapper;
 import com.ruoyi.system.model.TBigGiftPackage;
 import com.ruoyi.system.model.TBigGiftPackageOrder;
@@ -51,6 +53,11 @@
         }
 
         AppletOrderDetailVO vo = BeanUtil.copyProperties(order, AppletOrderDetailVO.class);
+        if (PhysicalGoodsOrderStatusEnum.PAID.getCode().equals(vo.getStatus())) {
+            vo.setStatus(BigGiftPackageOrderStatusEnum.PAID.getCode());
+        } else if (PhysicalGoodsOrderStatusEnum.CONFIRM_RECEIPT.getCode().equals(vo.getStatus())) {
+            vo.setStatus(BigGiftPackageOrderStatusEnum.CONFIRM_RECEIPT.getCode());
+        }
         vo.setOrderType(2); // 实物商品
 
         // 解析商品JSON
diff --git a/ruoyi-system/src/main/resources/mapper/system/TBigGiftPackageOrderMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TBigGiftPackageOrderMapper.xml
index 5d43e42..d32407a 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TBigGiftPackageOrderMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TBigGiftPackageOrderMapper.xml
@@ -41,7 +41,7 @@
         t1.deposit_payment_serial_number, t1.final_payment_time, t1.final_payment_method,
         t1.final_payment_serial_number, t1.del_flag, t1.remark,t2.phone,t2.name userName
         FROM t_big_gift_package_order t1 LEFT JOIN t_app_user t2 ON t1.app_user_id = t2.id
-        WHERE t1.del_flag = 0 t1.status != 6
+        WHERE t1.del_flag = 0 AND t1.status != 6
         <if test="query.phone != null and query.phone != ''">
             AND t2.phone = #{query.phone}
         </if>
@@ -68,7 +68,7 @@
         t1.deposit_payment_serial_number, t1.final_payment_time, t1.final_payment_method,
         t1.final_payment_serial_number, t1.del_flag, t1.remark,t2.phone,t2.name userName
         FROM t_big_gift_package_order t1 LEFT JOIN t_app_user t2 ON t1.app_user_id = t2.id
-        WHERE t1.del_flag = 0
+        WHERE t1.del_flag = 0 AND t1.status != 6
         <if test="query.phone != null and query.phone != ''">
             AND t2.phone = #{query.phone}
         </if>
@@ -86,7 +86,7 @@
     <select id="profitPageList" resultType="com.ruoyi.system.vo.ProfitPageListVo">
         select t1.id,t1.code,t1.create_time,t2.name userName,t2.phone,t1.order_price
         from t_big_gift_package_order t1 left join t_app_user t2 on t1.app_user_id = t2.id
-        where t1.del_flag = 0 and t1.company_id  = #{query.companyId}
+        where t1.del_flag = 0 and t1.company_id  = #{query.companyId} AND t1.status != 6
         <if test="query.phone != null and query.phone != ''">
             AND t2.phone = #{query.phone}
         </if>
@@ -104,7 +104,7 @@
     <select id="profitPageListExport" resultType="com.ruoyi.system.vo.ProfitPageListVo">
         select t1.id,t1.code,t1.create_time,t2.name userName,t2.phone,t1.order_price
         from t_big_gift_package_order t1 left join t_app_user t2 on t1.app_user_id = t2.id
-        where t1.del_flag = 0 and t1.company_id  = #{query.companyId}
+        where t1.del_flag = 0 and t1.company_id  = #{query.companyId} AND t1.status != 6
         <if test="query.phone != null and query.phone != ''">
             AND t2.phone = #{query.phone}
         </if>
@@ -128,13 +128,13 @@
         t1.deposit_payment_serial_number, t1.final_payment_time, t1.final_payment_method,
         t1.final_payment_serial_number, t1.del_flag, t1.remark,t2.phone,t2.name userName
         FROM t_big_gift_package_order t1 LEFT JOIN t_app_user t2 ON t1.app_user_id = t2.id
-        WHERE t1.del_flag = 0 and t2.id = #{query.userId}
+        WHERE t1.del_flag = 0 and t2.id = #{query.userId} AND t1.status != 6
         order by t1.create_time desc
     </select>
     <select id="profitUserPageList" resultType="com.ruoyi.system.vo.UserProfitPageListVo">
         select t1.id,t1.code,t1.create_time,t2.name userName,t2.phone,t1.order_price
         from t_big_gift_package_order t1 left join t_app_user t2 on t1.app_user_id = t2.id
-        where t1.del_flag = 0 and t2.referrer_user_id  = #{query.userId} and t2.referrer_status =2
+        where t1.del_flag = 0 and t2.referrer_user_id  = #{query.userId} and t2.referrer_status =2 AND t1.status != 6
         <if test="query.phone != null and query.phone != ''">
             AND t2.phone = #{query.phone}
         </if>
@@ -152,7 +152,7 @@
     <select id="profitUserPageListExport" resultType="com.ruoyi.system.vo.UserProfitPageListVo">
         select t1.id,t1.code,t1.create_time,t2.name userName,t2.phone,t1.order_price
         from t_big_gift_package_order t1 left join t_app_user t2 on t1.app_user_id = t2.id
-        where t1.del_flag = 0 and t2.referrer_user_id  = #{query.userId} and t2.referrer_status =2
+        where t1.del_flag = 0 and t2.referrer_user_id  = #{query.userId} and t2.referrer_status =2 AND t1.status != 6
         <if test="query.phone != null and query.phone != ''">
             AND t2.phone = #{query.phone}
         </if>
@@ -176,7 +176,7 @@
             t1.deposit_payment_serial_number, t1.final_payment_time, t1.final_payment_method,
             t1.final_payment_serial_number, t1.del_flag, t1.remark,t2.phone,t2.name userName
         FROM t_big_gift_package_order t1 LEFT JOIN t_app_user t2 ON t1.app_user_id = t2.id
-        WHERE t1.del_flag = 0 and t2.id = #{query.userId}
+        WHERE t1.del_flag = 0 and t2.id = #{query.userId} AND t1.status != 6
         order by t1.create_time desc
     </select>
 
diff --git a/ruoyi-system/src/main/resources/mapper/system/TPhysicalGoodsOrderMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TPhysicalGoodsOrderMapper.xml
index 4a40f42..f3c58bb 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TPhysicalGoodsOrderMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TPhysicalGoodsOrderMapper.xml
@@ -32,7 +32,7 @@
         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
+        where t1.del_flag = 0 and t1.status != 5
         <if test="query.name != null and query.name != ''">
             and t3.name like concat('%',#{query.name},'%')
         </if>
@@ -44,7 +44,7 @@
         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
+        where t1.del_flag = 0 and t1.status != 5
         <if test="query.name != null and query.name != ''">
             and t3.name like concat('%',#{query.name},'%')
         </if>

--
Gitblit v1.7.1