12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <?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.platform.dao.mapper.sbUnused.SbUnusedMapper">
- <sql id="Base_Column_List">
- unused.id,
- unused.name,
- unused.apply_time,
- unused.apply_user_id,
- unused.status,
- unused.created_user_id,
- unused.created_time,
- unused.update_user_id,
- unused.verity_user_id
- </sql>
- <sql id="Ref_Column_List">
- unused.name,
- unused.apply_time,
- unused.apply_user_id,
- unused.status,
- unused.verity_user_id
- </sql>
- <sql id="List_Condition">
- <if test="id != null and id != ''">
- and unused.id = #{id}
- </if>
- <if test="name != null and name != ''">
- and unused.name = #{name}
- </if>
- <if test="applyTimeStart != null">
- and unused.apply_time <![CDATA[>=]]>; #{applyTimeStart}
- </if>
- <if test="applyTimeEnd != null">
- and unused.apply_time <![CDATA[<=]]> #{applyTimeEnd}
- </if>
- <if test="applyTime != null">
- and unused.apply_time = #{applyTime}
- </if>
- <if test="applyUserId != null and applyUserId != ''">
- and unused.apply_user_id = #{applyUserId}
- </if>
- <if test="status != null">
- and unused.status = #{status}
- </if>
- <if test="createdUserId != null and createdUserId != ''">
- and unused.created_user_id = #{createdUserId}
- </if>
- <if test="createdTimeStart != null">
- and unused.created_time <![CDATA[>=]]>; #{createdTimeStart}
- </if>
- <if test="createdTimeEnd != null">
- and unused.created_time <![CDATA[<=]]> #{createdTimeEnd}
- </if>
- <if test="createdTime != null">
- and unused.created_time = #{createdTime}
- </if>
- <if test="updateUserId != null and updateUserId != ''">
- and unused.update_user_id = #{updateUserId}
- </if>
- <if test="verityUserId != null and verityUserId != ''">
- and unused.verity_user_id = #{verityUserId}
- </if>
- <if test="keyword != null and keyword != ''">
- and unused.id like concat(concat('%',#{keyword}),'%')
- </if>
- </sql>
- <select id="selectList" parameterType="com.platform.dao.dto.sbUnused.SbUnusedDTO" resultType="com.platform.dao.vo.query.sbUnused.SbUnusedVO">
- select unused.*,user.real_name as applyName,user2.real_name as verifyUserName
- from t_sb_unused as unused left join t_sys_user user on user.user_id = unused.apply_user_id
- left join t_sys_user user2 on user2.user_id = unused.verity_user_id
- <where>
- <include refid="List_Condition" />
- </where>
- </select>
- <select id="getUnusedVO" parameterType="java.lang.String"
- resultType="com.platform.dao.vo.query.sbUnused.SbUnusedVO">
- select unused.*,user.real_name as applyName,user2.real_name as verifyUserName from t_sb_unused unused left join t_sys_user user
- on unused.apply_user_id = user.user_id
- left join t_sys_user user2 on user2.user_id = unused.verify_user_id
- where id = #{id}
- </select>
- </mapper>
|