1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?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.sbUnuseddetail.SbUnusedDetailMapper">
- <sql id="Base_Column_List">
- unusedDetails.id,
- unusedDetails.sb_unused_id,
- unusedDetails.sb_id,
- unusedDetails.created_user_id,
- unusedDetails.created_time,
- unusedDetails.update_user_id,
- unusedDetails.update_time
- </sql>
- <sql id="Ref_Column_List">
- unusedDetails.sb_unused_id,
- unusedDetails.sb_id,
- </sql>
- <sql id="List_Condition">
- <if test="id != null and id != ''">
- and unusedDetails.id = #{id}
- </if>
- <if test="sbUnusedId != null and sbUnusedId != ''">
- and unusedDetails.sb_unused_id = #{sbUnusedId}
- </if>
- <if test="sbId != null and sbId != ''">
- and unusedDetails.sb_id = #{sbId}
- </if>
- <if test="createdUserId != null and createdUserId != ''">
- and unusedDetails.created_user_id = #{createdUserId}
- </if>
- <if test="createdTimeStart != null">
- and unusedDetails.created_time <![CDATA[>=]]>; #{createdTimeStart}
- </if>
- <if test="createdTimeEnd != null">
- and unusedDetails.created_time <![CDATA[<=]]> #{createdTimeEnd}
- </if>
- <if test="createdTime != null">
- and unusedDetails.created_time = #{createdTime}
- </if>
- <if test="updateUserId != null and updateUserId != ''">
- and unusedDetails.update_user_id = #{updateUserId}
- </if>
- <if test="updateTimeStart != null">
- and unusedDetails.update_time <![CDATA[>=]]>; #{updateTimeStart}
- </if>
- <if test="updateTimeEnd != null">
- and unusedDetails.update_time <![CDATA[<=]]> #{updateTimeEnd}
- </if>
- <if test="updateTime != null">
- and unusedDetails.update_time = #{updateTime}
- </if>
- <if test="keyword != null and keyword != ''">
- and unusedDetails.id like concat(concat('%',#{keyword}),'%')
- </if>
- </sql>
- <select id="selectList" parameterType="com.platform.dao.dto.sbUnuseddetail.SbUnusedDetailDTO" resultType="com.platform.dao.vo.query.sbUnuseddetail.SbUnusedDetailVO">
- select unusedDetails.*,sbInfo.name as sbName,sbInfo.position_no as positionNo,sbinfo.no as sbNo,position.name as positionName
- from t_sb_unused_detail as unusedDetails left join t_sb_info sbInfo
- on sbInfo.id = unusedDetails.sb_id
- left join t_sb_position position on position.id=sbInfo.position_id
- left join t_sys_file file on file.target_id = unusedDetails.id
- <where>
- <include refid="List_Condition" />
- </where>
- </select>
- </mapper>
|