<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="com.panzhihua.service_community.dao.ComActSocialOrgHatchAuditScheduleDAO">
|
|
<resultMap type="com.panzhihua.service_community.entity.ComActSocialOrgHatchAuditSchedule"
|
id="ComActSocialOrgHatchAuditScheduleMap">
|
<result property="id" column="id" jdbcType="INTEGER"/>
|
<result property="auditId" column="audit_id" jdbcType="INTEGER"/>
|
<result property="stage" column="stage" jdbcType="VARCHAR"/>
|
<result property="detail" column="detail" jdbcType="VARCHAR"/>
|
<result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/>
|
</resultMap>
|
|
<!-- 批量插入 -->
|
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
insert into smart_life.com_act_social_org_hatch_audit_schedule(audit_id, stage, detail, created_at)
|
values
|
<foreach collection="entities" item="entity" separator=",">
|
(#{entity.auditId}, #{entity.stage}, #{entity.detail}, #{entity.createdAt})
|
</foreach>
|
</insert>
|
<!-- 批量插入或按主键更新 -->
|
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
insert into smart_life.com_act_social_org_hatch_audit_schedule(audit_id, stage, detail, created_at)
|
values
|
<foreach collection="entities" item="entity" separator=",">
|
(#{entity.auditId}, #{entity.stage}, #{entity.detail}, #{entity.createdAt})
|
</foreach>
|
on duplicate key update
|
audit_id = values(audit_id) , stage = values(stage) , detail = values(detail) , created_at = values(created_at)
|
</insert>
|
|
</mapper>
|