123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <?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.sy.mapper.SyPhilosophyViewMajorMapper">
-
- <resultMap type="SyPhilosophyViewMajor" id="SyPhilosophyViewMajorResult">
- <result property="id" column="id" />
- <result property="matchCode" column="match_code" />
- <result property="majorCategoryCode" column="major_category_code" />
- <result property="majorCategory" column="major_category" />
- </resultMap>
- <sql id="selectSyPhilosophyViewMajorVo">
- select id, match_code, major_category_code, major_category from sy_philosophy_view_major
- </sql>
- <select id="selectSyPhilosophyViewMajorList" parameterType="SyPhilosophyViewMajor" resultMap="SyPhilosophyViewMajorResult">
- <include refid="selectSyPhilosophyViewMajorVo"/>
- <where>
- <if test="matchCode != null and matchCode != ''"> and match_code = #{matchCode}</if>
- <if test="majorCategoryCode != null and majorCategoryCode != ''"> and major_category_code = #{majorCategoryCode}</if>
- <if test="majorCategory != null and majorCategory != ''"> and major_category = #{majorCategory}</if>
- </where>
- </select>
-
- <select id="selectSyPhilosophyViewMajorById" parameterType="Long" resultMap="SyPhilosophyViewMajorResult">
- <include refid="selectSyPhilosophyViewMajorVo"/>
- where id = #{id}
- </select>
-
- <insert id="insertSyPhilosophyViewMajor" parameterType="SyPhilosophyViewMajor" useGeneratedKeys="true" keyProperty="id">
- insert into sy_philosophy_view_major
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="matchCode != null">match_code,</if>
- <if test="majorCategoryCode != null">major_category_code,</if>
- <if test="majorCategory != null">major_category,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="matchCode != null">#{matchCode},</if>
- <if test="majorCategoryCode != null">#{majorCategoryCode},</if>
- <if test="majorCategory != null">#{majorCategory},</if>
- </trim>
- </insert>
- <update id="updateSyPhilosophyViewMajor" parameterType="SyPhilosophyViewMajor">
- update sy_philosophy_view_major
- <trim prefix="SET" suffixOverrides=",">
- <if test="matchCode != null">match_code = #{matchCode},</if>
- <if test="majorCategoryCode != null">major_category_code = #{majorCategoryCode},</if>
- <if test="majorCategory != null">major_category = #{majorCategory},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteSyPhilosophyViewMajorById" parameterType="Long">
- delete from sy_philosophy_view_major where id = #{id}
- </delete>
- <delete id="deleteSyPhilosophyViewMajorByIds" parameterType="String">
- delete from sy_philosophy_view_major where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|