package com.ruoyi.goods.controller.concole;
|
|
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.goods.service.goods.ShoppingCartService;
|
import com.ruoyi.system.api.domain.dto.AppShoppingCartDelDto;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import javax.annotation.Resource;
|
|
/**
|
* @author jqs34
|
* @ClassName ShoppingCartController
|
* @description: TODO
|
* @date 2023年05月23日
|
* @version: 1.0
|
*/
|
@RestController
|
@RequestMapping("/shoppingCart")
|
public class ShoppingCartController {
|
|
@Resource
|
private ShoppingCartService shoppingCartService;
|
|
@PostMapping("/deleteShoppingCart")
|
public R deleteShoppingCart(@RequestBody AppShoppingCartDelDto appShoppingCartDelDto)
|
{
|
shoppingCartService.deleteByUserIdAndGoodsId(appShoppingCartDelDto.getUserId(),appShoppingCartDelDto.getGoodsId());
|
return R.ok();
|
}
|
|
}
|