|
|
|
@ -7,8 +7,8 @@ import org.springframework.stereotype.Repository;
|
|
|
|
|
@Repository
|
|
|
|
|
@Mapper
|
|
|
|
|
public interface CartMapper {
|
|
|
|
|
@Insert("insert into cart (username,bookname) values (#{username},#{bookname})")
|
|
|
|
|
int insertItem(String username,String bookname);
|
|
|
|
|
@Insert("insert into cart (username,bookname,price,count) values (#{username},#{bookname},#{price},1)")
|
|
|
|
|
int insertItem(String username,String bookname,float price);
|
|
|
|
|
@Delete("delete from cart where username=#{username}")
|
|
|
|
|
void clearCart(String username);
|
|
|
|
|
@Select("select * from cart where username=#{username}")
|
|
|
|
|