数据库第二次大作业boostore
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

117 řádky
4.2 KiB

<!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">&nbsp;package cn.edu.ecnu.stu.bookstore.mapper;
&nbsp;
&nbsp;import cn.edu.ecnu.stu.bookstore.pojo.Book;
&nbsp;import cn.edu.ecnu.stu.bookstore.pojo.vo.NewOrderVO;
&nbsp;import org.apache.ibatis.annotations.*;
&nbsp;
&nbsp;import java.util.List;
&nbsp;import java.util.Map;
&nbsp;import java.util.Set;
&nbsp;
&nbsp;@Mapper
&nbsp;public interface BookMapper {
&nbsp;
&nbsp; int insert(@Param(&quot;book&quot;) Book book);
&nbsp;
&nbsp; List&lt;String&gt; selectTags(@Param(&quot;book_id&quot;) String bookId);
&nbsp;
&nbsp; int insertTags(@Param(&quot;book_id&quot;) String bookId, @Param(&quot;tags&quot;) List&lt;String&gt; tags);
&nbsp;
&nbsp; List&lt;String&gt; selectPictures(@Param(&quot;book_id&quot;) String bookId);
&nbsp;
&nbsp; int insertPictures(@Param(&quot;book_id&quot;) String bookId, @Param(&quot;pictures&quot;) List&lt;String&gt; pictures);
&nbsp;
&nbsp; @Insert(&quot;insert into t_book_detail(book_id, author_intro, book_intro, content) values &quot; +
&nbsp; &quot;(#{book.bookId}, #{book.authorIntro}, #{book.bookIntro}, #{book.content})&quot;)
&nbsp; int insertBookDetail(@Param(&quot;book&quot;) Book book);
&nbsp;
&nbsp; @Select(&quot;select count(*) from t_book where store_id = #{storeId} and book_id = #{bookId}&quot;)
&nbsp; int checkBook(@Param(&quot;storeId&quot;) String storeId, @Param(&quot;bookId&quot;) String bookId);
&nbsp;
&nbsp; @Update(&quot;update t_book set stock_level = stock_level + #{addStockLevel} where store_id = #{storeId} and book_id = #{bookId}&quot;)
&nbsp; void addStockLevel(@Param(&quot;storeId&quot;) String storeId, @Param(&quot;bookId&quot;) String bookId, @Param(&quot;addStockLevel&quot;) int addStockLevel);
&nbsp;
&nbsp; List&lt;Book&gt; batchSelect(@Param(&quot;storeId&quot;) String storeId, @Param(&quot;books&quot;) Set&lt;String&gt; books);
&nbsp;
&nbsp; @Update(&quot;update t_book set stock_level = stock_level - #{count} where book_id = #{bookId}&quot;)
&nbsp; int minusStockLevel(@Param(&quot;bookId&quot;) String bookId, @Param(&quot;count&quot;) int count);
&nbsp;
&nbsp; List&lt;Book&gt; getBookByTitle(@Param(&quot;title&quot;) String title, @Param(&quot;storeId&quot;) String storeId, @Param(&quot;start&quot;) Integer start, @Param(&quot;size&quot;) Integer size);
&nbsp;
&nbsp; List&lt;Book&gt; getBookByAuthor(@Param(&quot;author&quot;) String author, @Param(&quot;storeId&quot;) String storeId, @Param(&quot;start&quot;) Integer start, @Param(&quot;size&quot;) Integer size);
&nbsp;
&nbsp; List&lt;Book&gt; getBookByTag(@Param(&quot;tag&quot;) String tag, @Param(&quot;storeId&quot;) String storeId, @Param(&quot;start&quot;) Integer start, @Param(&quot;size&quot;) Integer size);
&nbsp;
&nbsp; List&lt;Book&gt; getBookByContent(@Param(&quot;content&quot;) String content, @Param(&quot;storeId&quot;) String storeId, @Param(&quot;start&quot;) Integer start, @Param(&quot;size&quot;) Integer size);
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;}
</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>