init
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.senmesh.codesetting.dao.CodeSettingMapper">
|
||||
|
||||
<select id="list" resultType="com.senmesh.codesetting.dto.CodeSettingDTO">
|
||||
SELECT t.*
|
||||
<include refid="queryFromSql"></include>
|
||||
</select>
|
||||
|
||||
<select id="page" resultType="com.senmesh.codesetting.dto.CodeSettingDTO">
|
||||
SELECT t.*
|
||||
<include refid="queryFromSql"></include>
|
||||
</select>
|
||||
|
||||
<sql id="queryFromSql">
|
||||
FROM
|
||||
xs_code_setting t
|
||||
WHERE t.deleted = 0
|
||||
<if test='param.id != null'>
|
||||
AND t.id = #{param.id}
|
||||
</if>
|
||||
<if test='param.code != null and param.code.trim() != ""'>
|
||||
AND t.code = #{param.code}
|
||||
</if>
|
||||
<if test='param.codeLike != null and param.codeLike.trim() != ""'>
|
||||
<bind name="codeLike" value="'%' + param.codeLike + '%'"/>
|
||||
AND t.code like #{codeLike}
|
||||
</if>
|
||||
<if test='param.nameLike != null and param.nameLike.trim() != ""'>
|
||||
<bind name="nameLike" value="'%' + param.nameLike + '%'"/>
|
||||
AND t.name like #{nameLike}
|
||||
</if>
|
||||
<if test='param.remark != null and param.remark.trim() != ""'>
|
||||
AND t.remark = #{param.remark}
|
||||
</if>
|
||||
<if test='param.type != null and param.type.trim() != ""'>
|
||||
AND t.type = #{param.type}
|
||||
</if>
|
||||
<if test='param.dataType != null and param.dataType.trim() != ""'>
|
||||
AND t.data_type = #{param.dataType}
|
||||
</if>
|
||||
<if test='param.level != null and param.level.trim() != ""'>
|
||||
AND FIND_IN_SET(CONCAT(#{param.level},""),t.level)
|
||||
</if>
|
||||
<if test='param.createTimeStart != null'>
|
||||
AND t.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test='param.createTimeEnd != null'>
|
||||
AND t.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test='param.updateTimeStart != null'>
|
||||
AND t.update_time >= #{param.updateTimeStart}
|
||||
</if>
|
||||
<if test='param.updateTimeEnd != null'>
|
||||
AND t.update_time <= #{param.updateTimeEnd}
|
||||
</if>
|
||||
ORDER BY t.id DESC
|
||||
</sql>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user