Merge branch 'jdshop' of https://e.coding.net/rosydev/jx-callback into jdshop

This commit is contained in:
richboo111
2022-11-03 09:47:22 +08:00
3 changed files with 9 additions and 6 deletions

View File

@@ -67,13 +67,16 @@ func (c *DeliveryHandler) OnWaybillMsg(msg *dadaapi.CallbackMsg) (retVal *dadaap
} }
func (c *DeliveryHandler) onWaybillMsg(msg *dadaapi.CallbackMsg) (retVal *dadaapi.CallbackResponse) { func (c *DeliveryHandler) onWaybillMsg(msg *dadaapi.CallbackMsg) (retVal *dadaapi.CallbackResponse) {
globals.SugarLogger.Debugf("onWaybillMsg=================:%s", utils.Format4Output(msg, false))
order := c.callbackMsg2Waybill(msg) order := c.callbackMsg2Waybill(msg)
switch msg.OrderStatus { switch msg.OrderStatus {
case dadaapi.OrderStatusWaitingForAccept: case dadaapi.OrderStatusWaitingForAccept:
if dadaOrder, err := api.DadaAPI.QueryOrderInfo(msg.OrderID); err == nil { dadaOrder, err := api.DadaAPI.QueryOrderInfo(msg.OrderID)
if err == nil {
order.ActualFee = jxutils.StandardPrice2Int(dadaOrder.ActualFee) order.ActualFee = jxutils.StandardPrice2Int(dadaOrder.ActualFee)
order.DesiredFee = jxutils.StandardPrice2Int(dadaOrder.DeliveryFee) order.DesiredFee = jxutils.StandardPrice2Int(dadaOrder.DeliveryFee)
} }
globals.SugarLogger.Debugf("onWaybillMsg====dadaOrder=============:%s", utils.Format4Output(dadaOrder, false))
order.Status = model.WaybillStatusNew order.Status = model.WaybillStatusNew
case dadaapi.OrderStatusAccepted: case dadaapi.OrderStatusAccepted:
order.Status = model.WaybillStatusCourierAssigned order.Status = model.WaybillStatusCourierAssigned
@@ -439,6 +442,8 @@ func (c *DeliveryHandler) GetRidderPosition(ctx *jxcontext.Context, vendorOrgCod
// 获取骑手信息(订单详情) // 获取骑手信息(订单详情)
func (c *DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeisongId string) (rider *mtpsapi.RiderInfo, err error) { func (c *DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeisongId string) (rider *mtpsapi.RiderInfo, err error) {
order, err := api.DadaAPI.QueryOrderInfo(orderId) order, err := api.DadaAPI.QueryOrderInfo(orderId)
globals.SugarLogger.Debugf("order111111111111 := %s", utils.Format4Output(order, false))
globals.SugarLogger.Debugf("order111111111111 := %s", utils.Format4Output(err, false))
if err != nil { if err != nil {
return nil, err return nil, err
} }

View File

@@ -77,7 +77,7 @@ func GetOrderRiderInfoToPlatform(orderId string, wayBillStatus int) {
} }
if riderInfo == nil || (riderInfo.CourierName == "" && v.WaybillVendorID == -1 && v.DeliveryType == "store") { // 真商家自送 if riderInfo == nil || (riderInfo.CourierName == "" && v.WaybillVendorID == -1 && v.DeliveryType == "store") { // 真商家自送
riderInfo.OrderId = v.VendorOrderID riderInfo.OrderId = v.VendorOrderID
riderInfo.LogisticsStatus = v.Status riderInfo.LogisticsStatus = 5
riderInfo.CourierName = "石锋" riderInfo.CourierName = "石锋"
riderInfo.CourierPhone = "18048531223" riderInfo.CourierPhone = "18048531223"
riderInfo.LogisticsProviderCode = "10017" riderInfo.LogisticsProviderCode = "10017"

View File

@@ -186,13 +186,11 @@ func (p *PurchaseHandler) getOrder(vendorOrgCode, vendorOrderID, vendorStoreID s
closeTime = localStore.CloseTime2 closeTime = localStore.CloseTime2
} }
latestReceiptTime := order.ExpectedDeliveredTime h, m, _ := order.ExpectedDeliveredTime.Clock()
h, m, _ := latestReceiptTime.Clock() if order.ExpectedDeliveredTime.Day() == time.Now().Day() && utils.Str2Int16(fmt.Sprintf("%d%d", h, m)) >= openTime && utils.Str2Int16(fmt.Sprintf("%d%d", h, m)) < closeTime && localStore.Status == model.StoreStatusOpened {
if latestReceiptTime.Day() == time.Now().Day() && utils.Str2Int16(fmt.Sprintf("%d%d", h, m)) >= openTime && utils.Str2Int16(fmt.Sprintf("%d%d", h, m)) < closeTime && localStore.Status == model.StoreStatusOpened {
order.BusinessType = model.BusinessTypeDingshida order.BusinessType = model.BusinessTypeDingshida
} else { } else {
order.BusinessType = model.BusinessTypeImmediate order.BusinessType = model.BusinessTypeImmediate
} }
// 用户保密信息脱敏 // 用户保密信息脱敏