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])) {
|
||||
randTime = int64(len(riderListInfo[riderKey])) - 1
|
||||
}
|
||||
|
||||
if v.PhoneAscription == "" || strings.Split(v.PhoneAscription, "-")[0] != model.PhoneAscriptionAddressYes {
|
||||
continue
|
||||
}
|
||||
// 自动拣货
|
||||
if v.Status < model.OrderStatusFinishedPickup { // 未拣货
|
||||
handler := partner.GetPurchaseOrderHandlerFromVendorID(v.VendorID)
|
||||
|
||||
@@ -375,6 +375,11 @@ const (
|
||||
BusinessTypeDingshida = 2 // 定时达
|
||||
)
|
||||
|
||||
const (
|
||||
PhoneAscriptionAddressYes = "YES" // 抖音订单收货地址和电话号码归属地是否一致
|
||||
PhoneAscriptionAddressNo = "No" // 抖音订单收货地址和电话号码归属地是否一致
|
||||
)
|
||||
|
||||
var (
|
||||
ElmSkuPromotion = map[int]int{
|
||||
11: 1,
|
||||
|
||||
@@ -158,8 +158,9 @@ type GoodsOrder struct {
|
||||
EarningType int `json:"earningType"` //订单结算方式,2为扣点,1为报价
|
||||
OrderType int `json:"orderType"` //订单类型,0为普通订单,1为物料订单,2为进货订单
|
||||
OrderPayPercentage int `json:"orderPayPercentage"`
|
||||
CouponIDs string `orm:"column(coupon_ids)" json:"couponIDs"` //优惠券IDs(京西商城)
|
||||
NotifyType int `json:"notifyType"` //0表示没有通知,1表示发的短信,2表示发的语音
|
||||
CouponIDs string `orm:"column(coupon_ids)" json:"couponIDs"` //优惠券IDs(京西商城)
|
||||
NotifyType int `json:"notifyType"` //0表示没有通知,1表示发的短信,2表示发的语音
|
||||
PhoneAscription string `orm:"column(phone_ascription)" json:"phoneAscription"` // 电话号码归属地
|
||||
|
||||
// 以下只是用于传递数据
|
||||
OriginalData string `orm:"-" json:"-"`
|
||||
|
||||
@@ -3,6 +3,7 @@ package tiktok_store
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"git.rosy.net.cn/baseapi/platformapi/tiktok_shop/ascription_place"
|
||||
"regexp"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -237,6 +238,20 @@ func (p *PurchaseHandler) getOrder(vendorOrgCode, vendorOrderID, vendorStoreID s
|
||||
orderSeq, _ := dao.GetVendorOrderNumber(dao.GetDB(), model.VendorIDDD, order.VendorStoreID)
|
||||
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)
|
||||
return order, orderMap, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user