1
This commit is contained in:
@@ -229,8 +229,6 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
||||
|
||||
// 创建子商品
|
||||
temp, err := dao.QueryStoreBindInfo(storeDetail.Store.ID)
|
||||
globals.SugarLogger.Debugf("================temp:= %s", utils.Format4Output(temp, false))
|
||||
globals.SugarLogger.Debugf("================storeDetail:= %s", utils.Format4Output(storeDetail, false))
|
||||
if err != nil || temp == nil || temp.ID == 0 {
|
||||
// 运费模板
|
||||
param.FreightId, err = GetDeliveryTemp(api, vendorStoreID, storeDetail)
|
||||
@@ -259,13 +257,10 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
||||
// 运费模板
|
||||
param.FreightId, err = GetDeliveryTemp(api, vendorStoreID, storeDetail)
|
||||
if err != nil {
|
||||
globals.SugarLogger.Debugf("=========FreightId=======err:= %s", utils.Format4Output(err, false))
|
||||
return nil, err
|
||||
}
|
||||
temp.TemplateID = param.FreightId
|
||||
globals.SugarLogger.Debugf("================temp:= %s", utils.Format4Output(temp, false))
|
||||
_, err = dao.UpdateEntity(db, temp, "TemplateID")
|
||||
globals.SugarLogger.Debugf("================err:= %s", utils.Format4Output(err, false))
|
||||
}
|
||||
if temp.TradeLimitID != 0 {
|
||||
param.SaleLimitId = temp.TradeLimitID
|
||||
@@ -277,7 +272,6 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
||||
}
|
||||
temp.TradeLimitID = param.SaleLimitId
|
||||
_, err = dao.UpdateEntity(db, temp, "TradeLimitID")
|
||||
globals.SugarLogger.Debugf("================2err:= %s", utils.Format4Output(err, false))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user