|
|
@@ -4,100 +4,13 @@
|
|
|
<mapper namespace="com.usoftchina.smartschool.school.wxschool.mapper.WxOutInRecordMapper">
|
|
|
|
|
|
<sql id="OutInRecordVo">
|
|
|
- select `record_id`,`record_name`,`out_date`,`in_date`,`record_details`,`record_remarks`,`stu_id`,`school_id` from out_in_record
|
|
|
+ select `record_id`,`record_name`,`out_date`,`in_date`,`record_details`,`record_remarks`,`stu_id`,`school_id`,`device_id`,`stu_number`,`stu_name`,`grade_id`,`grade_name`,`clazz_id`,`clazz_name`,`grade_clazz`,`stu_sex` from out_in_record
|
|
|
</sql>
|
|
|
|
|
|
<select id="get" resultType="com.usoftchina.smartschool.school.po.OutInRecordDO">
|
|
|
<include refid="OutInRecordVo"/> where record_id = #{value}
|
|
|
</select>
|
|
|
|
|
|
- <select id="list" resultType="com.usoftchina.smartschool.school.po.OutInRecordDO">
|
|
|
- <include refid="OutInRecordVo"/>
|
|
|
- <where>
|
|
|
- <if test="recordId != null and recordId != ''"> and record_id = #{recordId} </if>
|
|
|
- <if test="recordName != null and recordName != ''"> and record_name = #{recordName} </if>
|
|
|
- <if test="outDate != null and outDate != ''"> and out_date = #{outDate} </if>
|
|
|
- <if test="inDate != null and inDate != ''"> and in_date = #{inDate} </if>
|
|
|
- <if test="recordDetails != null and recordDetails != ''"> and record_details = #{recordDetails} </if>
|
|
|
- <if test="recordRemarks != null and recordRemarks != ''"> and record_remarks = #{recordRemarks} </if>
|
|
|
- <if test="stuId != null and stuId != ''"> and stu_id = #{stuId} </if>
|
|
|
- <if test="schoolId != null and schoolId != ''"> and school_id = #{schoolId} </if>
|
|
|
- </where>
|
|
|
- <choose>
|
|
|
- <when test="sort != null and sort.trim() != ''">
|
|
|
- order by ${sort} ${order}
|
|
|
- </when>
|
|
|
- <otherwise>
|
|
|
- order by record_id desc
|
|
|
- </otherwise>
|
|
|
- </choose>
|
|
|
- <if test="offset != null and limit != null">
|
|
|
- limit #{offset}, #{limit}
|
|
|
- </if>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="count" resultType="int">
|
|
|
- select count(*) from out_in_record
|
|
|
- <where>
|
|
|
- <if test="recordId != null and recordId != ''"> and record_id = #{recordId} </if>
|
|
|
- <if test="recordName != null and recordName != ''"> and record_name = #{recordName} </if>
|
|
|
- <if test="outDate != null and outDate != ''"> and out_date = #{outDate} </if>
|
|
|
- <if test="inDate != null and inDate != ''"> and in_date = #{inDate} </if>
|
|
|
- <if test="recordDetails != null and recordDetails != ''"> and record_details = #{recordDetails} </if>
|
|
|
- <if test="recordRemarks != null and recordRemarks != ''"> and record_remarks = #{recordRemarks} </if>
|
|
|
- <if test="stuId != null and stuId != ''"> and stu_id = #{stuId} </if>
|
|
|
- <if test="schoolId != null and schoolId != ''"> and school_id = #{schoolId} </if>
|
|
|
- </where>
|
|
|
- </select>
|
|
|
-
|
|
|
- <insert id="save" parameterType="com.usoftchina.smartschool.school.po.OutInRecordDO" useGeneratedKeys="true" keyProperty="recordId">
|
|
|
- insert into out_in_record
|
|
|
- (
|
|
|
- `record_name`,
|
|
|
- `out_date`,
|
|
|
- `in_date`,
|
|
|
- `record_details`,
|
|
|
- `record_remarks`,
|
|
|
- `stu_id`,
|
|
|
- `school_id`
|
|
|
- )
|
|
|
- values
|
|
|
- (
|
|
|
- #{recordName},
|
|
|
- #{outDate},
|
|
|
- #{inDate},
|
|
|
- #{recordDetails},
|
|
|
- #{recordRemarks},
|
|
|
- #{stuId},
|
|
|
- #{schoolId}
|
|
|
- )
|
|
|
- </insert>
|
|
|
-
|
|
|
- <update id="update" parameterType="com.usoftchina.smartschool.school.po.OutInRecordDO">
|
|
|
- update out_in_record
|
|
|
- <set>
|
|
|
- <if test="recordName != null">`record_name` = #{recordName}, </if>
|
|
|
- <if test="outDate != null">`out_date` = #{outDate}, </if>
|
|
|
- <if test="inDate != null">`in_date` = #{inDate}, </if>
|
|
|
- <if test="recordDetails != null">`record_details` = #{recordDetails}, </if>
|
|
|
- <if test="recordRemarks != null">`record_remarks` = #{recordRemarks}, </if>
|
|
|
- <if test="stuId != null">`stu_id` = #{stuId}, </if>
|
|
|
- <if test="schoolId != null">`school_id` = #{schoolId}</if>
|
|
|
- </set>
|
|
|
- where record_id = #{recordId}
|
|
|
- </update>
|
|
|
-
|
|
|
- <delete id="remove">
|
|
|
- delete from out_in_record where record_id = #{value}
|
|
|
- </delete>
|
|
|
-
|
|
|
- <delete id="batchRemove">
|
|
|
- delete from out_in_record where record_id in
|
|
|
- <foreach item="recordId" collection="array" open="(" separator="," close=")">
|
|
|
- #{recordId}
|
|
|
- </foreach>
|
|
|
- </delete>
|
|
|
-
|
|
|
<select id="selectOutInRecordDOListByStuId" resultType="com.usoftchina.smartschool.school.po.OutInRecordDO">
|
|
|
<include refid="OutInRecordVo"/> where stu_id = #{stuId}
|
|
|
order by record_id desc
|