123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- <?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.ie.mapper.AMarjorSubmitMapper">
-
- <resultMap type="AMarjorSubmit" id="AMarjorSubmitResult">
- <result property="id" column="id" />
- <result property="year" column="year" />
- <result property="marjorEnrollId" column="marjorEnrollId" />
- <result property="universityId" column="universityId" />
- <result property="universityName" column="universityName" />
- <result property="level" column="level" />
- <result property="majorGroup" column="majorGroup" />
- <result property="majorName" column="majorName" />
- <result property="majorDirection" column="majorDirection" />
- <result property="examineeType" column="examineeType" />
- <result property="enrollType" column="enrollType" />
- <result property="enrollTotal" column="enrollTotal" />
- <result property="score" column="score" />
- <result property="scoreTotal" column="scoreTotal" />
- <result property="culturalScore" column="culturalScore" />
- <result property="profScore" column="profScore" />
- <result property="schoolScore" column="schoolScore" />
- <result property="chinessScore" column="chinessScore" />
- <result property="mathScore" column="mathScore" />
- <result property="englishScore" column="englishScore" />
- <result property="custCond" column="custCond" />
- <result property="test" column="test" />
- <result property="enrollFormula" column="enrollFormula" />
- </resultMap>
- <sql id="selectAMarjorSubmitVo">
- select id, year, marjorEnrollId, universityId, universityName, level, majorGroup, majorName, majorDirection, examineeType, enrollType, enrollTotal, score, scoreTotal, culturalScore, profScore, schoolScore, chinessScore, mathScore, englishScore, custCond, test, enrollFormula from a_marjor_submit
- </sql>
- <select id="selectListByRuleCond" parameterType="Map" resultMap="AMarjorSubmitResult">
- SELECT distinct p.id, p.year, marjorEnrollId, universityId, universityName, p.level, majorGroup, majorName, majorDirection, examineeType, enrollType, enrollTotal, score, scoreTotal, culturalScore, profScore, schoolScore, chinessScore, mathScore, englishScore, custCond, test
- FROM a_marjor_submit p
- JOIN `b_busi_wish_universities` u ON p.`universityId` = u.`id`
- JOIN `sy_major` m1 ON m1.`name` = p.`majorName`
- JOIN `sy_major` m2 ON m1.`parent_code` = m2.`code`
- JOIN `sy_major` m3 ON m2.`parent_code` = m3.`code`
- <where>
- <if test="examineeType != null and examineeType != '' "> and (p.`examineeType` IS NULL OR p.`examineeType` = '' OR p.`examineeType` = #{examineeType})</if>
- <if test="enrollType != null and enrollType != '' "> and p.`examineeType` = #{enrollType}</if>
- <if test="year != null "> and p.year = #{year}</if>
- <if test="universityCode != null and universityCode != ''"> and u.`code` = #{universityCode}</if>
- <choose>
- <when test="majorCodes != null"> AND m1.`code` in <foreach item="o" collection="majorCodes" open="(" separator="," close=")">#{o}</foreach></when>
- <when test="majorTypes != null"> AND m2.`code` in <foreach item="o" collection="majorTypes" open="(" separator="," close=")">#{o}</foreach></when>
- <when test="majorCategory != null and majorCategory != ''"> AND m3.`code` = #{majorCategory} </when>
- </choose>
- <if test="universityName != null and universityName != ''"> AND u.`name` LIKE CONCAT('%', #{universityName}, '%')</if>
- <if test="universityLevel != null"> AND u.`level` in <foreach item="o" collection="universityLevel" open="(" separator="," close=")">#{o}</foreach></if>
- <if test="universityType != null"> AND u.`type` in <foreach item="o" collection="universityType" open="(" separator="," close=")">#{o}</foreach></if>
- <if test="universityNatureType != null"> AND u.`natureTypeCN` in <foreach item="o" collection="universityNatureType" open="(" separator="," close=")">#{o}</foreach></if>
- <if test="universityLocation != null"> AND u.`location` in <foreach item="o" collection="universityLocation" open="(" separator="," close=")">#{o}</foreach></if>
- </where>
- </select>
- <select id="selectAMarjorSubmitList" parameterType="AMarjorSubmit" resultMap="AMarjorSubmitResult">
- <include refid="selectAMarjorSubmitVo"/>
- <where>
- <if test="year != null "> and year = #{year}</if>
- <if test="marjorEnrollId != null "> and marjorEnrollId = #{marjorEnrollId}</if>
- <if test="universityId != null "> and universityId = #{universityId}</if>
- <if test="universityName != null and universityName != ''"> and universityName like concat('%', #{universityName}, '%')</if>
- <if test="majorGroup != null and majorGroup != ''"> and majorGroup = #{majorGroup}</if>
- <if test="majorName != null and majorName != ''"> and majorName like concat('%', #{majorName}, '%')</if>
- <if test="majorDirection != null and majorDirection != ''"> and majorDirection = #{majorDirection}</if>
- <if test="examineeType != null and examineeType != ''"> and examineeType = #{examineeType}</if>
- <if test="enrollType != null and enrollType != ''"> and enrollType = #{enrollType}</if>
- <if test="enrollTotal != null "> and enrollTotal = #{enrollTotal}</if>
- <if test="score != null "> and score = #{score}</if>
- <if test="culturalScore != null "> and culturalScore = #{culturalScore}</if>
- <if test="profScore != null "> and profScore = #{profScore}</if>
- <if test="schoolScore != null "> and schoolScore = #{schoolScore}</if>
- <if test="chinessScore != null "> and chinessScore = #{chinessScore}</if>
- <if test="mathScore != null "> and mathScore = #{mathScore}</if>
- <if test="englishScore != null "> and englishScore = #{englishScore}</if>
- <if test="custCond != null and custCond != ''"> and custCond = #{custCond}</if>
- </where>
- </select>
-
- <select id="selectAMarjorSubmitById" parameterType="Long" resultMap="AMarjorSubmitResult">
- <include refid="selectAMarjorSubmitVo"/>
- where id = #{id}
- </select>
-
- <insert id="insertAMarjorSubmit" parameterType="AMarjorSubmit" useGeneratedKeys="true" keyProperty="id">
- insert into a_marjor_submit
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="year != null">year,</if>
- <if test="marjorEnrollId != null">marjorEnrollId,</if>
- <if test="universityId != null">universityId,</if>
- <if test="universityName != null">universityName,</if>
- <if test="level != null">level,</if>
- <if test="majorGroup != null">majorGroup,</if>
- <if test="majorName != null">majorName,</if>
- <if test="majorDirection != null">majorDirection,</if>
- <if test="examineeType != null">examineeType,</if>
- <if test="enrollType != null">enrollType,</if>
- <if test="enrollTotal != null">enrollTotal,</if>
- <if test="score != null">score,</if>
- <if test="culturalScore != null">culturalScore,</if>
- <if test="profScore != null">profScore,</if>
- <if test="schoolScore != null">schoolScore,</if>
- <if test="chinessScore != null">chinessScore,</if>
- <if test="mathScore != null">mathScore,</if>
- <if test="englishScore != null">englishScore,</if>
- <if test="custCond != null">custCond,</if>
- <if test="test != null">test,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="year != null">#{year},</if>
- <if test="marjorEnrollId != null">#{marjorEnrollId},</if>
- <if test="universityId != null">#{universityId},</if>
- <if test="universityName != null">#{universityName},</if>
- <if test="level != null">#{level},</if>
- <if test="majorGroup != null">#{majorGroup},</if>
- <if test="majorName != null">#{majorName},</if>
- <if test="majorDirection != null">#{majorDirection},</if>
- <if test="examineeType != null">#{examineeType},</if>
- <if test="enrollType != null">#{enrollType},</if>
- <if test="enrollTotal != null">#{enrollTotal},</if>
- <if test="score != null">#{score},</if>
- <if test="culturalScore != null">#{culturalScore},</if>
- <if test="profScore != null">#{profScore},</if>
- <if test="schoolScore != null">#{schoolScore},</if>
- <if test="chinessScore != null">#{chinessScore},</if>
- <if test="mathScore != null">#{mathScore},</if>
- <if test="englishScore != null">#{englishScore},</if>
- <if test="custCond != null">#{custCond},</if>
- <if test="test != null">#{test},</if>
- </trim>
- </insert>
- <update id="updateAMarjorSubmit" parameterType="AMarjorSubmit">
- update a_marjor_submit
- <trim prefix="SET" suffixOverrides=",">
- <if test="year != null">year = #{year},</if>
- <if test="marjorEnrollId != null">marjorEnrollId = #{marjorEnrollId},</if>
- <if test="universityId != null">universityId = #{universityId},</if>
- <if test="universityName != null">universityName = #{universityName},</if>
- <if test="level != null">level = #{level},</if>
- <if test="majorGroup != null">majorGroup = #{majorGroup},</if>
- <if test="majorName != null">majorName = #{majorName},</if>
- <if test="majorDirection != null">majorDirection = #{majorDirection},</if>
- <if test="examineeType != null">examineeType = #{examineeType},</if>
- <if test="enrollType != null">enrollType = #{enrollType},</if>
- <if test="enrollTotal != null">enrollTotal = #{enrollTotal},</if>
- <if test="score != null">score = #{score},</if>
- <if test="culturalScore != null">culturalScore = #{culturalScore},</if>
- <if test="profScore != null">profScore = #{profScore},</if>
- <if test="schoolScore != null">schoolScore = #{schoolScore},</if>
- <if test="chinessScore != null">chinessScore = #{chinessScore},</if>
- <if test="mathScore != null">mathScore = #{mathScore},</if>
- <if test="englishScore != null">englishScore = #{englishScore},</if>
- <if test="custCond != null">custCond = #{custCond},</if>
- <if test="test != null">test = #{test},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteAMarjorSubmitById" parameterType="Long">
- delete from a_marjor_submit where id = #{id}
- </delete>
- <delete id="deleteAMarjorSubmitByIds" parameterType="String">
- delete from a_marjor_submit where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|