INSERT INTO task_receiver_user(
receiver_user_id,
distribute_id,
distribute_sub_id,
user_id,
user_name,
is_receive,
receive_type,
execute_status,
task_score,
task_type,
check_status,
reason,
is_warning,
is_supervision,
creator,
gmt_create,
modifier,
gmt_modified,
is_delete
) VALUES(
#{receiverUserId},
#{distributeId},
#{distributeSubId},
#{userId},
#{userName},
#{isReceive},
#{receiveType},
#{executeStatus},
#{taskScore},
#{taskType},
#{checkStatus},
#{reason},
#{is_warning},
#{is_supervision},
#{creator},
#{gmtCreate},
#{modifier},
#{gmtModified},
#{isDelete}
)
DELETE FROM
task_receiver_user
WHERE
receiver_user_id IN
#{receiverUserIds[${index}]}
UPDATE
task_receiver_user
SET
gmt_modified = #{gmtModified},
modifier = #{modifier},
is_delete = 1
WHERE
receiver_user_id IN
#{receiverUserIds[${index}]}
UPDATE
task_receiver_user
SET
gmt_modified = #{gmtModified},
modifier = #{modifier},
is_delete = 1
WHERE
distribute_id = #{distributeId}
UPDATE
task_receiver_user
SET
gmt_modified = #{gmtModified},
modifier = #{modifier}
,task_type = #{taskType}
,check_status = #{checkStatus}
,reason = #{reason}
,is_warning = #{isWarning}
,is_supervision = #{isSupervision}
WHERE
1 = 1
AND receiver_user_id IN
#{receiverUserIds[${index}]}
AND distribute_id IN
#{distributeIds[${index}]}
AND user_id IN
#{userIds[${index}]}
AND distribute_id = #{distributeId}
AND user_id = #{userId}
UPDATE
task_receiver_user
SET
distribute_id = #{distributeId},
distribute_sub_id = #{distributeSubId},
user_id = #{userId},
user_name = #{userName},
is_receive = #{isReceive},
receive_type = #{receiveType},
execute_status = #{executeStatus},
task_score = #{taskScore},
task_type = #{taskType},
check_status = #{checkStatus},
reason = #{reason},
is_warning = #{isWarning},
is_supervision = #{isSupervision},
gmt_modified = #{gmtModified},
modifier = #{modifier},
receiver_user_id = receiver_user_id
WHERE
receiver_user_id = #{receiverUserId}