This commit is contained in:
邹宗楠
2024-04-03 16:39:33 +08:00
parent 62827f0826
commit 09cb41ce78
4 changed files with 62 additions and 48 deletions

View File

@@ -902,18 +902,16 @@ func (c *SkuController) BatchSetRestockingPrice() {
// @Title 批量设置美团商品打包费为零
// @Description 批量设置美团商品打包费为零
// @Param token header string true "认证token"
// @Param payload formData string true "json数据SpuData对象()"
// @Param storeIDs query string false "门店ID列表"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /BatchSetBoxPrice [post]
func (c *SkuController) BatchSetBoxPrice() {
c.callBatchSetBoxPrice(func(params *tSkuBatchSetBoxPriceParams) (retVal interface{}, errCode string, err error) {
payload := make([]*mtwm.SetBoxPrice, 0, 0)
if err = utils.UnmarshalUseNumber([]byte(params.Payload), &payload); err != nil {
return nil, "", err
}
err = cms.BatchSetMTBoxPrice(params.Ctx, payload)
var storeIDs []int
err = jxutils.Strings2Objs(params.StoreIDs, &storeIDs)
err = cms.BatchSetMTBoxPrice(params.Ctx, storeIDs)
return retVal, "", err
})
}