|
@@ -50,30 +50,13 @@
|
|
|
</if>
|
|
|
<if test="dictCode != null and dictCode != ''">
|
|
|
and (DICT_CODE LIKE CONCAT('%',#{dictCode},'%')
|
|
|
- </if>
|
|
|
- <if test="dictValue != null and dictValue != ''">
|
|
|
- or DICT_VALUE LIKE CONCAT('%',#{dictValue},'%'))
|
|
|
+ or DICT_VALUE LIKE CONCAT('%',#{dictCode},'%'))
|
|
|
</if>
|
|
|
<if test="parentDictId != null and parentDictId != ''">
|
|
|
and PARENT_DICT_ID = #{parentDictId}
|
|
|
</if>
|
|
|
- <if test="remark != null and remark != ''">
|
|
|
- and REMARK = #{remark}
|
|
|
- </if>
|
|
|
- <if test="status != null">
|
|
|
- and STATUS = #{status}
|
|
|
- </if>
|
|
|
- <if test="createBy != null and createBy != ''">
|
|
|
- and CREATE_BY = #{createBy}
|
|
|
- </if>
|
|
|
- <if test="dateCreate != null">
|
|
|
- and DATE_CREATE = #{dateCreate}
|
|
|
- </if>
|
|
|
- <if test="updateBy != null and updateBy != ''">
|
|
|
- and UPDATE_BY = #{updateBy}
|
|
|
- </if>
|
|
|
- <if test="dateUpdate != null">
|
|
|
- and DATE_UPDATE = #{dateUpdate}
|
|
|
+ <if test="parentDictCode != null and parentDictCode != ''">
|
|
|
+ and PARENT_DICT_ID in (select ID from uims_dict where DICT_CODE=#{parentDictCode})
|
|
|
</if>
|
|
|
and STATUS =1
|
|
|
</where>
|
|
@@ -174,38 +157,22 @@
|
|
|
<if test="dict.id != null">
|
|
|
and ID = #{dict.id}
|
|
|
</if>
|
|
|
- <if test="dict.dictName != null and dict.dictName != ''">
|
|
|
- and (DICT_NAME LIKE CONCAT('%',#{dict.dictName},'%')
|
|
|
- </if>
|
|
|
- <if test="dict.dictCode != null and dict.dictCode != ''">
|
|
|
+ <if test="dict.parentDictId == null and dict.dictCode != null and dict.dictCode != ''">
|
|
|
+ and (DICT_NAME LIKE CONCAT('%',#{dict.dictCode},'%')
|
|
|
or DICT_CODE LIKE CONCAT('%',#{dict.dictCode},'%'))
|
|
|
</if>
|
|
|
- <if test="dict.dictValue != null and dict.dictValue != ''">
|
|
|
- and DICT_VALUE = #{dict.dictValue}
|
|
|
+ <if test="dict.parentDictId != null and dict.dictCode != null and dict.dictCode != ''">
|
|
|
+ and (DICT_VALUE LIKE CONCAT('%',#{dict.dictCode},'%')
|
|
|
+ or DICT_CODE LIKE CONCAT('%',#{dict.dictCode},'%'))
|
|
|
</if>
|
|
|
- <if test="dict.parentDictId != null and dict.parentDictId != ''">
|
|
|
+ <if test="dict.parentDictId != null ">
|
|
|
and PARENT_DICT_ID = #{dict.parentDictId}
|
|
|
</if>
|
|
|
- <if test="dict.remark != null and dict.remark != ''">
|
|
|
- and REMARK = #{dict.remark}
|
|
|
- </if>
|
|
|
- <if test="dict.status != null">
|
|
|
- and STATUS = #{dict.status}
|
|
|
- </if>
|
|
|
- <if test="dict.createBy != null and dict.createBy != ''">
|
|
|
- and CREATE_BY = #{dict.createBy}
|
|
|
- </if>
|
|
|
- <if test="dict.dateCreate != null">
|
|
|
- and DATE_CREATE = #{dict.dateCreate}
|
|
|
- </if>
|
|
|
- <if test="dict.updateBy != null and dict.updateBy != ''">
|
|
|
- and UPDATE_BY = #{dict.updateBy}
|
|
|
- </if>
|
|
|
- <if test="dict.dateUpdate != null">
|
|
|
- and DATE_UPDATE = #{dict.dateUpdate}
|
|
|
+ <if test="dict.parentDictId == null">
|
|
|
+ and PARENT_DICT_ID IS NULL
|
|
|
</if>
|
|
|
- and PARENT_DICT_ID IS NULL
|
|
|
and STATUS =1
|
|
|
+ order by DATE_CREATE desc
|
|
|
</where>
|
|
|
</select>
|
|
|
</mapper>
|