Coverage Summary for Class: StoreMapper (cn.edu.ecnu.stu.bookstore.mapper)

Class
StoreMapper


 package cn.edu.ecnu.stu.bookstore.mapper;
 
 import cn.edu.ecnu.stu.bookstore.pojo.Store;
 import org.apache.ibatis.annotations.Insert;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 
 @Mapper
 public interface StoreMapper {
 
     @Select("select count(*) from t_store where store_id = #{store_id}")
     int checkStoreExist(@Param("store_id") String storeId);
 
     @Select("select count(*) from t_store where store_id = #{store_id} and store_id = #{store_id}")
     int checkStore(@Param("seller_id") Integer sellerId, @Param("store_id") String storeId);
 
     @Insert("insert into t_store(store_id, seller_id) values(#{store.storeId}, #{store.sellerId})")
     int insert(@Param("store") Store store);
 
     @Select("select store_id, seller_id, create_time from t_store where store_id = #{storeId}")
     Store getStoreById(@Param("storeId") String storeId);
 
 }