123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265 |
- <?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" />
- <result property="isLset" column="is_lset" />
- <result property="isPoverty" column="is_poverty" />
- <result property="emergencyContact" column="emergency_contact" />
- <result property="emergencyContactTelephone" column="emergency_contact_telephone" />
- </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,is_lset,is_poverty,emergency_contact,emergency_contact_telephone 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>
- <if test="emergencyContact != null and emergencyContact != ''"> and s.emergency_contact = #{emergencyContact}</if>
- <if test="emergencyContactTelephone != null and emergencyContactTelephone != ''"> and s.emergency_contact_telephone = #{emergencyContactTelephone}</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>
- <if test="isLset != null">is_lset,</if>
- <if test="isPoverty != null">is_poverty,</if>
- <if test="emergencyContact != null">emergency_contact,</if>
- <if test="emergencyContactTelephone != null">emergency_contact_telephone,</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>
- <if test="isLset != null">#{isLset},</if>
- <if test="isPoverty != null">#{isPoverty},</if>
- <if test="emergencyContact != null">#{emergencyContact},</if>
- <if test="emergencyContactTelephone != null">#{emergencyContactTelephone},</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>
- <if test="isLset != null">is_lset= #{isLset},</if>
- <if test="isPoverty != null">is_poverty= #{isPoverty},</if>
- <if test="emergencyContact != null">emergency_contact= #{emergencyContact},</if>
- <if test="emergencyContactTelephone != null">emergency_contact_telephone= #{emergencyContactTelephone},</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>
|