<?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.bus.HiddenMajorMapper">

	<!--表名 -->
	<sql id="tableName">
		BUS_HIDDENMAJOR
	</sql>


	<!-- 字段 -->
	<sql id="Field">
		f.HIDDENMAJOR_ID,
		f.HIDDEN_ID,
		f.APPROVED_TIME,
		f.APPROVED,
		f.CHECKRESULTS,
		f.CHECK_TIME,
		f.CHECKER
	</sql>

	<!-- 字段用于新增 -->
	<sql id="Field2">
		HIDDENMAJOR_ID,
		HIDDEN_ID,
		APPROVED_TIME,
		APPROVED,
		CHECKRESULTS,
		CHECK_TIME,
		CHECKER
	</sql>

	<!-- 字段值 -->
	<sql id="FieldValue">
		#{HIDDENMAJOR_ID},
		#{HIDDEN_ID},
		#{APPROVED_TIME},
		#{APPROVED},
		#{CHECKRESULTS},
		#{CHECK_TIME},
		#{CHECKER}
	</sql>

	<!-- 新增-->
	<insert id="save" parameterType="pd">
		insert into
	<include refid="tableName"></include>
		(
	<include refid="Field2"></include>
		) values (
	<include refid="FieldValue"></include>
		)
	</insert>





	<!-- 通过ID获取数据 -->
	<select id="findById" parameterType="pd" resultType="pd">
		select
		<include refid="Field"></include>
		from
		<include refid="tableName"></include> f
		where
			f.HIDDEN_ID = #{HIDDEN_ID}
	</select>

	<!-- 修改 -->
	<update id="edit" parameterType="pd">
	update
	<include refid="tableName"></include>
	set
		APPROVED_TIME = #{APPROVED_TIME},
		APPROVED = #{APPROVED_TIME}
		where
		HIDDEN_ID = #{HIDDEN_ID}
	</update>
</mapper>


