fix<购物车移出问题>

master
liyansheng 2024-12-21 20:56:37 +08:00
parent 78f1155583
commit 01ecf1a584
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ public class CartDao {
// 移除购物车
public int deleteCart(Integer user_id, Integer product_id) throws Exception {
String sql = "delete from cart where user_id=? and product_id=?";
return queryRunner.update(sql, user_id, product_id);
return queryRunner.update(sql, product_id, user_id);
}
// 某用户的购物车
public List<Computer> getCart(Integer user_id) throws Exception {

View File

@ -16,7 +16,7 @@
<a href="/user?action=list">用户列表</a>
<a href="/orders?action=all">所有订单</a>
</c:if>
<a href="/logout">注销登录</a>
<a href="/logout">退出</a>
</c:if>
<c:if test="${sessionScope.user == null}">