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

136 lines
2.8 KiB

<!DOCTYPE html>
<html id="htmlId">
<head>
<title>Coverage Report > Result</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.component</a>
</div>
<h1>Coverage Summary for Class: Result (cn.edu.ecnu.stu.bookstore.component)</h1>
<table class="coverageStats">
<tr>
<th class="name">Class</th>
<th class="coverageStat
">
Class, %
</th>
<th class="coverageStat
">
Method, %
</th>
<th class="coverageStat
">
Line, %
</th>
</tr>
<tr>
<td class="name">Result</td>
<td class="coverageStat">
<span class="percent">
100%
</span>
<span class="absValue">
(1/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
87.5%
</span>
<span class="absValue">
(7/8)
</span>
</td>
<td class="coverageStat">
<span class="percent">
90.9%
</span>
<span class="absValue">
(10/11)
</span>
</td>
</tr>
</table>
<br/>
<br/>
<pre>
<code class="sourceCode" id="sourceCode">&nbsp;package cn.edu.ecnu.stu.bookstore.component;
&nbsp;
&nbsp;import lombok.Data;
&nbsp;
<b class="nc">&nbsp;@Data</b>
&nbsp;public class Result {
&nbsp;
<b class="fc">&nbsp; private Object data;</b>
&nbsp;
<b class="fc">&nbsp; private String message;</b>
&nbsp;
<b class="fc">&nbsp; private String code;</b>
&nbsp;
<b class="fc">&nbsp; public Result(String code, String message, Object data) {</b>
<b class="fc">&nbsp; this.code = code;</b>
<b class="fc">&nbsp; this.message = message;</b>
<b class="fc">&nbsp; this.data = data;</b>
&nbsp; }
&nbsp;
&nbsp; public static Result success(Object data) {
<b class="fc">&nbsp; return new Result(Constants.SUCCESS, &quot;ok&quot;, data);</b>
&nbsp; }
&nbsp;
&nbsp; public static Result error(String code, String message) {
<b class="fc">&nbsp; return new Result(code, message, null);</b>
&nbsp; }
&nbsp;
&nbsp; public static Result success() {
<b class="fc">&nbsp; return new Result(Constants.SUCCESS, Constants.SUCCESS_MESSAGE, null);</b>
&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 14:34</div>
</div>
</body>
</html>