1
This commit is contained in:
@@ -1252,6 +1252,9 @@ func GetSensitiveWord(singleStoreHandler partner.ISingleStoreStoreSkuHandler, st
|
||||
}
|
||||
|
||||
func MergeSkuSaleStatusWithStoreOpTime(sku *dao.StoreSkuSyncInfo, storeDetail *dao.StoreDetail, now int16) (outStatus int) {
|
||||
// 只要商品在京西可售,一律上架状态,下架状态会导致,同步商品拥有可售时间但是商品下架了
|
||||
// 可售时间范围外的商品,依旧是上架状态,只是三方平台不展示商品
|
||||
return sku.MergedStatus
|
||||
if sku.MergedStatus == model.SkuStatusNormal && sku.StatusSaleBegin > 0 && sku.StatusSaleEnd > 0 && storeDetail.Status == model.StoreStatusOpened {
|
||||
//商品可售时间的差集与门店营业时间的交集为不可售,其余为原本状态
|
||||
var openTime int16
|
||||
|
||||
@@ -267,6 +267,10 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
||||
default: // 不需要或者错误
|
||||
}
|
||||
|
||||
if utils.Interface2String(userMap["backupPhone"]) != "" {
|
||||
order.ConsigneeMobile2 = jxutils.FormalizeMobile(utils.Interface2String(userMap["backupPhone"]))
|
||||
}
|
||||
|
||||
finishTime := getTimeFromInterface(orderMap["finished_time"])
|
||||
if finishTime == utils.ZeroTimeValue {
|
||||
order.OrderFinishedAt = utils.DefaultTimeValue
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package mtwm
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
push "git.rosy.net.cn/jx-callback/business/jxutils/unipush"
|
||||
@@ -164,6 +165,14 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
||||
} else {
|
||||
order.OrderFinishedAt = utils.DefaultTimeValue
|
||||
}
|
||||
if result["backup_recipient_phone"] != nil {
|
||||
backupRecipientPhone := result["backup_recipient_phone"].(string)
|
||||
phones := make([]string, 0, 0)
|
||||
json.Unmarshal([]byte(backupRecipientPhone), &phones)
|
||||
if len(phones) > model.NO {
|
||||
order.ConsigneeMobile2 = jxutils.FormalizeMobile(phones[0])
|
||||
}
|
||||
}
|
||||
pickType := int(utils.Interface2Int64WithDefault(result["pick_type"], 0))
|
||||
if pickType == mtwmapi.OrderPickTypeSelf {
|
||||
order.DeliveryType = model.OrderDeliveryTypeSelfTake
|
||||
|
||||
Reference in New Issue
Block a user