Browse Source

查询订单时返回支付积分类型,及去除旧的订单字段

Yangzw 6 days ago
parent
commit
3d7b42601b

+ 5 - 5
feifan-module-mall/feifan-module-statistics-biz/src/main/resources/mapper/trade/TradeOrderStatisticsMapper.xml

@@ -13,7 +13,7 @@
                 WHERE s.receiver_area_id = m.receiver_area_id
                   AND s.pay_status = TRUE
                   AND s.deleted = FALSE)                       AS orderPayUserCount,
-               (SELECT SUM(s.pay_price)
+               (SELECT SUM(s.pay_integral)
                 FROM trade_order AS s
                 WHERE s.receiver_area_id = m.receiver_area_id
                   AND s.pay_status = TRUE
@@ -54,7 +54,7 @@
     </select>
 
     <select id="selectSummaryPriceByPayTimeBetween" resultType="java.lang.Integer">
-        SELECT SUM(pay_price)
+        SELECT SUM(pay_integral)
         FROM trade_order AS s
         WHERE s.pay_status = TRUE
           AND deleted = FALSE
@@ -65,7 +65,7 @@
             resultType="cn.newfeifan.mall.module.statistics.controller.admin.trade.vo.TradeOrderTrendRespVO">
         SELECT DATE_FORMAT(pay_time, '%Y-%m-%d') AS date,
                COUNT(1)                          AS orderPayCount,
-               SUM(pay_price)                    AS orderPayPrice
+               SUM(pay_integral)                    AS orderPayPrice
         FROM trade_order
         WHERE pay_status = TRUE
           AND create_time BETWEEN #{beginTime} AND #{endTime}
@@ -77,7 +77,7 @@
             resultType="cn.newfeifan.mall.module.statistics.controller.admin.trade.vo.TradeOrderTrendRespVO">
         SELECT DATE_FORMAT(pay_time, '%Y-%m') AS date,
                COUNT(1)                       AS orderPayCount,
-               SUM(pay_price)                 AS orderPayPrice
+               SUM(pay_integral)                 AS orderPayPrice
         FROM trade_order
         WHERE pay_status = TRUE
           AND create_time BETWEEN #{beginTime} AND #{endTime}
@@ -95,7 +95,7 @@
 
     <select id="selectPaySummaryByStatusAndPayTimeBetween"
             resultType="cn.newfeifan.mall.module.statistics.controller.admin.trade.vo.TradeOrderSummaryRespVO">
-        SELECT IFNULL(SUM(pay_price), 0) AS orderPayPrice,
+        SELECT IFNULL(SUM(pay_integral), 0) AS orderPayPrice,
                COUNT(1)                  AS orderPayCount
         FROM trade_order
         WHERE status = #{status}

+ 3 - 0
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/controller/app/order/vo/AppTradeOrderDetailRespVO.java

@@ -95,6 +95,9 @@ public class AppTradeOrderDetailRespVO {
     @Schema(description = "收件人详细地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "中关村大街 1 号")
     private String receiverDetailAddress;
 
+    @Schema(description = "使用积分类型")
+    private Integer integralType;
+
     // ========== 售后基本信息 ==========
 
     @Schema(description = "售后状态", example = "0")