This commit is contained in:
邹宗楠
2024-01-16 16:24:50 +08:00
parent e3eff8739b
commit 1fe0ca13b0
7 changed files with 85 additions and 41 deletions

View File

@@ -888,17 +888,17 @@ func (c *SkuController) BatchSetRestockingPrice() {
// @Title 批量设置美团商品打包费为零
// @Description 批量设置美团商品打包费为零
// @Param token header string true "认证token"
// @Param storeIds formData string true "门店id列表"
// @Param payload formData string true "json数据SpuData对象()"
// @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) {
var stores []int
if err = jxutils.Strings2Objs(params.StoreIds, &stores); err != nil {
return retVal, "", err
payload := make([]*mtwm.SetBoxPrice, 0, 0)
if err = utils.UnmarshalUseNumber([]byte(params.Payload), &payload); err != nil {
return nil, "", err
}
err = cms.BatchSetMTBoxPrice(params.Ctx, stores)
err = cms.BatchSetMTBoxPrice(params.Ctx, payload)
return retVal, "", err
})
}