|
@@ -36,39 +36,39 @@
|
|
|
JOIN zb_gallery_category zgc on zgc.id = zg.category_id
|
|
|
<where>
|
|
|
<if test="obj != null">
|
|
|
- <if test="obj.name != null and obj.name != ''">
|
|
|
- and zg.name like concat('%', #{obj.name}, '%')
|
|
|
- </if>
|
|
|
- <if test="obj.cnName != null and obj.cnName != ''">
|
|
|
- and zg.cn_name like concat('%', #{obj.cnName}, '%')
|
|
|
- </if>
|
|
|
- <if test="obj.ptName != null and obj.ptName != ''">
|
|
|
- and zg.pt_name like concat('%', #{obj.ptName}, '%')
|
|
|
- </if>
|
|
|
- <if test="obj.latinName != null and obj.latinName != ''">
|
|
|
- and zg.latin_name like concat('%', #{obj.latinName}, '%')
|
|
|
- </if>
|
|
|
- <if test="obj.distribution != null and obj.distribution != ''">
|
|
|
- and zg.distribution = #{obj.distribution}
|
|
|
- </if>
|
|
|
- <if test="obj.host != null and obj.host != ''">
|
|
|
- and zg.host = #{obj.host}
|
|
|
- </if>
|
|
|
- <if test="obj.form != null and obj.form != ''">
|
|
|
- and zg.form = #{obj.form}
|
|
|
- </if>
|
|
|
- <if test="obj.symptom != null and obj.symptom != ''">
|
|
|
- and zg.symptom = #{obj.symptom}
|
|
|
- </if>
|
|
|
- <if test="obj.category != null and obj.category != ''">
|
|
|
- and zg.category = #{obj.category}
|
|
|
- </if>
|
|
|
- <if test="obj.categoryId != null ">
|
|
|
- and zg.category_id = #{obj.categoryId}
|
|
|
- </if>
|
|
|
+ <if test="obj.name != null and obj.name != ''">
|
|
|
+ and zg.name like concat('%', #{obj.name}, '%')
|
|
|
</if>
|
|
|
+ <if test="obj.cnName != null and obj.cnName != ''">
|
|
|
+ and zg.cn_name like concat('%', #{obj.cnName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="obj.ptName != null and obj.ptName != ''">
|
|
|
+ and zg.pt_name like concat('%', #{obj.ptName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="obj.latinName != null and obj.latinName != ''">
|
|
|
+ and zg.latin_name like concat('%', #{obj.latinName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="obj.distribution != null and obj.distribution != ''">
|
|
|
+ and zg.distribution = #{obj.distribution}
|
|
|
+ </if>
|
|
|
+ <if test="obj.host != null and obj.host != ''">
|
|
|
+ and zg.host = #{obj.host}
|
|
|
+ </if>
|
|
|
+ <if test="obj.form != null and obj.form != ''">
|
|
|
+ and zg.form = #{obj.form}
|
|
|
+ </if>
|
|
|
+ <if test="obj.symptom != null and obj.symptom != ''">
|
|
|
+ and zg.symptom = #{obj.symptom}
|
|
|
+ </if>
|
|
|
+ <if test="obj.category != null and obj.category != ''">
|
|
|
+ and zg.category = #{obj.category}
|
|
|
+ </if>
|
|
|
+ <if test="obj.categoryId != null ">
|
|
|
+ and zg.category_id = #{obj.categoryId}
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
</where>
|
|
|
- order by zg.category DESC, zg.sort, zg.latin_name is null, zg.latin_name, CONVERT(zg.cn_name USING gbk)
|
|
|
+ order by zg.category DESC, zg.sort, zg.latin_name is null, zg.latin_name, CONVERT(zg.cn_name using gb2312)
|
|
|
</select>
|
|
|
|
|
|
<resultMap id="GalleryDtoMap" type="com.ruoyi.system.dto.GalleryDto">
|