|
|
@@ -90,7 +90,7 @@
|
|
|
<if test="devicePassword != null" >
|
|
|
devicePassword = #{devicePassword,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if ktest="deviceIp != null" >
|
|
|
+ <if test="deviceIp != null" >
|
|
|
deviceIp = #{deviceIp,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="deviceRemark != null" >k
|
|
|
@@ -107,4 +107,131 @@
|
|
|
delete from device where deviceId = #{id}
|
|
|
</delete>
|
|
|
|
|
|
+ <select id="selectInfoByCardNo" parameterType="string" resultMap="information">
|
|
|
+ select school_appid,school_secret,sys_parents.openid,sys_student.stu_name,sys_student.stu_id,sys_school.school_id,
|
|
|
+ stu_number,sys_student.clazz_id,stu_class,stu_grade,stu_classnickname,stu_sex from sys_student left join sys_school on sys_student.school_id=sys_school.school_id
|
|
|
+ left join sys_parents_stu on sys_student.stu_id=sys_parents_stu.stu_id left join sys_parents on sys_parents.parent_id =
|
|
|
+ sys_parents_stu.parent_id where stu_cardNo = #{cardNo}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <resultMap id="information" type="com.usoftchina.smartschool.device.po.Information" >
|
|
|
+ <result column="school_appid" property="appId" jdbcType="VARCHAR" />
|
|
|
+ <result column="school_secret" property="secret" jdbcType="VARCHAR" />
|
|
|
+ <result column="openid" property="openId" jdbcType="VARCHAR" />
|
|
|
+ <result column="stu_name" property="stuName" jdbcType="VARCHAR" />
|
|
|
+ <result column="stu_id" property="stuId" jdbcType="BIGINT"/>
|
|
|
+ <result column="school_id" property="schoolId" jdbcType="BIGINT"/>
|
|
|
+ <result column="stu_number" property="stuNumber" jdbcType="VARCHAR" />
|
|
|
+ <result column="clazz_id" property="clazz_id" jdbcType="BIGINT" />
|
|
|
+ <result column="stu_class" property="stuClass" jdbcType="VARCHAR" />
|
|
|
+ <result column="stu_grade" property="stuGrade" jdbcType="VARCHAR" />
|
|
|
+ <result column="stu_classnickname" property="stuClassnickname" jdbcType="VARCHAR"/>
|
|
|
+ <result column="stu_sex" property="stuSex" jdbcType="INTEGER"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <insert id="insertRecordSelective" parameterType="com.usoftchina.smartschool.device.po.OutInRecord" >
|
|
|
+ insert into out_in_record
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
+ <if test="record_name != null" >
|
|
|
+ record_name,
|
|
|
+ </if>
|
|
|
+ <if test="out_date != null" >
|
|
|
+ out_date,
|
|
|
+ </if>
|
|
|
+ <if test="in_date != null" >
|
|
|
+ in_date,
|
|
|
+ </if>
|
|
|
+ <if test="record_details != null" >
|
|
|
+ record_details,
|
|
|
+ </if>
|
|
|
+ <if test="record_remarks != null" >
|
|
|
+ record_remarks,
|
|
|
+ </if>
|
|
|
+ <if test="device_id != null" >
|
|
|
+ device_id,
|
|
|
+ </if>
|
|
|
+ <if test="stu_id != null" >
|
|
|
+ stu_id,
|
|
|
+ </if>
|
|
|
+ <if test="school_id != null" >
|
|
|
+ school_id,
|
|
|
+ </if>
|
|
|
+ <if test="stu_number != null" >
|
|
|
+ stu_number,
|
|
|
+ </if>
|
|
|
+ <if test="clazz_id != null" >
|
|
|
+ clazz_id,
|
|
|
+ </if>
|
|
|
+ <if test="clazz_name != null" >
|
|
|
+ clazz_name,
|
|
|
+ </if>
|
|
|
+ <if test="grade_name != null" >
|
|
|
+ grade_name,
|
|
|
+ </if>
|
|
|
+ <if test="grade_clazz != null" >
|
|
|
+ grade_clazz,
|
|
|
+ </if>
|
|
|
+ <if test="stu_sex != null" >
|
|
|
+ stu_sex,
|
|
|
+ </if>
|
|
|
+ <if test="record_type != null" >
|
|
|
+ record_type,
|
|
|
+ </if>
|
|
|
+ <if test="record_date != null" >
|
|
|
+ record_date,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
+ <if test="record_name != null" >
|
|
|
+ #{record_name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="out_date != null" >
|
|
|
+ #{out_date,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="in_date != null" >
|
|
|
+ #{in_date,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="record_details != null" >
|
|
|
+ #{record_details,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <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>
|
|
|
+ <if test="school_id != null" >
|
|
|
+ #{school_id,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="stu_number != null" >
|
|
|
+ #{stu_number,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="clazz_id != null" >
|
|
|
+ #{clazz_id,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="clazz_name != null" >
|
|
|
+ #{clazz_name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="grade_name != null" >
|
|
|
+ #{grade_name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="grade_clazz != null" >
|
|
|
+ #{grade_clazz,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="stu_sex != null" >
|
|
|
+ #{stu_sex,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record_type != null" >
|
|
|
+ #{record_type,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record_date != null" >
|
|
|
+ #{record_date,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
</mapper>
|