|
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.yami.shop.bean.dto.hb.*;
|
|
|
import com.yami.shop.bean.enums.DvyType;
|
|
|
+import com.yami.shop.bean.enums.OrderStatus;
|
|
|
import com.yami.shop.bean.model.*;
|
|
|
import com.yami.shop.common.util.hb.HBR;
|
|
|
import com.yami.shop.dao.*;
|
|
@@ -172,9 +173,21 @@ public class HBOrderService implements IHBOrderService {
|
|
|
String bodyStr = hBRequest.getString("body");
|
|
|
log.info("订单信息,body:{}", bodyStr);
|
|
|
JSONObject bodyJson = JSON.parseObject(bodyStr);
|
|
|
- Order order = orderMapper.getOrderAndOrderItemByOrderNumber(bodyJson.getString("channelOrderId"));
|
|
|
- order.setHbOrderStatus(bodyJson.getInteger("operatorType"));
|
|
|
+ Integer operatorType = bodyJson.getInteger("operatorType");
|
|
|
+ String channelOrderId = bodyJson.getString("channelOrderId");
|
|
|
+ Order order = orderMapper.getOrderAndOrderItemByOrderNumber(channelOrderId);
|
|
|
+ //如果是已送达直接完成并且通知海博
|
|
|
+ order.setHbOrderStatus(operatorType);
|
|
|
+ if (operatorType == 70){
|
|
|
+ order.setHbOrderStatus(80);
|
|
|
+ }
|
|
|
orderMapper.updateById(order);
|
|
|
+
|
|
|
+
|
|
|
+ //成功直接通知海博
|
|
|
+ if (operatorType == 70){
|
|
|
+ changeOrderStatus(channelOrderId,80);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -272,9 +285,10 @@ public class HBOrderService implements IHBOrderService {
|
|
|
}
|
|
|
|
|
|
int dvyType = 10;
|
|
|
- if (order.getDvyType() == 1) {
|
|
|
- dvyType = 80;
|
|
|
- } else if (order.getDvyType() == 2) {
|
|
|
+// if (order.getDvyType() == 1) {
|
|
|
+// dvyType = 80;
|
|
|
+// } else
|
|
|
+ if (order.getDvyType() == 2) {
|
|
|
dvyType = 40;
|
|
|
}
|
|
|
|