|
|
@@ -8,16 +8,22 @@
|
|
|
<result column="in_date" property="in_date" jdbcType="TIMESTAMP" />
|
|
|
<result column="record_details" property="record_details" jdbcType="VARCHAR" />
|
|
|
<result column="record_remarks" property="record_remarks" jdbcType="VARCHAR" />
|
|
|
+ <result column="device_id" property="device_id" jdbcType="BIGINT" />
|
|
|
<result column="stu_id" property="stu_id" jdbcType="BIGINT" />
|
|
|
<result column="school_id" property="school_id" jdbcType="BIGINT" />
|
|
|
- <result column="clazz_name" property="clazz_name" jdbcType="VARCHAR"/>
|
|
|
- <result column="stu_name" property="stu_name" jdbcType="VARCHAR"/>
|
|
|
<result column="stu_sex" property="stu_sex" jdbcType="INTEGER"/>
|
|
|
<result column="stu_number" property="stu_number" jdbcType="VARCHAR"/>
|
|
|
+ <result column="stu_name" property="stu_name" jdbcType="VARCHAR"/>
|
|
|
+ <result column="grade_id" property="grade_id" jdbcType="BIGINT" />
|
|
|
+ <result column="grade_name" property="grade_name" jdbcType="VARCHAR"/>
|
|
|
+ <result column="clazz_id" property="clazz_id" jdbcType="BIGINT" />
|
|
|
+ <result column="clazz_name" property="clazz_name" jdbcType="VARCHAR"/>
|
|
|
+ <result column="grade_clazz" property="grade_clazz" jdbcType="VARCHAR"/>
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List" >
|
|
|
- record_id, record_name, out_date, in_date, record_details, record_remarks,
|
|
|
- stu_id, school_id
|
|
|
+ record_id, record_name, out_date, in_date, record_details, record_remarks,device_id,
|
|
|
+ stu_id, school_id, stu_sex, stu_number, stu_name, grade_id, grade_name,
|
|
|
+ clazz_id, clazz_name, grade_clazz
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
|
|
|
select
|
|
|
@@ -31,10 +37,14 @@
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.usoftchina.smartschool.school.po.OutInRecord" >
|
|
|
insert into out_in_record (record_id, record_name, out_date,
|
|
|
- in_date, record_details, record_remarks, stu_id, school_id
|
|
|
+ in_date, record_details, record_remarks, device_id, stu_id, school_id,
|
|
|
+ stu_sex, stu_number, stu_name, grade_id, grade_name,clazz_id, clazz_name, grade_clazz
|
|
|
)
|
|
|
values (#{record_id,jdbcType=BIGINT}, #{record_name,jdbcType=VARCHAR}, #{out_date,jdbcType=TIMESTAMP},
|
|
|
- #{in_date,jdbcType=TIMESTAMP}, #{record_details,jdbcType=VARCHAR}, #{record_remarks,jdbcType=VARCHAR},#{stu_id,jdbcType=BIGINT}, #{school_id,jdbcType=BIGINT}
|
|
|
+ #{in_date,jdbcType=TIMESTAMP}, #{record_details,jdbcType=VARCHAR}, #{record_remarks,jdbcType=VARCHAR}, #{device_id,jdbcType=BIGINT},
|
|
|
+ #{stu_id,jdbcType=BIGINT}, #{school_id,jdbcType=BIGINT}, #{stu_sex,jdbcType=INTEGER}, #{stu_number,jdbcType=VARCHAR},
|
|
|
+ #{stu_name,jdbcType=VARCHAR}, #{grade_id,jdbcType=BIGINT}, #{grade_name,jdbcType=VARCHAR}, #{clazz_id,jdbcType=BIGINT},
|
|
|
+ #{clazz_name,jdbcType=VARCHAR}, #{grade_clazz,jdbcType=VARCHAR}
|
|
|
)
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.usoftchina.smartschool.school.po.OutInRecord" >
|
|
|
@@ -58,6 +68,9 @@
|
|
|
<if test="record_remarks != null" >
|
|
|
record_remarks,
|
|
|
</if>
|
|
|
+ <if test="device_id != null" >
|
|
|
+ device_id,
|
|
|
+ </if>
|
|
|
<if test="stu_id != null" >
|
|
|
stu_id,
|
|
|
</if>
|
|
|
@@ -84,6 +97,9 @@
|
|
|
<if test="record_remarks != null" >
|
|
|
#{record_remarks,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="device_id != null" >
|
|
|
+ #{device_id,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
<if test="stu_id != null" >
|
|
|
#{stu_id,jdbcType=BIGINT},
|
|
|
</if>
|
|
|
@@ -132,8 +148,7 @@
|
|
|
</update>
|
|
|
|
|
|
<select id="selectByConditon" resultMap="BaseResultMap">
|
|
|
- select * from out_in_record left join sys_student on out_in_record.stu_id = sys_student.stu_id
|
|
|
- left join sys_clazz on sys_student.clazz_id = sys_clazz.clazz_id
|
|
|
+ select * from out_in_record
|
|
|
<where>
|
|
|
<if test="con != null">
|
|
|
${con}
|