template name
This commit is contained in:
@@ -60,6 +60,7 @@ var (
|
||||
)
|
||||
|
||||
func (c *PurchaseHandler) OnOrderMsg(a *jdapi.API, msg *jdapi.CallbackOrderMsg) (retVal *jdapi.CallbackResponse) {
|
||||
globals.SugarLogger.Debug("===================京东订单 := %s", utils.Format4Output(msg, false))
|
||||
primaryID := msg.BillID
|
||||
primaryID += utils.Int64ToStr(time.Now().Unix())
|
||||
jxutils.CallMsgHandler(func() {
|
||||
@@ -203,8 +204,10 @@ func (c *PurchaseHandler) getOrder(a *jdapi.API, orderID string) (order *model.G
|
||||
switch taskIndex {
|
||||
case 0:
|
||||
orderMap, err = a.QuerySingleOrder(orderID)
|
||||
globals.SugarLogger.Debugf("===========================new order order Mao%s", utils.Format4Output(orderMap, false))
|
||||
if err == nil {
|
||||
order = c.Map2Order(orderMap)
|
||||
globals.SugarLogger.Debugf("===========================new really order Mao%s", utils.Format4Output(order, false))
|
||||
if configs, err := dao.QueryConfigs(dao.GetDB(), "jdStorePageCookie", model.ConfigTypeCookie, ""); err == nil {
|
||||
//a.SetJdCookie(configs[0].Value)
|
||||
a.SetCookieWithStr(configs[0].Value)
|
||||
|
||||
@@ -453,8 +453,8 @@ func CreateFreightTemplate(storeCode int) (int64, error) {
|
||||
}}
|
||||
param.Columns = columns
|
||||
} else {
|
||||
param.Template.TemplateName += "固定运费模板"
|
||||
param.Columns = nil
|
||||
param.Template.TemplateName += "固定运费模板"
|
||||
}
|
||||
globals.SugarLogger.Debugf("param.Template.TemplateName===============%s", param.Template.TemplateName)
|
||||
resp, err := getAPI(storeDetail.VendorOrgCode, storeCode, storeDetail.VendorStoreID).FreightTemplateCreate(param)
|
||||
|
||||
@@ -133,7 +133,7 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
||||
Weight: utils.Int2Float64(storeSku.Weight),
|
||||
DeliveryDelayDay: tiktokShop.DeliveryDelayDayToDay,
|
||||
PresellType: tiktokShop.SendGoodsTypeNow,
|
||||
Supply7dayReturn: 0, // 是否支持7天无理由,0不支持,1支持,2支持(拆封后不支持)
|
||||
Supply7dayReturn: 2, // 是否支持7天无理由,0不支持,1支持,2支持(拆封后不支持)
|
||||
Mobile: storeDetail.Tel1,
|
||||
Commit: true,
|
||||
Specs: "重量|" + utils.Float64ToStr(float64(storeSku.SpecQuality)) + storeSku.SpecUnit,
|
||||
@@ -392,7 +392,7 @@ func GetDeliveryTemp(api *tiktokShop.API, vendorStoreID string, storeDetail *dao
|
||||
productProvince := utils.Str2Int64(utils.Int2Str(storeDetail.ProvinceCode)[0:2])
|
||||
tempDetail := &freightTemplate_create_request.FreightTemplateCreateParam{
|
||||
Template: &freightTemplate_create_request.Template{
|
||||
TemplateName: storeDetail.Name + "_" + utils.Int64ToStr(rand.Int63n(int64(storeDetail.ID))) + "_",
|
||||
TemplateName: storeDetail.Name + utils.Int64ToStr(rand.Int63n(int64(storeDetail.ID))),
|
||||
ProductProvince: productProvince,
|
||||
ProductCity: int64(storeDetail.CityCode),
|
||||
CalculateType: 2,
|
||||
@@ -445,6 +445,7 @@ func GetDeliveryTemp(api *tiktokShop.API, vendorStoreID string, storeDetail *dao
|
||||
return 0, err
|
||||
}
|
||||
freightId = temp.TemplateId
|
||||
dao.InsertIntoFreightTemplate(storeDetail.Store.ID, storeDetail.VendorStoreID, freightId, 0, 0, 0)
|
||||
}
|
||||
globals.SugarLogger.Debugf("freightId =last %d", freightId)
|
||||
return freightId, nil
|
||||
|
||||
Reference in New Issue
Block a user