瀏覽代碼

我的购买的列表修改

wxd 2 天之前
父節點
當前提交
ba25089307

+ 2 - 1
alien-second/src/main/java/shop/alien/second/service/impl/SecondGoodsServiceImpl.java

@@ -578,7 +578,8 @@ public class SecondGoodsServiceImpl extends ServiceImpl<SecondGoodsMapper, Secon
 //                .eq("sg.delete_flag", Constants.DeleteFlag.NOT_DELETED)
                 .eq("str.delete_flag", Constants.DeleteFlag.NOT_DELETED)
                 .eq("str.buyer_id", userId) // 买家ID
-                .eq("str.trade_status", Constants.TradeStatus.SUCCESS) // 1-交易成功
+                .eq("sg.goods_status", SecondGoodsStatusEnum.SOLD.getCode()) // 5-已售出
+                .eq("str.trade_status", Constants.TradeStatus.TRADE_SUCCESS) // 4-交易成功
                 .orderByDesc("str.created_time");
         return secondGoodsMapper.getBuyGoodsPage(page, queryWrapper);
     }

+ 30 - 0
alien-util/src/main/java/shop/alien/util/common/Constants.java

@@ -83,5 +83,35 @@ public class Constants {
          * 交易成功
          */
         public static final Integer SUCCESS = 1;
+        
+        /**
+         * 待确认
+         */
+        public static final Integer PENDING_CONFIRMATION = 1;
+        
+        /**
+         * 已拒绝
+         */
+        public static final Integer REJECTED = 2;
+        
+        /**
+         * 待交易
+         */
+        public static final Integer PENDING_TRADE = 3;
+        
+        /**
+         * 交易成功
+         */
+        public static final Integer TRADE_SUCCESS = 4;
+        
+        /**
+         * 交易失败
+         */
+        public static final Integer TRADE_FAILED = 5;
+        
+        /**
+         * 交易取消
+         */
+        public static final Integer TRADE_CANCELLED = 6;
     }
 }