|
@@ -2,120 +2,120 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.platform.dao.mapper.sb.SbChangeRecordMapper">
|
|
|
<sql id="Base_Column_List">
|
|
|
- change.id,
|
|
|
- change.created_user_id,
|
|
|
- change.created_user_name,
|
|
|
- change.update_user_id,
|
|
|
- change.update_user_name,
|
|
|
- change.sb_id,
|
|
|
- change.content,
|
|
|
- change.old_position_id,
|
|
|
- change.position_id,
|
|
|
- change.sb_no_id,
|
|
|
- change.old_parent_id,
|
|
|
- change.parent_id,
|
|
|
- change.created_time,
|
|
|
- change.update_time,
|
|
|
- change.start_time,
|
|
|
- change.end_time,
|
|
|
- change.change_type
|
|
|
+ sbChange.id,
|
|
|
+ sbChange.created_user_id,
|
|
|
+ sbChange.created_user_name,
|
|
|
+ sbChange.update_user_id,
|
|
|
+ sbChange.update_user_name,
|
|
|
+ sbChange.sb_id,
|
|
|
+ sbChange.content,
|
|
|
+ sbChange.old_position_id,
|
|
|
+ sbChange.position_id,
|
|
|
+ sbChange.sb_no_id,
|
|
|
+ sbChange.old_parent_id,
|
|
|
+ sbChange.parent_id,
|
|
|
+ sbChange.created_time,
|
|
|
+ sbChange.update_time,
|
|
|
+ sbChange.start_time,
|
|
|
+ sbChange.end_time,
|
|
|
+ sbChange.change_type
|
|
|
</sql>
|
|
|
<sql id="Ref_Column_List">
|
|
|
- change.sb_id,
|
|
|
- change.content,
|
|
|
- change.old_position_id,
|
|
|
- change.position_id,
|
|
|
- change.sb_no_id,
|
|
|
- change.old_parent_id,
|
|
|
- change.parent_id,
|
|
|
- change.start_time,
|
|
|
- change.end_time,
|
|
|
- change.change_type
|
|
|
+ sbChange.sb_id,
|
|
|
+ sbChange.content,
|
|
|
+ sbChange.old_position_id,
|
|
|
+ sbChange.position_id,
|
|
|
+ sbChange.sb_no_id,
|
|
|
+ sbChange.old_parent_id,
|
|
|
+ sbChange.parent_id,
|
|
|
+ sbChange.start_time,
|
|
|
+ sbChange.end_time,
|
|
|
+ sbChange.change_type
|
|
|
</sql>
|
|
|
<sql id="List_Condition">
|
|
|
<if test="id != null and id != ''">
|
|
|
- and change.id = #{id}
|
|
|
+ and sbChange.id = #{id}
|
|
|
</if>
|
|
|
<if test="createdUserId != null and createdUserId != ''">
|
|
|
- and change.created_user_id = #{createdUserId}
|
|
|
+ and sbChange.created_user_id = #{createdUserId}
|
|
|
</if>
|
|
|
<if test="createdUserName != null and createdUserName != ''">
|
|
|
- and change.created_user_name = #{createdUserName}
|
|
|
+ and sbChange.created_user_name = #{createdUserName}
|
|
|
</if>
|
|
|
<if test="updateUserId != null and updateUserId != ''">
|
|
|
- and change.update_user_id = #{updateUserId}
|
|
|
+ and sbChange.update_user_id = #{updateUserId}
|
|
|
</if>
|
|
|
<if test="updateUserName != null and updateUserName != ''">
|
|
|
- and change.update_user_name = #{updateUserName}
|
|
|
+ and sbChange.update_user_name = #{updateUserName}
|
|
|
</if>
|
|
|
<if test="sbId != null and sbId != ''">
|
|
|
- and change.sb_id = #{sbId}
|
|
|
+ and sbChange.sb_id = #{sbId}
|
|
|
</if>
|
|
|
<if test="content != null and content != ''">
|
|
|
- and change.content = #{content}
|
|
|
+ and sbChange.content = #{content}
|
|
|
</if>
|
|
|
<if test="oldPositionId != null and oldPositionId != ''">
|
|
|
- and change.old_position_id = #{oldPositionId}
|
|
|
+ and sbChange.old_position_id = #{oldPositionId}
|
|
|
</if>
|
|
|
<if test="positionId != null and positionId != ''">
|
|
|
- and change.position_id = #{positionId}
|
|
|
+ and sbChange.position_id = #{positionId}
|
|
|
</if>
|
|
|
<if test="sbNoId != null and sbNoId != ''">
|
|
|
- and change.sb_no_id = #{sbNoId}
|
|
|
+ and sbChange.sb_no_id = #{sbNoId}
|
|
|
</if>
|
|
|
<if test="oldParentId != null and oldParentId != ''">
|
|
|
- and change.old_parent_id = #{oldParentId}
|
|
|
+ and sbChange.old_parent_id = #{oldParentId}
|
|
|
</if>
|
|
|
<if test="parentId != null and parentId != ''">
|
|
|
- and change.parent_id = #{parentId}
|
|
|
+ and sbChange.parent_id = #{parentId}
|
|
|
</if>
|
|
|
<if test="createdTimeStart != null">
|
|
|
- and change.created_time <![CDATA[>=]]>; #{createdTimeStart}
|
|
|
+ and sbChange.created_time <![CDATA[>=]]>; #{createdTimeStart}
|
|
|
</if>
|
|
|
<if test="createdTimeEnd != null">
|
|
|
- and change.created_time <![CDATA[<=]]> #{createdTimeEnd}
|
|
|
+ and sbChange.created_time <![CDATA[<=]]> #{createdTimeEnd}
|
|
|
</if>
|
|
|
<if test="createdTime != null">
|
|
|
- and change.created_time = #{createdTime}
|
|
|
+ and sbChange.created_time = #{createdTime}
|
|
|
</if>
|
|
|
<if test="updateTimeStart != null">
|
|
|
- and change.update_time <![CDATA[>=]]>; #{updateTimeStart}
|
|
|
+ and sbChange.update_time <![CDATA[>=]]>; #{updateTimeStart}
|
|
|
</if>
|
|
|
<if test="updateTimeEnd != null">
|
|
|
- and change.update_time <![CDATA[<=]]> #{updateTimeEnd}
|
|
|
+ and sbChange.update_time <![CDATA[<=]]> #{updateTimeEnd}
|
|
|
</if>
|
|
|
<if test="updateTime != null">
|
|
|
- and change.update_time = #{updateTime}
|
|
|
+ and sbChange.update_time = #{updateTime}
|
|
|
</if>
|
|
|
<if test="startTimeStart != null">
|
|
|
- and change.start_time <![CDATA[>=]]>; #{startTimeStart}
|
|
|
+ and sbChange.start_time <![CDATA[>=]]>; #{startTimeStart}
|
|
|
</if>
|
|
|
<if test="startTimeEnd != null">
|
|
|
- and change.start_time <![CDATA[<=]]> #{startTimeEnd}
|
|
|
+ and sbChange.start_time <![CDATA[<=]]> #{startTimeEnd}
|
|
|
</if>
|
|
|
<if test="startTime != null">
|
|
|
- and change.start_time = #{startTime}
|
|
|
+ and sbChange.start_time = #{startTime}
|
|
|
</if>
|
|
|
<if test="endTimeStart != null">
|
|
|
- and change.end_time <![CDATA[>=]]>; #{endTimeStart}
|
|
|
+ and sbChange.end_time <![CDATA[>=]]>; #{endTimeStart}
|
|
|
</if>
|
|
|
<if test="endTimeEnd != null">
|
|
|
- and change.end_time <![CDATA[<=]]> #{endTimeEnd}
|
|
|
+ and sbChange.end_time <![CDATA[<=]]> #{endTimeEnd}
|
|
|
</if>
|
|
|
<if test="endTime != null">
|
|
|
- and change.end_time = #{endTime}
|
|
|
+ and sbChange.end_time = #{endTime}
|
|
|
</if>
|
|
|
<if test="changeType != null">
|
|
|
- and change.change_type = #{changeType}
|
|
|
+ and sbChange.change_type = #{changeType}
|
|
|
</if>
|
|
|
<if test="keyword != null and keyword != ''">
|
|
|
- and change.id like concat(concat('%',#{keyword}),'%')
|
|
|
+ and sbChange.id like concat(concat('%',#{keyword}),'%')
|
|
|
</if>
|
|
|
</sql>
|
|
|
<select id="selectList" parameterType="com.platform.dao.dto.sb.SbChangeRecordDTO"
|
|
|
resultType="com.platform.dao.vo.query.sb.SbChangeRecordVO">
|
|
|
- select change.*
|
|
|
- from t_sb_change_record as change
|
|
|
+ select sbChange.*,sb.name as sbName
|
|
|
+ from t_sb_change_record as sbChange left join t_sb_info sb on sbChange.sb_id = sb.id
|
|
|
<where>
|
|
|
<include refid="List_Condition"/>
|
|
|
</where>
|