|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <?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.iformall.mapper.ThDevInfoMapper">
- <resultMap id="BaseResultMap" type="com.iformall.domain.po.ThDevInfo">
- <id column="id" jdbcType="BIGINT" property="id" />
- <result column="dev_id" jdbcType="VARCHAR" property="devId" />
- <result column="name" jdbcType="VARCHAR" property="name" />
- <result column="type" jdbcType="INTEGER" property="type" />
- <result column="req_key" jdbcType="VARCHAR" property="reqKey" />
- <result column="res_key" jdbcType="VARCHAR" property="resKey" />
- <result column="state" jdbcType="INTEGER" property="state" />
- <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
- <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
- </resultMap>
-
- <sql id="allColumns">
- `id`,`dev_id`,`name`,`type`,`req_key`,`res_key`,`state`,`create_date`,`update_date`
- </sql>
-
- <sql id="dynamicWhereConditions">
- where 1 = 1
- <if test=" null != id ">
- and `id` = #{id}
- </if>
- <if test=" null != devId ">
- and `dev_id` like concat('%', #{devId},'%')
- </if>
- <if test=" null != name ">
- and `name` like concat('%', #{name},'%')
- </if>
- <if test=" null != type ">
- and `type` = #{type}
- </if>
- <if test=" null != reqKey ">
- and `req_key` like concat('%', #{reqKey},'%')
- </if>
- <if test=" null != resKey ">
- and `res_key` like concat('%', #{resKey},'%')
- </if>
- <if test=" null != state ">
- and `state` = #{state}
- </if>
- <if test=" null != createDate ">
- and `create_date` = #{createDate}
- </if>
- <if test=" null != updateDate ">
- and `update_date` = #{updateDate}
- </if>
- <if test=" null != ids ">
- and id in
- <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
- #{idItem}
- </foreach>
- </if>
- <if test=" null != sortColumns"> order by ${sortColumns} </if>
- </sql>
-
- <select id="findList" parameterType="com.iformall.domain.po.ThDevInfo" resultMap="BaseResultMap">
- select <include refid="allColumns" /> from th_dev_info
- <include refid="dynamicWhereConditions" />
- </select>
-
-
-
-
-
-
- </mapper>
|