mt price
This commit is contained in:
@@ -6658,7 +6658,7 @@ func BatchSetRestockingPrice(ctx *jxcontext.Context, preData map[string][]mtwmap
|
||||
if len(params) > 0 {
|
||||
globals.SugarLogger.Debugf("params=========%s %s %s", params[0].AppSpuCode, params[0].PurchasePrice, params[0].SkuID)
|
||||
}
|
||||
if err := mtwm.GetAPI(vendorOrgCode, storeID, "").BatchSetRestockingPrice(ctx.GetTrackInfo(), k, params); err != nil {
|
||||
if err := mtwm.BatchSetRestockingPrice(ctx, storeID, k, params); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,25 +196,9 @@ func (p *PurchaseHandler) DeleteStoreCategory(ctx *jxcontext.Context, storeID in
|
||||
}
|
||||
|
||||
//批量更新商品进货价
|
||||
func (p *PurchaseHandler) BatchSetRestockingPrice(ctx *jxcontext.Context, preData map[string][]mtwmapi.SpuData) error {
|
||||
var params []*mtwmapi.SpuData
|
||||
for k, v := range preData {
|
||||
//获取京西平台storeID
|
||||
if storeID, vendorOrgCode, err := dao.GetCodeAndIDByMeiTuan(k); err != nil {
|
||||
return err
|
||||
} else {
|
||||
for _, i := range v {
|
||||
param := &mtwmapi.SpuData{
|
||||
AppSpuCode: i.AppSpuCode,
|
||||
SkuID: i.SkuID,
|
||||
PurchasePrice: i.PurchasePrice,
|
||||
}
|
||||
params = append(params, param)
|
||||
}
|
||||
if err := GetAPI(vendorOrgCode, storeID, "").BatchSetRestockingPrice(ctx.GetTrackInfo(), k, params); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
func BatchSetRestockingPrice(ctx *jxcontext.Context, storeID int, vendorStoreID string, param []*mtwmapi.SpuData) error {
|
||||
if err := getAPI(getStoreVendorOrgCode(storeID), storeID, "").BatchSetRestockingPrice(ctx.GetTrackInfo(), vendorStoreID, param); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user