Commit 38c1a1c3 by 王祖波

sql

parent f7b545a3
......@@ -115,29 +115,30 @@
<!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into tab_qw_send_msg (
clerk_id, staff_id, msg_id, send_time, biz_type, wx_enterprise_id, enterprise_id, delete_flag, create_time, update_time
id,clerk_id, staff_id, msg_id, send_time, biz_type, wx_enterprise_id, enterprise_id, delete_flag, create_time, update_time
) values (
#{clerkId}, #{staffId}, #{msgId}, #{sendTime}, #{bizType}, #{wxEnterpriseId}, #{enterpriseId}, #{deleteFlag}, #{createTime}, #{updateTime}
#{id},#{clerkId}, #{staffId}, #{msgId}, #{sendTime}, #{bizType}, #{wxEnterpriseId}, #{enterpriseId}, #{deleteFlag}, #{createTime}, #{updateTime}
)
</insert>
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
insert into tab_qw_send_msg (
clerk_id, staff_id, msg_id, send_time, biz_type, wx_enterprise_id, enterprise_id, delete_flag, create_time, update_time
id,clerk_id, staff_id, msg_id, send_time, biz_type, wx_enterprise_id, enterprise_id, delete_flag, create_time, update_time
) values
<foreach collection="entities" item="entity" separator=",">
(#{entity.clerkId}, #{entity.staffId}, #{entity.msgId}, #{entity.sendTime}, #{entity.bizType}, #{entity.wxEnterpriseId}, #{entity.enterpriseId}, #{entity.deleteFlag}, #{entity.createTime}, #{entity.updateTime})
(#{id},#{entity.clerkId}, #{entity.staffId}, #{entity.msgId}, #{entity.sendTime}, #{entity.bizType}, #{entity.wxEnterpriseId}, #{entity.enterpriseId}, #{entity.deleteFlag}, #{entity.createTime}, #{entity.updateTime})
</foreach>
</insert>
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into tab_qw_send_msg (
clerk_id, staff_id, msg_id, send_time, biz_type, wx_enterprise_id, enterprise_id, delete_flag, create_time, update_time
id,clerk_id, staff_id, msg_id, send_time, biz_type, wx_enterprise_id, enterprise_id, delete_flag, create_time, update_time
) values
<foreach collection="entities" item="entity" separator=",">
(#{entity.clerkId}, #{entity.staffId}, #{entity.msgId}, #{entity.sendTime}, #{entity.bizType}, #{entity.wxEnterpriseId}, #{entity.enterpriseId}, #{entity.deleteFlag}, #{entity.createTime}, #{entity.updateTime})
(#{id},#{entity.clerkId}, #{entity.staffId}, #{entity.msgId}, #{entity.sendTime}, #{entity.bizType}, #{entity.wxEnterpriseId}, #{entity.enterpriseId}, #{entity.deleteFlag}, #{entity.createTime}, #{entity.updateTime})
</foreach>
on duplicate key update
id = values(id),
clerk_id = values(clerk_id),
staff_id = values(staff_id),
msg_id = values(msg_id),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment