Commit aab0b5e1 by weijiguang

恢复部分代码

parent 1a707599
...@@ -16,6 +16,7 @@ import com.soss.system.service.impl.ShopGoodsServiceImpl; ...@@ -16,6 +16,7 @@ import com.soss.system.service.impl.ShopGoodsServiceImpl;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -216,7 +217,13 @@ public class ShopController extends BaseController { ...@@ -216,7 +217,13 @@ public class ShopController extends BaseController {
} }
@GetMapping("/updateShopGoodsSkuState") @GetMapping("/updateShopGoodsSkuState")
public AjaxResult updateShopGoodsSkuState(@RequestParam("id") Long shopGoodsSkuId, @RequestParam("state") Integer state) { public AjaxResult updateShopGoodsSkuState(@RequestParam("ids") List<Long> shopGoodsSkuIds, @RequestParam("state") Integer state) {
return AjaxResult.success(shopGoodsService.updateShopGoodsSkuState(shopGoodsSkuId, state)); if (CollectionUtils.isEmpty(shopGoodsSkuIds)) {
return AjaxResult.error("id列表为空");
}
for (Long id : shopGoodsSkuIds) {
shopGoodsService.updateShopGoodsSkuState(id, state);
}
return AjaxResult.success();
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment