| | |
| | | |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.mall.dto.AddCartDto; |
| | | import cc.mrbird.febs.mall.dto.DelCartGoodsDto; |
| | | import cc.mrbird.febs.mall.service.IApiMallShoppingCartService; |
| | | import cc.mrbird.febs.mall.vo.ShoppingCartGoodsVo; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "从购物车中删除商品", notes = "从购物车中删除商品") |
| | | @PostMapping(value = "/delGoods/{id}") |
| | | public FebsResponse delGoods(@PathVariable("id") Long id) { |
| | | mallShoppingCartService.removeById(id); |
| | | @PostMapping(value = "/delGoods") |
| | | public FebsResponse delGoods(@RequestBody DelCartGoodsDto delCartGoodsDto) { |
| | | List<String> ids = StrUtil.split(delCartGoodsDto.getIds(), ','); |
| | | mallShoppingCartService.removeByIds(ids); |
| | | return new FebsResponse().success().data("删除成功"); |
| | | } |
| | | } |