You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SRuml/CartMapper.java

41 lines
764 B

3 months ago
package com.example.mapper;
import com.example.entity.Cart;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* cart
*/
public interface CartMapper {
/**
*
*/
int insert(Cart cart);
/**
*
*/
int deleteById(Integer id);
/**
*
*/
int updateById(Cart cart);
/**
* ID
*/
Cart selectById(Integer id);
/**
*
*/
List<Cart> selectAll(Cart cart);
@Select("select * from cart where user_id = #{userId} and goods_id = #{goodsId}")
Cart selectByUserIdAndGoodsId(@Param("userId") Integer userId, @Param("goodsId") Integer goodsId);
}