|
@@ -0,0 +1,238 @@
|
|
|
|
+<?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.ruoyi.system.mapper.StudentInfoOldMapper">
|
|
|
|
+
|
|
|
|
+ <resultMap type="StudentInfoOld" id="StudentInfoOldResult">
|
|
|
|
+ <result property="oldId" column="old_id" />
|
|
|
|
+ <result property="studentId" column="student_id" />
|
|
|
|
+ <result property="name" column="name" />
|
|
|
|
+ <result property="sex" column="sex" />
|
|
|
|
+ <result property="age" column="age" />
|
|
|
|
+ <result property="school" column="school" />
|
|
|
|
+ <result property="studentNumber" column="student_number" />
|
|
|
|
+ <result property="idCard" column="id_card" />
|
|
|
|
+ <result property="isNearsightedness" column="is_nearsightedness" />
|
|
|
|
+ <result property="degreeMyopia" column="degree_myopia" />
|
|
|
|
+ <result property="height" column="height" />
|
|
|
|
+ <result property="weight" column="weight" />
|
|
|
|
+ <result property="bloodType" column="blood_type" />
|
|
|
|
+ <result property="politicalStatus" column="political_status" />
|
|
|
|
+ <result property="health" column="health" />
|
|
|
|
+ <result property="identificationPhoto" column="identification_photo" />
|
|
|
|
+ <result property="mind" column="mind" />
|
|
|
|
+ <result property="entrancePermit" column="entrance_permit" />
|
|
|
|
+ <result property="fatherName" column="father_name" />
|
|
|
|
+ <result property="fatherTelephone" column="father_telephone" />
|
|
|
|
+ <result property="motherName" column="mother_name" />
|
|
|
|
+ <result property="motherTelephone" column="mother_telephone" />
|
|
|
|
+ <result property="address" column="address" />
|
|
|
|
+ <result property="longitude" column="longitude" />
|
|
|
|
+ <result property="latitude" column="latitude" />
|
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
|
+ <result property="remark" column="remark" />
|
|
|
|
+
|
|
|
|
+ <result property="isMedicalHistory" column="is_medical_history" />
|
|
|
|
+ <result property="medicalDescription" column="medical_description" />
|
|
|
|
+ <result property="psychologicalDescription" column="psychological_description" />
|
|
|
|
+ </resultMap>
|
|
|
|
+
|
|
|
|
+ <sql id="selectStudentInfoOldVo">
|
|
|
|
+ select old_id, student_id, name, sex, age, school, student_number, id_card, is_nearsightedness, degree_myopia, height, weight, blood_type, political_status, health, identification_photo, mind, entrance_permit, father_name, father_telephone, mother_name, mother_telephone, address, longitude, latitude, create_by, create_time, update_by, update_time, remark,is_medical_history,medical_description,psychological_description from student_info_old
|
|
|
|
+ </sql>
|
|
|
|
+
|
|
|
|
+ <select id="selectStudentInfoOldList" parameterType="StudentInfoOld" resultMap="StudentInfoOldResult">
|
|
|
|
+ <include refid="selectStudentInfoOldVo"/>
|
|
|
|
+ <where>
|
|
|
|
+ <if test="studentId != null "> and student_id = #{studentId}</if>
|
|
|
|
+ <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
|
|
+ <if test="sex != null and sex != ''"> and sex = #{sex}</if>
|
|
|
|
+ <if test="age != null and age != ''"> and age = #{age}</if>
|
|
|
|
+ <if test="school != null and school != ''"> and school = #{school}</if>
|
|
|
|
+ <if test="studentNumber != null and studentNumber != ''"> and student_number = #{studentNumber}</if>
|
|
|
|
+ <if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if>
|
|
|
|
+ <if test="isNearsightedness != null and isNearsightedness != ''"> and is_nearsightedness = #{isNearsightedness}</if>
|
|
|
|
+ <if test="degreeMyopia != null and degreeMyopia != ''"> and degree_myopia = #{degreeMyopia}</if>
|
|
|
|
+ <if test="height != null and height != ''"> and height = #{height}</if>
|
|
|
|
+ <if test="weight != null and weight != ''"> and weight = #{weight}</if>
|
|
|
|
+ <if test="bloodType != null and bloodType != ''"> and blood_type = #{bloodType}</if>
|
|
|
|
+ <if test="politicalStatus != null and politicalStatus != ''"> and political_status = #{politicalStatus}</if>
|
|
|
|
+ <if test="health != null and health != ''"> and health = #{health}</if>
|
|
|
|
+ <if test="identificationPhoto != null and identificationPhoto != ''"> and identification_photo = #{identificationPhoto}</if>
|
|
|
|
+ <if test="mind != null and mind != ''"> and mind = #{mind}</if>
|
|
|
|
+ <if test="entrancePermit != null and entrancePermit != ''"> and entrance_permit = #{entrancePermit}</if>
|
|
|
|
+ <if test="fatherName != null and fatherName != ''"> and father_name like concat('%', #{fatherName}, '%')</if>
|
|
|
|
+ <if test="fatherTelephone != null and fatherTelephone != ''"> and father_telephone = #{fatherTelephone}</if>
|
|
|
|
+ <if test="motherName != null and motherName != ''"> and mother_name like concat('%', #{motherName}, '%')</if>
|
|
|
|
+ <if test="motherTelephone != null and motherTelephone != ''"> and mother_telephone = #{motherTelephone}</if>
|
|
|
|
+ <if test="address != null and address != ''"> and address = #{address}</if>
|
|
|
|
+ <if test="longitude != null and longitude != ''"> and longitude = #{longitude}</if>
|
|
|
|
+ <if test="latitude != null and latitude != ''"> and latitude = #{latitude}</if>
|
|
|
|
+ </where>
|
|
|
|
+ order by create_time desc
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="selectStudentInfoOldById" parameterType="Long" resultMap="StudentInfoOldResult">
|
|
|
|
+ <include refid="selectStudentInfoOldVo"/>
|
|
|
|
+ where old_id = #{id}
|
|
|
|
+ </select>
|
|
|
|
+ <select id="selectStudentInfoOldListEcharts" resultMap="StudentInfoOldResult">
|
|
|
|
+ <include refid="selectStudentInfoOldVo"/>
|
|
|
|
+ <where>
|
|
|
|
+ <if test="studentId != null "> and student_id = #{studentId}</if>
|
|
|
|
+ <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
|
|
+ <if test="sex != null and sex != ''"> and sex = #{sex}</if>
|
|
|
|
+ <if test="age != null and age != ''"> and age = #{age}</if>
|
|
|
|
+ <if test="school != null and school != ''"> and school = #{school}</if>
|
|
|
|
+ <if test="studentNumber != null and studentNumber != ''"> and student_number = #{studentNumber}</if>
|
|
|
|
+ <if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if>
|
|
|
|
+ <if test="isNearsightedness != null and isNearsightedness != ''"> and is_nearsightedness = #{isNearsightedness}</if>
|
|
|
|
+ <if test="degreeMyopia != null and degreeMyopia != ''"> and degree_myopia = #{degreeMyopia}</if>
|
|
|
|
+ <if test="height != null and height != ''"> and height = #{height}</if>
|
|
|
|
+ <if test="weight != null and weight != ''"> and weight = #{weight}</if>
|
|
|
|
+ <if test="bloodType != null and bloodType != ''"> and blood_type = #{bloodType}</if>
|
|
|
|
+ <if test="politicalStatus != null and politicalStatus != ''"> and political_status = #{politicalStatus}</if>
|
|
|
|
+ <if test="health != null and health != ''"> and health = #{health}</if>
|
|
|
|
+ <if test="identificationPhoto != null and identificationPhoto != ''"> and identification_photo = #{identificationPhoto}</if>
|
|
|
|
+ <if test="mind != null and mind != ''"> and mind = #{mind}</if>
|
|
|
|
+ <if test="entrancePermit != null and entrancePermit != ''"> and entrance_permit = #{entrancePermit}</if>
|
|
|
|
+ <if test="fatherName != null and fatherName != ''"> and father_name like concat('%', #{fatherName}, '%')</if>
|
|
|
|
+ <if test="fatherTelephone != null and fatherTelephone != ''"> and father_telephone = #{fatherTelephone}</if>
|
|
|
|
+ <if test="motherName != null and motherName != ''"> and mother_name like concat('%', #{motherName}, '%')</if>
|
|
|
|
+ <if test="motherTelephone != null and motherTelephone != ''"> and mother_telephone = #{motherTelephone}</if>
|
|
|
|
+ <if test="address != null and address != ''"> and address = #{address}</if>
|
|
|
|
+ <if test="longitude != null and longitude != ''"> and longitude = #{longitude}</if>
|
|
|
|
+ <if test="latitude != null and latitude != ''"> and latitude = #{latitude}</if>
|
|
|
|
+ </where>
|
|
|
|
+ order by create_time asc
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <insert id="insertStudentInfoOld" parameterType="StudentInfoOld" useGeneratedKeys="true" keyProperty="oldId">
|
|
|
|
+ insert into student_info_old
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="studentId != null">student_id,</if>
|
|
|
|
+ <if test="name != null">name,</if>
|
|
|
|
+ <if test="sex != null">sex,</if>
|
|
|
|
+ <if test="age != null">age,</if>
|
|
|
|
+ <if test="school != null">school,</if>
|
|
|
|
+ <if test="studentNumber != null">student_number,</if>
|
|
|
|
+ <if test="idCard != null">id_card,</if>
|
|
|
|
+ <if test="isNearsightedness != null">is_nearsightedness,</if>
|
|
|
|
+ <if test="degreeMyopia != null">degree_myopia,</if>
|
|
|
|
+ <if test="height != null">height,</if>
|
|
|
|
+ <if test="weight != null">weight,</if>
|
|
|
|
+ <if test="bloodType != null">blood_type,</if>
|
|
|
|
+ <if test="politicalStatus != null">political_status,</if>
|
|
|
|
+ <if test="health != null">health,</if>
|
|
|
|
+ <if test="identificationPhoto != null">identification_photo,</if>
|
|
|
|
+ <if test="mind != null">mind,</if>
|
|
|
|
+ <if test="entrancePermit != null">entrance_permit,</if>
|
|
|
|
+ <if test="fatherName != null">father_name,</if>
|
|
|
|
+ <if test="fatherTelephone != null">father_telephone,</if>
|
|
|
|
+ <if test="motherName != null">mother_name,</if>
|
|
|
|
+ <if test="motherTelephone != null">mother_telephone,</if>
|
|
|
|
+ <if test="address != null">address,</if>
|
|
|
|
+ <if test="longitude != null">longitude,</if>
|
|
|
|
+ <if test="latitude != null">latitude,</if>
|
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
|
+
|
|
|
|
+ <if test="isMedicalHistory != null">is_medical_history,</if>
|
|
|
|
+ <if test="medicalDescription != null">medical_description,</if>
|
|
|
|
+ <if test="psychologicalDescription != null">psychological_description,</if>
|
|
|
|
+ </trim>
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="studentId != null">#{studentId},</if>
|
|
|
|
+ <if test="name != null">#{name},</if>
|
|
|
|
+ <if test="sex != null">#{sex},</if>
|
|
|
|
+ <if test="age != null">#{age},</if>
|
|
|
|
+ <if test="school != null">#{school},</if>
|
|
|
|
+ <if test="studentNumber != null">#{studentNumber},</if>
|
|
|
|
+ <if test="idCard != null">#{idCard},</if>
|
|
|
|
+ <if test="isNearsightedness != null">#{isNearsightedness},</if>
|
|
|
|
+ <if test="degreeMyopia != null">#{degreeMyopia},</if>
|
|
|
|
+ <if test="height != null">#{height},</if>
|
|
|
|
+ <if test="weight != null">#{weight},</if>
|
|
|
|
+ <if test="bloodType != null">#{bloodType},</if>
|
|
|
|
+ <if test="politicalStatus != null">#{politicalStatus},</if>
|
|
|
|
+ <if test="health != null">#{health},</if>
|
|
|
|
+ <if test="identificationPhoto != null">#{identificationPhoto},</if>
|
|
|
|
+ <if test="mind != null">#{mind},</if>
|
|
|
|
+ <if test="entrancePermit != null">#{entrancePermit},</if>
|
|
|
|
+ <if test="fatherName != null">#{fatherName},</if>
|
|
|
|
+ <if test="fatherTelephone != null">#{fatherTelephone},</if>
|
|
|
|
+ <if test="motherName != null">#{motherName},</if>
|
|
|
|
+ <if test="motherTelephone != null">#{motherTelephone},</if>
|
|
|
|
+ <if test="address != null">#{address},</if>
|
|
|
|
+ <if test="longitude != null">#{longitude},</if>
|
|
|
|
+ <if test="latitude != null">#{latitude},</if>
|
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
|
+
|
|
|
|
+ <if test="isMedicalHistory != null">#{isMedicalHistory},</if>
|
|
|
|
+ <if test="medicalDescription != null">#{medicalDescription},</if>
|
|
|
|
+ <if test="psychologicalDescription != null">#{psychologicalDescription},</if>
|
|
|
|
+ </trim>
|
|
|
|
+ </insert>
|
|
|
|
+
|
|
|
|
+ <update id="updateStudentInfoOld" parameterType="StudentInfoOld">
|
|
|
|
+ update student_info_old
|
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
|
+ <if test="studentId != null">student_id = #{studentId},</if>
|
|
|
|
+ <if test="name != null">name = #{name},</if>
|
|
|
|
+ <if test="sex != null">sex = #{sex},</if>
|
|
|
|
+ <if test="age != null">age = #{age},</if>
|
|
|
|
+ <if test="school != null">school = #{school},</if>
|
|
|
|
+ <if test="studentNumber != null">student_number = #{studentNumber},</if>
|
|
|
|
+ <if test="idCard != null">id_card = #{idCard},</if>
|
|
|
|
+ <if test="isNearsightedness != null">is_nearsightedness = #{isNearsightedness},</if>
|
|
|
|
+ <if test="degreeMyopia != null">degree_myopia = #{degreeMyopia},</if>
|
|
|
|
+ <if test="height != null">height = #{height},</if>
|
|
|
|
+ <if test="weight != null">weight = #{weight},</if>
|
|
|
|
+ <if test="bloodType != null">blood_type = #{bloodType},</if>
|
|
|
|
+ <if test="politicalStatus != null">political_status = #{politicalStatus},</if>
|
|
|
|
+ <if test="health != null">health = #{health},</if>
|
|
|
|
+ <if test="identificationPhoto != null">identification_photo = #{identificationPhoto},</if>
|
|
|
|
+ <if test="mind != null">mind = #{mind},</if>
|
|
|
|
+ <if test="entrancePermit != null">entrance_permit = #{entrancePermit},</if>
|
|
|
|
+ <if test="fatherName != null">father_name = #{fatherName},</if>
|
|
|
|
+ <if test="fatherTelephone != null">father_telephone = #{fatherTelephone},</if>
|
|
|
|
+ <if test="motherName != null">mother_name = #{motherName},</if>
|
|
|
|
+ <if test="motherTelephone != null">mother_telephone = #{motherTelephone},</if>
|
|
|
|
+ <if test="address != null">address = #{address},</if>
|
|
|
|
+ <if test="longitude != null">longitude = #{longitude},</if>
|
|
|
|
+ <if test="latitude != null">latitude = #{latitude},</if>
|
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
|
+
|
|
|
|
+ <if test="isMedicalHistory != null">is_medical_history = #{isMedicalHistory},</if>
|
|
|
|
+ <if test="medicalDescription != null">medical_description = #{medicalDescription},</if>
|
|
|
|
+ <if test="psychologicalDescription != null">psychological_description = #{psychologicalDescription},</if>
|
|
|
|
+ </trim>
|
|
|
|
+ where old_id = #{oldId}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteStudentInfoOldById" parameterType="Long">
|
|
|
|
+ delete from student_info_old where old_id = #{id}
|
|
|
|
+ </delete>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteStudentInfoOldByIds" parameterType="String">
|
|
|
|
+ delete from student_info_old where old_id in
|
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
+ #{id}
|
|
|
|
+ </foreach>
|
|
|
|
+ </delete>
|
|
|
|
+</mapper>
|