style: 代码格式化

This commit is contained in:
郝先瑞 2022-07-04 00:17:10 +08:00
parent 326cf75e48
commit f8d3e241d5

View File

@ -8,7 +8,6 @@
<id property="id" column="id" jdbcType="BIGINT"/> <id property="id" column="id" jdbcType="BIGINT"/>
<result property="name" column="name" jdbcType="VARCHAR"/> <result property="name" column="name" jdbcType="VARCHAR"/>
<result property="value" column="value" jdbcType="VARCHAR"/> <result property="value" column="value" jdbcType="VARCHAR"/>
<result property="dictCode" column="dict_code" jdbcType="VARCHAR"/>
<result property="sort" column="sort" jdbcType="INTEGER"/> <result property="sort" column="sort" jdbcType="INTEGER"/>
<result property="status" column="status" jdbcType="BOOLEAN"/> <result property="status" column="status" jdbcType="BOOLEAN"/>
<result property="defaulted" column="defaulted" jdbcType="BOOLEAN"/> <result property="defaulted" column="defaulted" jdbcType="BOOLEAN"/>
@ -26,15 +25,19 @@
<select id="list" resultMap="BaseResultMap" > <select id="list" resultMap="BaseResultMap" >
select a.*,b.name as dict_name from sys_dict_item a SELECT
left join sys_dict b on a.dict_code=b.code a.*,
where 1=1 b.name as dict_name
FROM
<if test='dictItem.name != null and dictItem.name.trim() neq ""'> sys_dict_item a
and a.name like concat('%',#{dictItem.name},'%') LEFT JOIN sys_dict b ON a.dict_code=b.code
</if> <where>
<if test='dictItem.dictCode !=null and dictItem.dictCode.trim() neq ""'> <if test='dictItem.name != null and dictItem.name.trim() neq ""'>
and a.dict_code = #{dictItem.dictCode} AND a.name like concat('%',#{dictItem.name},'%')
</if> </if>
<if test='dictItem.dictCode !=null and dictItem.dictCode.trim() neq ""'>
AND a.dict_code = #{dictItem.dictCode}
</if>
</where>
</select> </select>
</mapper> </mapper>