|
|
@ -22,7 +22,7 @@ public class CartController {
|
|
|
|
BookMapper bookMapper;
|
|
|
|
BookMapper bookMapper;
|
|
|
|
|
|
|
|
|
|
|
|
//添加商品进购物车 (用户名,书名为联合主键)>>连接插入,价格为书的单价,数量设为1
|
|
|
|
//添加商品进购物车 (用户名,书名为联合主键)>>连接插入,价格为书的单价,数量设为1
|
|
|
|
/*@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
@GetMapping("/addintocart")
|
|
|
|
@GetMapping("/addintocart")
|
|
|
|
public Result AddBookIn(@RequestParam("username")String username,@RequestParam("bookname") String bookname){
|
|
|
|
public Result AddBookIn(@RequestParam("username")String username,@RequestParam("bookname") String bookname){
|
|
|
|
//把数量默认都设为1
|
|
|
|
//把数量默认都设为1
|
|
|
@ -40,7 +40,7 @@ public class CartController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
res.data=null;
|
|
|
|
res.data=null;
|
|
|
|
return res;
|
|
|
|
return res;
|
|
|
|
}*/
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//清空购物车
|
|
|
|
//清空购物车
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|