Merge branch 'jdshop' of https://e.coding.net/rosydev/jx-callback into jdshop
This commit is contained in:
@@ -130,7 +130,9 @@ func AutoSettingFakeDelivery() {
|
|||||||
if randTime >= int64(len(riderListInfo[riderKey])) {
|
if randTime >= int64(len(riderListInfo[riderKey])) {
|
||||||
randTime = int64(len(riderListInfo[riderKey])) - 1
|
randTime = int64(len(riderListInfo[riderKey])) - 1
|
||||||
}
|
}
|
||||||
|
if v.PhoneAscription == "" || strings.Split(v.PhoneAscription, "-")[0] != model.PhoneAscriptionAddressYes {
|
||||||
|
continue
|
||||||
|
}
|
||||||
// 自动拣货
|
// 自动拣货
|
||||||
if v.Status < model.OrderStatusFinishedPickup { // 未拣货
|
if v.Status < model.OrderStatusFinishedPickup { // 未拣货
|
||||||
handler := partner.GetPurchaseOrderHandlerFromVendorID(v.VendorID)
|
handler := partner.GetPurchaseOrderHandlerFromVendorID(v.VendorID)
|
||||||
|
|||||||
@@ -375,6 +375,11 @@ const (
|
|||||||
BusinessTypeDingshida = 2 // 定时达
|
BusinessTypeDingshida = 2 // 定时达
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
PhoneAscriptionAddressYes = "YES" // 抖音订单收货地址和电话号码归属地是否一致
|
||||||
|
PhoneAscriptionAddressNo = "No" // 抖音订单收货地址和电话号码归属地是否一致
|
||||||
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ElmSkuPromotion = map[int]int{
|
ElmSkuPromotion = map[int]int{
|
||||||
11: 1,
|
11: 1,
|
||||||
|
|||||||
@@ -160,6 +160,7 @@ type GoodsOrder struct {
|
|||||||
OrderPayPercentage int `json:"orderPayPercentage"`
|
OrderPayPercentage int `json:"orderPayPercentage"`
|
||||||
CouponIDs string `orm:"column(coupon_ids)" json:"couponIDs"` //优惠券IDs(京西商城)
|
CouponIDs string `orm:"column(coupon_ids)" json:"couponIDs"` //优惠券IDs(京西商城)
|
||||||
NotifyType int `json:"notifyType"` //0表示没有通知,1表示发的短信,2表示发的语音
|
NotifyType int `json:"notifyType"` //0表示没有通知,1表示发的短信,2表示发的语音
|
||||||
|
PhoneAscription string `orm:"column(phone_ascription)" json:"phoneAscription"` // 电话号码归属地
|
||||||
|
|
||||||
// 以下只是用于传递数据
|
// 以下只是用于传递数据
|
||||||
OriginalData string `orm:"-" json:"-"`
|
OriginalData string `orm:"-" json:"-"`
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package tiktok_store
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"git.rosy.net.cn/baseapi/platformapi/tiktok_shop/ascription_place"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
@@ -237,6 +238,20 @@ func (p *PurchaseHandler) getOrder(vendorOrgCode, vendorOrderID, vendorStoreID s
|
|||||||
orderSeq, _ := dao.GetVendorOrderNumber(dao.GetDB(), model.VendorIDDD, order.VendorStoreID)
|
orderSeq, _ := dao.GetVendorOrderNumber(dao.GetDB(), model.VendorIDDD, order.VendorStoreID)
|
||||||
order.OrderSeq = orderSeq + 1
|
order.OrderSeq = orderSeq + 1
|
||||||
|
|
||||||
|
// 抖音订单手机号和收货地址是否同城
|
||||||
|
order.PhoneAscription = ""
|
||||||
|
//ascription, err := phonedata.Find(order.ConsigneeMobile)
|
||||||
|
ascription, err := ascription_place.Find(order.ConsigneeMobile)
|
||||||
|
if err != nil {
|
||||||
|
order.PhoneAscription = model.PhoneAscriptionAddressNo + "-" + err.Error()
|
||||||
|
} else {
|
||||||
|
if strings.Contains(order.ConsigneeAddress, ascription.Province) && strings.Contains(order.ConsigneeAddress, ascription.City) {
|
||||||
|
order.PhoneAscription = model.PhoneAscriptionAddressYes + "-" + ascription.Province + ascription.City
|
||||||
|
} else {
|
||||||
|
order.PhoneAscription = model.PhoneAscriptionAddressNo + "-" + "归属信息不匹配:" + ascription.Province + ascription.City
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
jxutils.RefreshOrderSkuRelated(order)
|
jxutils.RefreshOrderSkuRelated(order)
|
||||||
return order, orderMap, nil
|
return order, orderMap, nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user