|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
<html id="htmlId">
|
|
<head>
|
|
<title>Coverage Report > BookMapper</title>
|
|
<style type="text/css">
|
|
@import "../../css/coverage.css";
|
|
@import "../../css/idea.min.css";
|
|
</style>
|
|
<script type="text/javascript" src="../../js/highlight.min.js"></script>
|
|
<script type="text/javascript" src="../../js/highlightjs-line-numbers.min.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="content">
|
|
<div class="breadCrumbs">
|
|
Current scope: <a href="../../index.html">all classes</a>
|
|
<span class="separator">|</span>
|
|
<a href="../index.html">cn.edu.ecnu.stu.bookstore.mapper</a>
|
|
</div>
|
|
|
|
<h1>Coverage Summary for Class: BookMapper (cn.edu.ecnu.stu.bookstore.mapper)</h1>
|
|
|
|
<table class="coverageStats">
|
|
<tr>
|
|
<th class="name">Class</th>
|
|
</tr>
|
|
<tr>
|
|
<td class="name">BookMapper</td>
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<br/>
|
|
<br/>
|
|
|
|
|
|
<pre>
|
|
<code class="sourceCode" id="sourceCode"> package cn.edu.ecnu.stu.bookstore.mapper;
|
|
|
|
import cn.edu.ecnu.stu.bookstore.pojo.Book;
|
|
import cn.edu.ecnu.stu.bookstore.pojo.vo.NewOrderVO;
|
|
import org.apache.ibatis.annotations.*;
|
|
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Set;
|
|
|
|
@Mapper
|
|
public interface BookMapper {
|
|
|
|
int insert(@Param("book") Book book);
|
|
|
|
List<String> selectTags(@Param("book_id") String bookId);
|
|
|
|
int insertTags(@Param("book_id") String bookId, @Param("tags") List<String> tags);
|
|
|
|
List<String> selectPictures(@Param("book_id") String bookId);
|
|
|
|
int insertPictures(@Param("book_id") String bookId, @Param("pictures") List<String> pictures);
|
|
|
|
@Insert("insert into t_book_detail(book_id, author_intro, book_intro, content) values " +
|
|
"(#{book.bookId}, #{book.authorIntro}, #{book.bookIntro}, #{book.content})")
|
|
int insertBookDetail(@Param("book") Book book);
|
|
|
|
@Select("select count(*) from t_book where store_id = #{storeId} and book_id = #{bookId}")
|
|
int checkBook(@Param("storeId") String storeId, @Param("bookId") String bookId);
|
|
|
|
@Update("update t_book set stock_level = stock_level + #{addStockLevel} where store_id = #{storeId} and book_id = #{bookId}")
|
|
void addStockLevel(@Param("storeId") String storeId, @Param("bookId") String bookId, @Param("addStockLevel") int addStockLevel);
|
|
|
|
List<Book> batchSelect(@Param("storeId") String storeId, @Param("books") Set<String> books);
|
|
|
|
@Update("update t_book set stock_level = stock_level - #{count} where book_id = #{bookId}")
|
|
int minusStockLevel(@Param("bookId") String bookId, @Param("count") int count);
|
|
|
|
List<Book> getBookByTitle(@Param("title") String title, @Param("storeId") String storeId, @Param("start") Integer start, @Param("size") Integer size);
|
|
|
|
List<Book> getBookByAuthor(@Param("author") String author, @Param("storeId") String storeId, @Param("start") Integer start, @Param("size") Integer size);
|
|
|
|
List<Book> getBookByTag(@Param("tag") String tag, @Param("storeId") String storeId, @Param("start") Integer start, @Param("size") Integer size);
|
|
|
|
List<Book> getBookByContent(@Param("content") String content, @Param("storeId") String storeId, @Param("start") Integer start, @Param("size") Integer size);
|
|
|
|
|
|
|
|
|
|
}
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
(function() {
|
|
var msie = false, msie9 = false;
|
|
/*@cc_on
|
|
msie = true;
|
|
@if (@_jscript_version >= 9)
|
|
msie9 = true;
|
|
@end
|
|
@*/
|
|
|
|
if (!msie || msie && msie9) {
|
|
hljs.highlightAll()
|
|
hljs.initLineNumbersOnLoad();
|
|
}
|
|
})();
|
|
</script>
|
|
|
|
<div class="footer">
|
|
|
|
<div style="float:right;">generated on 2023-12-12 18:32</div>
|
|
</div>
|
|
</body>
|
|
</html>
|