数据库第二次大作业boostore
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.
 
 
 

100 lines
3.0 KiB

<!DOCTYPE html>
<html id="htmlId">
<head>
<title>Coverage Report > OrderMapper</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: OrderMapper (cn.edu.ecnu.stu.bookstore.mapper)</h1>
<table class="coverageStats">
<tr>
<th class="name">Class</th>
</tr>
<tr>
<td class="name">OrderMapper</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.Order;
&nbsp;import cn.edu.ecnu.stu.bookstore.pojo.OrderStatus;
&nbsp;import org.apache.ibatis.annotations.*;
&nbsp;
&nbsp;import java.math.BigDecimal;
&nbsp;import java.util.List;
&nbsp;import java.util.Map;
&nbsp;
&nbsp;@Mapper
&nbsp;public interface OrderMapper {
&nbsp;
&nbsp; @Insert(&quot;insert into t_order(order_id, buyer_id, from_address, to_address, price, status, store_id) values &quot; +
&nbsp; &quot;(#{order.orderId}, #{order.buyerId}, #{order.fromAddress}, #{order.toAddress}, #{order.price}, #{order.status.value}, &quot; +
&nbsp; &quot;#{order.storeId})&quot;)
&nbsp; int insert(@Param(&quot;order&quot;)Order order);
&nbsp;
&nbsp; int insertOrderBook(@Param(&quot;orderId&quot;) String orderId, @Param(&quot;books&quot;) List&lt;Map&lt;String, Object&gt;&gt; books);
&nbsp;
&nbsp; @Update(&quot;update t_order set status = #{status.value} where order_id = #{orderId}&quot;)
&nbsp; void updateOrderStatus(@Param(&quot;orderId&quot;) String orderId, @Param(&quot;status&quot;) OrderStatus status);
&nbsp;
&nbsp; List&lt;Order&gt; select(@Param(&quot;buyerId&quot;) Integer buyerId, @Param(&quot;status&quot;) OrderStatus status);
&nbsp;
&nbsp; Order selectById(@Param(&quot;orderId&quot;) String orderId);
&nbsp;
&nbsp; @Select(&quot;select count(*) from t_order where buyer_id = #{buyerId} and order_id = #{orderId}&quot;)
&nbsp; int checkOrder(@Param(&quot;orderId&quot;) String orderId, @Param(&quot;buyerId&quot;) Integer buyerId);
&nbsp;
&nbsp; int selectStatus(@Param(&quot;orderId&quot;) String orderId);
&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>