Showing
1 changed file
with
15 additions
and
17 deletions
@@ -18,7 +18,6 @@ | @@ -18,7 +18,6 @@ | ||
18 | 18 | ||
19 | ### 对应SQL的操作库表 | 19 | ### 对应SQL的操作库表 |
20 | 20 | ||
21 | -``` | ||
22 | <select id="selectTagsCount" resultType="java.lang.Integer" > | 21 | <select id="selectTagsCount" resultType="java.lang.Integer" > |
23 | select | 22 | select |
24 | IFNULL(count(1),0) | 23 | IFNULL(count(1),0) |
@@ -35,23 +34,22 @@ | @@ -35,23 +34,22 @@ | ||
35 | </select> | 34 | </select> |
36 | 35 | ||
37 | <select id="selectByNameAndClassifyAndHot" resultMap="BaseResultMap" > | 36 | <select id="selectByNameAndClassifyAndHot" resultMap="BaseResultMap" > |
38 | - select | ||
39 | - <include refid="Base_Column_List" /> | ||
40 | - from article_tags where 1 = 1 | ||
41 | - <if test="tagName != null and tagName != ''" > | ||
42 | - and tag_name like concat('%', #{tagName, jdbcType=VARCHAR}, '%') | ||
43 | - </if> | ||
44 | - <if test="classifyId != null and classifyId != ''" > | ||
45 | - and classify_id = #{classifyId,jdbcType=INTEGER} | ||
46 | - </if> | ||
47 | - <if test="isHot != null and isHot != ''" > | ||
48 | - and is_hot = #{isHot,jdbcType=TINYINT} | ||
49 | - </if> | ||
50 | - order by id desc | ||
51 | - limit #{offset},#{size} | ||
52 | - </select> | 37 | + select |
38 | + <include refid="Base_Column_List" /> | ||
39 | + from article_tags where 1 = 1 | ||
40 | + <if test="tagName != null and tagName != ''" > | ||
41 | + and tag_name like concat('%', #{tagName, jdbcType=VARCHAR}, '%') | ||
42 | + </if> | ||
43 | + <if test="classifyId != null and classifyId != ''" > | ||
44 | + and classify_id = #{classifyId,jdbcType=INTEGER} | ||
45 | + </if> | ||
46 | + <if test="isHot != null and isHot != ''" > | ||
47 | + and is_hot = #{isHot,jdbcType=TINYINT} | ||
48 | + </if> | ||
49 | + order by id desc | ||
50 | + limit #{offset},#{size} | ||
51 | + </select> | ||
53 | 52 | ||
54 | -``` | ||
55 | 53 | ||
56 | ### 错误编码 | 54 | ### 错误编码 |
57 | 55 |
-
Please register or login to post a comment