Commit 6ecb8c19 by 王祖波

sql

parent 38c1a1c3
......@@ -115,27 +115,27 @@
<!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into tab_qw_send_msg (
id,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
) values (
#{id},#{clerkId}, #{staffId}, #{msgId}, #{sendTime}, #{bizType}, #{wxEnterpriseId}, #{enterpriseId}, #{deleteFlag}, #{createTime}, #{updateTime}
#{id},#{clerkId}, #{staffId}, #{msgId}, #{sendTime}, #{bizType}, #{wxEnterpriseId}, #{enterpriseId}
)
</insert>
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
insert into tab_qw_send_msg (
id,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
) values
<foreach collection="entities" item="entity" separator=",">
(#{id},#{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})
</foreach>
</insert>
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into tab_qw_send_msg (
id,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
) values
<foreach collection="entities" item="entity" separator=",">
(#{id},#{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})
</foreach>
on duplicate key update
id = values(id),
......@@ -145,10 +145,7 @@
send_time = values(send_time),
biz_type = values(biz_type),
wx_enterprise_id = values(wx_enterprise_id),
enterprise_id = values(enterprise_id),
delete_flag = values(delete_flag),
create_time = values(create_time),
update_time = values(update_time)
enterprise_id = values(enterprise_id)
</insert>
<!--通过主键修改数据-->
......
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