|
@@ -20,37 +20,37 @@
|
|
|
<!-- 查集合 - 根据条件(参数为空时代表忽略指定条件) [G] -->
|
|
|
<select id="getList" resultMap="model">
|
|
|
<include refid="select_sql"></include>
|
|
|
-<!-- <where>-->
|
|
|
-<!-- <if test=' this.has("id") '> and id = #{id} </if>-->
|
|
|
-<!-- <if test=' this.has("title") '> and title = #{title} </if>-->
|
|
|
-<!-- <if test=' this.has("url") '> and url = #{url} </if>-->
|
|
|
-<!-- <if test=' this.has("content") '> and content = #{content} </if>-->
|
|
|
-<!-- <if test=' this.has("source") '> and source = #{source} </if>-->
|
|
|
-<!-- <if test=' this.has("readCount") '> and read_count = #{readCount} </if>-->
|
|
|
-<!-- <if test=' this.has("isRelease") '> and is_release = #{isRelease} </if>-->
|
|
|
-<!-- <if test=' this.has("status") '> and status = #{status} </if>-->
|
|
|
-<!-- <if test=' this.has("createBy") '> and create_by = #{createBy} </if>-->
|
|
|
-<!-- <if test=' this.has("createName") '> and create_name = #{createName} </if>-->
|
|
|
-<!-- <if test=' this.has("updateBy") '> and update_by = #{updateBy} </if>-->
|
|
|
-<!-- <if test=' this.has("updateName") '> and update_name = #{updateName} </if>-->
|
|
|
-<!-- </where>-->
|
|
|
-<!-- order by-->
|
|
|
-<!-- <choose>-->
|
|
|
-<!-- <when test='sortType == 1'> id desc </when>-->
|
|
|
-<!-- <when test='sortType == 2'> title desc </when>-->
|
|
|
-<!-- <when test='sortType == 3'> source desc </when>-->
|
|
|
-<!-- <when test='sortType == 4'> read_count desc </when>-->
|
|
|
-<!-- <when test='sortType == 5'> is_release desc </when>-->
|
|
|
-<!-- <when test='sortType == 6'> release_time desc </when>-->
|
|
|
-<!-- <when test='sortType == 7'> status desc </when>-->
|
|
|
-<!-- <when test='sortType == 8'> create_by desc </when>-->
|
|
|
-<!-- <when test='sortType == 9'> create_name desc </when>-->
|
|
|
-<!-- <when test='sortType == 10'> create_time desc </when>-->
|
|
|
-<!-- <when test='sortType == 11'> update_by desc </when>-->
|
|
|
-<!-- <when test='sortType == 12'> update_name desc </when>-->
|
|
|
-<!-- <when test='sortType == 13'> update_time desc </when>-->
|
|
|
-<!-- <otherwise> id desc </otherwise>-->
|
|
|
-<!-- </choose>-->
|
|
|
+ <where>
|
|
|
+ <if test=' this.has("id") '> and id = #{id} </if>
|
|
|
+ <if test=' this.has("title") '> and title like concat('%', #{title}, '%') </if>
|
|
|
+ <if test=' this.has("url") '> and url = #{url} </if>
|
|
|
+ <if test=' this.has("content") '> and content = #{content} </if>
|
|
|
+ <if test=' this.has("source") '> and source = #{source} </if>
|
|
|
+ <if test=' this.has("readCount") '> and read_count = #{readCount} </if>
|
|
|
+ <if test=' this.has("isRelease") '> and is_release = #{isRelease} </if>
|
|
|
+ <if test=' this.has("status") '> and status = #{status} </if>
|
|
|
+ <if test=' this.has("createBy") '> and create_by = #{createBy} </if>
|
|
|
+ <if test=' this.has("createName") '> and create_name = #{createName} </if>
|
|
|
+ <if test=' this.has("updateBy") '> and update_by = #{updateBy} </if>
|
|
|
+ <if test=' this.has("updateName") '> and update_name = #{updateName} </if>
|
|
|
+ </where>
|
|
|
+ order by
|
|
|
+ <choose>
|
|
|
+ <when test='sortType == 1'> id desc </when>
|
|
|
+ <when test='sortType == 2'> title desc </when>
|
|
|
+ <when test='sortType == 3'> source desc </when>
|
|
|
+ <when test='sortType == 4'> read_count desc </when>
|
|
|
+ <when test='sortType == 5'> is_release desc </when>
|
|
|
+ <when test='sortType == 6'> release_time desc </when>
|
|
|
+ <when test='sortType == 7'> status desc </when>
|
|
|
+ <when test='sortType == 8'> create_by desc </when>
|
|
|
+ <when test='sortType == 9'> create_name desc </when>
|
|
|
+ <when test='sortType == 10'> create_time desc </when>
|
|
|
+ <when test='sortType == 11'> update_by desc </when>
|
|
|
+ <when test='sortType == 12'> update_name desc </when>
|
|
|
+ <when test='sortType == 13'> update_time desc </when>
|
|
|
+ <otherwise> id desc </otherwise>
|
|
|
+ </choose>
|
|
|
</select>
|
|
|
|
|
|
|