瀏覽代碼

Merge remote-tracking branch 'origin/master'

wang 2 天之前
父節點
當前提交
90d09d960f

+ 1 - 1
yami-shop-bean/src/main/java/com/yami/shop/bean/param/BackendOrderParam.java

@@ -68,7 +68,7 @@ public class BackendOrderParam {
     /**
      * 收货人手机号
      */
-    private String mobile;
+    private String userMobile;
 
     /**
      * 订单退款状态参考refundStatus(1:申请退款 2:退款成功 3:部分退款成功 4:退款失败)

+ 7 - 0
yami-shop-platform/src/main/java/com/yami/shop/platform/controller/OrderController.java

@@ -16,6 +16,7 @@ import com.yami.shop.bean.enums.DvyType;
 import com.yami.shop.bean.enums.OrderStatus;
 import com.yami.shop.bean.model.Order;
 import com.yami.shop.bean.model.OrderItem;
+import com.yami.shop.bean.model.User;
 import com.yami.shop.bean.model.UserAddrOrder;
 import com.yami.shop.bean.param.BackendOrderParam;
 import com.yami.shop.bean.param.DeliveryOrderParam;
@@ -57,6 +58,7 @@ public class OrderController {
     private final UserAddrOrderService userAddrOrderService;
     private final ProductService productService;
     private final SkuService skuService;
+    private final UserService userService;
 
 
     /**
@@ -113,6 +115,11 @@ public class OrderController {
             });
         }
         order.setOrderItems(orderItems);
+        User user = userService.getById(order.getUserId());
+        if (user!=null) {
+            order.setNickName(user.getNickName());
+            order.setUserMobile(user.getUserMobile());
+        }
         return R.SUCCESS(order);
     }
 

+ 5 - 5
yami-shop-service/src/main/resources/mapper/OrderMapper.xml

@@ -221,7 +221,7 @@
   </select>
 
     <update id="cancelOrders">
-        update tz_order set `hb_order_status`=60,cancel_time = NOW(),update_time=NOW()  where order_id in
+        update tz_order set `hb_order_status`=60,cancel_time = NOW(),update_time=NOW(),close_type=4  where order_id in
         <foreach collection="orders" item="order" open="(" close=")" separator=",">
             #{order.orderId}
         </foreach>
@@ -482,8 +482,8 @@
             <if test="orderParam.receiver != null">
                 and b.receiver LIKE concat("%",#{orderParam.receiver},"%")
             </if>
-            <if test="orderParam.mobile != null">
-                and b.mobile LIKE concat("%",#{orderParam.mobile},"%")
+            <if test="orderParam.userMobile != null">
+                and b.mobile LIKE concat("%",#{orderParam.userMobile},"%")
             </if>
 
             <if test="orderParam.orderStatus != null and orderParam.orderStatus != ''">
@@ -537,8 +537,8 @@
             <if test="orderParam.receiver != null">
                 and b.receiver LIKE concat("%",#{orderParam.receiver},"%")
             </if>
-            <if test="orderParam.mobile != null">
-                and b.mobile LIKE concat("%",#{orderParam.mobile},"%")
+            <if test="orderParam.userMobile != null">
+                and b.mobile LIKE concat("%",#{orderParam.userMobile},"%")
             </if>
 
             <if test="orderParam.orderStatus != null and orderParam.orderStatus != ''">