|
@@ -7,12 +7,12 @@
|
|
|
<resultMap type="TlInspectionPlanUser" id="TlInspectionPlanUserResult">
|
|
|
<result property="id" column="id"/>
|
|
|
<result property="planId" column="plan_id"/>
|
|
|
- <result property="userId" column="user_id"/>
|
|
|
+ <result property="card" column="card"/>
|
|
|
<result property="nickName" column="nick_name"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTlInspectionPlanUserVo">
|
|
|
- select id, plan_id, user_id, nick_name
|
|
|
+ select id, plan_id, card, nick_name
|
|
|
from tl_inspection_plan_user
|
|
|
</sql>
|
|
|
|
|
@@ -20,7 +20,7 @@
|
|
|
<include refid="selectTlInspectionPlanUserVo"/>
|
|
|
<where>
|
|
|
<if test="planId != null ">and plan_id = #{planId}</if>
|
|
|
- <if test="userId != null ">and user_id = #{userId}</if>
|
|
|
+ <if test="card != null ">and card = #{card}</if>
|
|
|
<if test="nickName != null and nickName != ''">and nick_name like concat('%', #{nickName}, '%')</if>
|
|
|
</where>
|
|
|
</select>
|
|
@@ -42,20 +42,20 @@
|
|
|
insert into tl_inspection_plan_user
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="planId != null">plan_id,</if>
|
|
|
- <if test="userId != null">user_id,</if>
|
|
|
+ <if test="card != null">card,</if>
|
|
|
<if test="nickName != null">nick_name,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="planId != null">#{planId},</if>
|
|
|
- <if test="userId != null">#{userId},</if>
|
|
|
+ <if test="card != null">#{card},</if>
|
|
|
<if test="nickName != null">#{nickName},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
<insert id="batchInsert">
|
|
|
- insert into tl_inspection_plan_user(plan_id, user_id, nick_name) values
|
|
|
+ insert into tl_inspection_plan_user(plan_id, card, nick_name) values
|
|
|
<foreach item="item" index="index" collection="list" separator=",">
|
|
|
- (#{item.planId},#{item.userId},#{item.nickName})
|
|
|
+ (#{item.planId},#{card},#{item.nickName})
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
|
|
@@ -63,7 +63,7 @@
|
|
|
update tl_inspection_plan_user
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
<if test="planId != null">plan_id = #{planId},</if>
|
|
|
- <if test="userId != null">user_id = #{userId},</if>
|
|
|
+ <if test="card != null">card = #{card},</if>
|
|
|
<if test="nickName != null">nick_name = #{nickName},</if>
|
|
|
</trim>
|
|
|
where id = #{id}
|