integrated_traffic/src/main/resources/mybatis/datasource/safetyMeeting/SafetyMeetingPeopleMapper.xml

87 lines
1.8 KiB
XML

<?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.zcloud.mapper.datasource.safetyMeeting.SafetyMeetingPeopleMapper">
<!--表名 -->
<sql id="tableName">
SAFETY_MEETING_PEOPLE
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.SAFETY_MEETING_PEOPLE_ID,
f.SAFETY_MEETING_ID,
f.SIGNATORY,
f.FEED_BACK,
f.CORPINFO_ID,
f.CREATOR,
f.CREATTIME,
f.OPERATOR,
f.OPERATTIME,
f.ISDELETE
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
SAFETY_MEETING_PEOPLE_ID,
SAFETY_MEETING_ID,
SIGNATORY,
FEED_BACK,
CORPINFO_ID,
CREATOR,
CREATTIME,
OPERATOR,
OPERATTIME,
ISDELETE
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{SAFETY_MEETING_PEOPLE_ID},
#{SAFETY_MEETING_ID},
#{SIGNATORY},
#{FEED_BACK},
#{CORPINFO_ID},
#{CREATOR},
#{CREATTIME},
#{OPERATOR},
#{OPERATTIME},
#{ISDELETE}
</sql>
<sql id="FieldValue2">
#{item.SAFETY_MEETING_PEOPLE_ID},
#{item.SAFETY_MEETING_ID},
#{item.SIGNATORY},
#{item.FEED_BACK},
#{item.CORPINFO_ID},
#{item.CREATOR},
#{item.CREATTIME},
#{item.OPERATOR},
#{item.OPERATTIME},
#{item.ISDELETE}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<insert id="saveBatch">
insert into <include refid="tableName"></include>
(<include refid="Field2"></include>) values
<foreach item="item" index="index" collection="list" separator="," >
(<include refid="FieldValue2"></include>)
</foreach>
</insert>
</mapper>