12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?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.gxzc.zen.api.sys.mapper.SysDicMapper">
- <!-- 通用查询映射结果 -->
- <resultMap id="BaseResultMap" type="com.gxzc.zen.api.sys.model.SysDic">
- <result column="id" property="id"/>
- <result column="enable" property="enable"/>
- <result column="remark" property="remark"/>
- <result column="create_time" property="createTime"/>
- <result column="create_by" property="createBy"/>
- <result column="update_time" property="updateTime"/>
- <result column="update_by" property="updateBy"/>
- <result column="key" property="key"/>
- <result column="value" property="value"/>
- <result column="label" property="label"/>
- <result column="sort" property="sort"/>
- </resultMap>
- <sql id="dynamicSqlWhere">
- WHERE 1=1
- <if test="enable != null">
- <choose>
- <when test="enable == true">
- AND enable = 1
- </when>
- <otherwise>
- AND enable = 0
- </otherwise>
- </choose>
- </if>
- <if test="key != null and key != ''">
- AND `key` = #{key}
- </if>
- </sql>
- <select id="selectList" resultType="com.gxzc.zen.api.sys.model.SysDic">
- SELECT *
- FROM sys_dic
- <include refid="dynamicSqlWhere"/>
- </select>
- </mapper>
|