浏览代码

订单预约

大大的豆芽 9 月之前
父节点
当前提交
91cb5fc624

+ 2 - 1
yiqi-admin/src/main/java/com/yiqi/admin/controller/order/OrderClothController.java

@@ -842,7 +842,8 @@ public class OrderClothController extends BaseController {
         orderCloth.buildUpdateData();
         orderCloth.setTakeClothAppUserId(Long.parseLong(deliveryId));
         orderCloth.setOrderStatus(ClothOrderStatusType.WAITING_TO_DOOR.getCode());
-        return success(orderClothService.update(orderCloth, new QueryWrapper<OrderCloth>().lambda().eq(OrderCloth::getOrderNo, orderNo)));
+        orderCloth.setAppointmentStatus(ClothAppointmentStatus.WAITING_TO_DOOR.getCode());
+        return success(orderClothService.updateById(orderCloth));
     }
 
     /**

+ 1 - 0
yiqi-api/src/main/java/com/yiqi/api/controller/order/WeAppOrderClothController.java

@@ -178,6 +178,7 @@ public class WeAppOrderClothController {
         orderCloth.setAppUserId(AuthHolder.userId());
         orderCloth.setDelFlag(DeleteStatus.OK.getCode());
         orderCloth.setOrderStatus(ClothOrderStatusType.APPOINTMENT.getCode());
+        orderCloth.setAppointmentStatus(ClothAppointmentStatus.APPOINTMENT.getCode());
         orderCloth.setOrderNo(orderNoUtils.getClothOrderNo());
         if(ClothOrderType.normal.equals(orderCloth.getOrderType())){
             SysStore sysStore = storeService.selectSysStoreById(orderClothAppointmentDTO.getOrgId());

+ 5 - 0
yiqi-common/src/main/java/com/yiqi/order/domain/vo/OrderClothAppointmentVO.java

@@ -96,6 +96,11 @@ public class OrderClothAppointmentVO {
     @ApiModelProperty("订单状态(0=预约待取,1=已取货、待门店定价,2=已定价、待支付,3=已支付、待工厂取货,4=工厂已取货、洗衣中,5=洗衣完成、待送店,6=已到店、待送衣,7=送衣中,8=已送达、待评价,9=已完成,100=已取消)")
     private String orderStatus;
 
+    /** 预约状态(1=待接单,2=待上门,3=已取物,4=待配送,5=配送中,9=已完成,100=已取消) */
+    @Excel(name = "预约状态", readConverterExp = "0=未预约,1=待接单,2=待上门,3=已取物,4=待配送,5=配送中,9=已完成,100=已取消")
+    @ApiModelProperty("预约状态(0=未预约,1=待接单,2=待上门,3=已取物,4=待配送,5=配送中,9=已完成,100=已取消)")
+    private String appointmentStatus;
+
     @Excel(name = "支付状态", readConverterExp = "0==待支付,1=支付成功,2=支付失败")
     @ApiModelProperty("支付状态 0:待支付 1: 支付成功 -1:支付失败")
     private String payStatus;

+ 2 - 2
yiqi-core/src/main/resources/mapper/order/OrderClothMapper.xml

@@ -236,7 +236,7 @@
     </select>
 
     <select id="getAppointmentClothOrderList" resultType="com.yiqi.order.domain.vo.OrderClothAppointmentVO">
-        select o.order_no as orderNo, o.appointment_time as appointmentTime, o.appointment_count as appointmentCount, o.pay_status as payStatus,
+        select o.order_no as orderNo, o.appointment_status as appointmentStatus, o.appointment_time as appointmentTime, o.appointment_count as appointmentCount, o.pay_status as payStatus,
         o.take_cloth_app_user_id as takeClothAppUserId, o.order_status AS orderStatus, a.province as province, a.city as city, a.area as area,
         a.address as address, a.address_detail as addressDetail, o.take_cloth_way as takeClothWay, o.send_cloth_way AS sendClothWay,
         o.is_disassembly_and_assembly as isDisassemblyAndAssembly, o.is_large_item as isLargeItem, b.real_name as takeClothAppUserName,
@@ -252,7 +252,7 @@
             and a.cloth_order_type=1
         </if>
         left join sys_org as org on org.id=o.org_id and org.source_type=o.source_type and org.id is not null
-        where o.del_flag='0'
+        where o.del_flag='0' and o.order_status ! = '100'
         <if test="orderType != null  and orderType != ''">
             and o.order_type=#{orderType}
         </if>