This commit is contained in:
richboo111
2022-11-16 10:45:57 +08:00
parent 4e2fc9e4c0
commit 7ba43abb27
4 changed files with 53 additions and 11 deletions

View File

@@ -195,6 +195,30 @@ func (p *PurchaseHandler) DeleteStoreCategory(ctx *jxcontext.Context, storeID in
return err
}
//批量更新商品进货价
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
}
}
}
return nil
}
// 门店商品
// 多门店平台不需要实现这个接口