123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- <?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.ygj.yuemum.dao.college.CollegeTestDao" >
- <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.college.CollegeTest" >
- <id column="id" property="id" jdbcType="INTEGER" />
- <result column="core_id" property="core_id" jdbcType="VARCHAR" />
- <result column="name" property="name" jdbcType="VARCHAR" />
- <result column="score" property="score" jdbcType="INTEGER" />
- <result column="desc" property="desc" jdbcType="VARCHAR" />
- <result column="comment" property="comment" jdbcType="VARCHAR" />
- </resultMap>
- <!--获取所有数据-->
- <select id="getAll" resultType="com.ygj.yuemum.domain.college.CollegeTest" >
- select
- *
- from college_test
- order by id desc
- </select>
- <select id="selectByPrimaryKey" resultType="com.ygj.yuemum.domain.college.CollegeTest" parameterType="java.lang.Integer" >
- select
- *
- from college_test
- where id = #{id,jdbcType=INTEGER}
- </select>
- <select id="selectByCoreId" resultType="com.ygj.yuemum.domain.college.CollegeTest" parameterType="java.lang.Integer" >
- select
- *
- from college_test
- where core_id = #{core_id,jdbcType=INTEGER}
- order by seq asc
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from college_test
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <insert id="insertSelective" parameterType="com.ygj.yuemum.domain.college.CollegeTest" >
- insert into college_test
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="core_id != null" >
- core_id,
- </if>
- <if test="name != null" >
- `name`,
- </if>
- <if test="score != null" >
- score,
- </if>
- <if test="desc != null" >
- `desc`,
- </if>
- <if test="comment != null" >
- `comment`
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="core_id != null" >
- #{core_id,jdbcType=VARCHAR},
- </if>
- <if test="name != null" >
- #{name,jdbcType=VARCHAR},
- </if>
- <if test="score != null" >
- #{score,jdbcType=INTEGER},
- </if>
- <if test="desc != null" >
- #{desc,jdbcType=VARCHAR},
- </if>
- <if test="comment != null" >
- #{comment,jdbcType=VARCHAR}
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.ygj.yuemum.domain.college.CollegeTest" >
- update college_test
- <set >
- <if test="core_id != null" >
- core_id = #{core_id,jdbcType=VARCHAR},
- </if>
- <if test="name != null" >
- `name` = #{name,jdbcType=VARCHAR},
- </if>
- <if test="score != null" >
- score = #{score ,jdbcType=INTEGER},
- </if>
- <if test="desc != null" >
- `desc` = #{desc,jdbcType=VARCHAR},
- </if>
- <if test="comment != null" >
- `comment` = #{comment,jdbcType=VARCHAR}
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- </mapper>
|