forked from integrated_whb/integrated_whb
106 lines
2.8 KiB
XML
106 lines
2.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.SafetyMeetingMapper">
|
|
|
|
<!--表名 -->
|
|
<sql id="tableName">
|
|
SAFETY_MEETING
|
|
</sql>
|
|
<!-- 字段 -->
|
|
<sql id="Field">
|
|
f
|
|
.
|
|
SAFETY_MEETING_ID
|
|
,
|
|
f.SAFETY_MEETING_TITLE,
|
|
f.SAFETY_MEETING_CONTENT,
|
|
f.SIGNATURES,
|
|
f.ALL_SIGNATURES,
|
|
f.CORPINFO_ID,
|
|
f.CREATOR,
|
|
f.CREATTIME,
|
|
f.OPERATOR,
|
|
f.OPERATTIME,
|
|
f.ISDELETE
|
|
</sql>
|
|
<!-- 字段用于新增 -->
|
|
<sql id="Field2">
|
|
SAFETY_MEETING_ID
|
|
,
|
|
SAFETY_MEETING_TITLE,
|
|
SAFETY_MEETING_CONTENT,
|
|
SIGNATURES,
|
|
ALL_SIGNATURES,
|
|
CORPINFO_ID,
|
|
CREATOR,
|
|
CREATTIME,
|
|
OPERATOR,
|
|
OPERATTIME,
|
|
ISDELETE
|
|
</sql>
|
|
|
|
<!-- 字段值 -->
|
|
<sql id="FieldValue">
|
|
#{SAFETY_MEETING_ID}
|
|
,
|
|
#{SAFETY_MEETING_TITLE},
|
|
#{SAFETY_MEETING_CONTENT},
|
|
#{SIGNATURES},
|
|
#{ALL_SIGNATURES},
|
|
#{CORPINFO_ID},
|
|
#{CREATOR},
|
|
#{CREATTIME},
|
|
#{OPERATOR},
|
|
#{OPERATTIME},
|
|
#{ISDELETE}
|
|
</sql>
|
|
<insert id="save">
|
|
insert into
|
|
<include refid="tableName"></include>
|
|
(
|
|
<include refid="Field2"></include>
|
|
) values (
|
|
<include refid="FieldValue"></include>
|
|
)
|
|
</insert>
|
|
|
|
<update id="removeById">
|
|
update
|
|
<include refid="tableName"></include>
|
|
set
|
|
ISDELETE = '1',
|
|
OPERATOR=#{OPERATOR},
|
|
OPERATTIME=#{OPERATTIME}
|
|
where
|
|
SAFETY_MEETING_ID = #{SAFETY_MEETING_ID}
|
|
</update>
|
|
<update id="edit">
|
|
update
|
|
<include refid="tableName"></include>
|
|
set
|
|
SAFETY_MEETING_TITLE=#{SAFETY_MEETING_TITLE},
|
|
SAFETY_MEETING_CONTENT=#{SAFETY_MEETING_CONTENT},
|
|
SIGNATURES=#{SIGNATURES},
|
|
ALL_SIGNATURES=#{ALL_SIGNATURES},
|
|
CORPINFO_ID=#{CORPINFO_ID},
|
|
CREATOR=#{CREATOR},
|
|
CREATTIME=#{CREATTIME},
|
|
OPERATOR=#{OPERATOR},
|
|
OPERATTIME=#{OPERATTIME}
|
|
where
|
|
SAFETY_MEETING_ID = #{SAFETY_MEETING_ID}
|
|
</update>
|
|
<select id="datalistPage" resultType="com.zcloud.entity.PageData">
|
|
select * from <include refid="tableName"></include> where ISDELETE = '0' and CORPINFO_ID = #{pd.CORPINFO_ID}
|
|
<if test="pd.SAFETY_MEETING_TITLE != null and pd.SAFETY_MEETING_TITLE != ''">
|
|
and SAFETY_MEETING_TITLE like '%${pd.SAFETY_MEETING_TITLE}%'
|
|
</if>
|
|
</select>
|
|
<select id="findById" resultType="com.zcloud.entity.PageData">
|
|
select * from <include refid="tableName"></include> where ISDELETE = '0'
|
|
and SAFETY_MEETING_ID = #{SAFETY_MEETING_ID}
|
|
</select>
|
|
|
|
|
|
</mapper>
|