<?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.syzy.mapper.BBusiWishUniversitiesSubjectevaluateMapper">
    
    <resultMap type="BBusiWishUniversitiesSubjectevaluate" id="BBusiWishUniversitiesSubjectevaluateResult">
        <result property="id"    column="id"    />
        <result property="collegeCode"    column="collegeCode"    />
        <result property="extTypeId"    column="extTypeId"    />
        <result property="extTypeName"    column="extTypeName"    />
        <result property="code"    column="code"    />
        <result property="name"    column="name"    />
        <result property="level"    column="level"    />
        <result property="sort"    column="sort"    />
        <result property="createTime"    column="createTime"    />
        <result property="updateTime"    column="updateTime"    />
    </resultMap>

    <sql id="selectBBusiWishUniversitiesSubjectevaluateVo">
        select id, collegeCode, extTypeId, extTypeName, code, name, level, sort, createTime, updateTime from b_busi_wish_universities_subjectevaluate
    </sql>

    <select id="selectBBusiWishUniversitiesSubjectevaluateList" parameterType="BBusiWishUniversitiesSubjectevaluate" resultMap="BBusiWishUniversitiesSubjectevaluateResult">
        <include refid="selectBBusiWishUniversitiesSubjectevaluateVo"/>
        <where>  
            <if test="collegeCode != null  and collegeCode != ''"> and collegeCode = #{collegeCode}</if>
            <if test="extTypeId != null  and extTypeId != ''"> and extTypeId = #{extTypeId}</if>
            <if test="extTypeName != null  and extTypeName != ''"> and extTypeName like concat('%', #{extTypeName}, '%')</if>
            <if test="code != null  and code != ''"> and code = #{code}</if>
            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
            <if test="level != null  and level != ''"> and level = #{level}</if>
            <if test="sort != null "> and sort = #{sort}</if>
            <if test="createTime != null "> and createTime = #{createTime}</if>
            <if test="updateTime != null "> and updateTime = #{updateTime}</if>
        </where>
    </select>
    
    <select id="selectBBusiWishUniversitiesSubjectevaluateById" parameterType="String" resultMap="BBusiWishUniversitiesSubjectevaluateResult">
        <include refid="selectBBusiWishUniversitiesSubjectevaluateVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertBBusiWishUniversitiesSubjectevaluate" parameterType="BBusiWishUniversitiesSubjectevaluate">
        insert into b_busi_wish_universities_subjectevaluate
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null and id != ''">id,</if>
            <if test="collegeCode != null and collegeCode != ''">collegeCode,</if>
            <if test="extTypeId != null">extTypeId,</if>
            <if test="extTypeName != null">extTypeName,</if>
            <if test="code != null and code != ''">code,</if>
            <if test="name != null and name != ''">name,</if>
            <if test="level != null and level != ''">level,</if>
            <if test="sort != null">sort,</if>
            <if test="createTime != null">createTime,</if>
            <if test="updateTime != null">updateTime,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null and id != ''">#{id},</if>
            <if test="collegeCode != null and collegeCode != ''">#{collegeCode},</if>
            <if test="extTypeId != null">#{extTypeId},</if>
            <if test="extTypeName != null">#{extTypeName},</if>
            <if test="code != null and code != ''">#{code},</if>
            <if test="name != null and name != ''">#{name},</if>
            <if test="level != null and level != ''">#{level},</if>
            <if test="sort != null">#{sort},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="updateTime != null">#{updateTime},</if>
         </trim>
    </insert>

    <update id="updateBBusiWishUniversitiesSubjectevaluate" parameterType="BBusiWishUniversitiesSubjectevaluate">
        update b_busi_wish_universities_subjectevaluate
        <trim prefix="SET" suffixOverrides=",">
            <if test="collegeCode != null and collegeCode != ''">collegeCode = #{collegeCode},</if>
            <if test="extTypeId != null">extTypeId = #{extTypeId},</if>
            <if test="extTypeName != null">extTypeName = #{extTypeName},</if>
            <if test="code != null and code != ''">code = #{code},</if>
            <if test="name != null and name != ''">name = #{name},</if>
            <if test="level != null and level != ''">level = #{level},</if>
            <if test="sort != null">sort = #{sort},</if>
            <if test="createTime != null">createTime = #{createTime},</if>
            <if test="updateTime != null">updateTime = #{updateTime},</if>
        </trim>
        where id = #{id}
    </update>

    <delete id="deleteBBusiWishUniversitiesSubjectevaluateById" parameterType="String">
        delete from b_busi_wish_universities_subjectevaluate where id = #{id}
    </delete>

    <delete id="deleteBBusiWishUniversitiesSubjectevaluateByIds" parameterType="String">
        delete from b_busi_wish_universities_subjectevaluate where id in 
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>