|
@@ -53,15 +53,11 @@ public class HBOrderService implements IHBOrderService {
|
|
|
private final ShopDetailMapper shopDetailMapper;
|
|
|
private final UserService userService;
|
|
|
private final UserAddrOrderService userAddrOrderService;
|
|
|
- private final UserAddrService userAddrService;
|
|
|
private final ProductMapper productMapper;
|
|
|
private final SkuMapper skuMapper;
|
|
|
private final OrderRiderLocationMapper orderRiderLocationMapper;
|
|
|
private final OrderRefundService orderRefundService;
|
|
|
- private final OrderItemService orderItemService;
|
|
|
private final OrderService orderService;
|
|
|
- private final OrderRefundSkuMapper orderRefundSkuMapper;
|
|
|
- private final Snowflake snowflake;
|
|
|
|
|
|
|
|
|
public HBR addHBGoods(JSONObject hbRequest) {
|
|
@@ -265,27 +261,22 @@ 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"));
|
|
|
String channelOrderId = bodyJson.getString("channelOrderId");
|
|
|
- String courierName = bodyJson.getString("courierName");
|
|
|
- String courierPhone = bodyJson.getString("courierPhone");
|
|
|
- Double latitude = bodyJson.getDouble("latitude");
|
|
|
- Double longitude = bodyJson.getDouble("longitude");
|
|
|
- Long pushTime = bodyJson.getLong("pushTime");
|
|
|
OrderRiderLocation orderRiderLocation = new OrderRiderLocation();
|
|
|
orderRiderLocation.setOrderNumber(channelOrderId);
|
|
|
- orderRiderLocation.setCourierName(courierName);
|
|
|
- orderRiderLocation.setCourierPhone(courierPhone);
|
|
|
- orderRiderLocation.setLatitude(latitude);
|
|
|
- orderRiderLocation.setLongitude(longitude);
|
|
|
- orderRiderLocation.setPushTime(pushTime);
|
|
|
- orderRiderLocation.setCreateTime(new Date());
|
|
|
+ orderRiderLocation.setCourierName(bodyJson.getString("courierName"));
|
|
|
+ orderRiderLocation.setCourierPhone(bodyJson.getString("courierPhone"));
|
|
|
+ orderRiderLocation.setLatitude(bodyJson.getDouble("latitude"));
|
|
|
+ orderRiderLocation.setLongitude(bodyJson.getDouble("longitude"));
|
|
|
+ orderRiderLocation.setPushTime(bodyJson.getLong("pushTime"));
|
|
|
+ orderRiderLocation.setUpdateTime(new Date());
|
|
|
|
|
|
OrderRiderLocation orderRiderLocation1 = orderRiderLocationMapper.selectOne(new LambdaQueryWrapper<OrderRiderLocation>().eq(OrderRiderLocation::getOrderNumber, channelOrderId));
|
|
|
if (orderRiderLocation1 != null) {
|
|
|
orderRiderLocation.setId(orderRiderLocation1.getId());
|
|
|
orderRiderLocationMapper.updateById(orderRiderLocation);
|
|
|
} else {
|
|
|
+ orderRiderLocation.setCreateTime(new Date());
|
|
|
orderRiderLocationMapper.insert(orderRiderLocation);
|
|
|
}
|
|
|
}
|