|
@@ -0,0 +1,251 @@
|
|
|
+<?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.CollegeCurriculumCoreDao" >
|
|
|
+
|
|
|
+ <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.college.CollegeCurriculumCore" >
|
|
|
+ <id column="id" property="id" jdbcType="INTEGER" />
|
|
|
+ <result column="c_code" property="c_code" jdbcType="INTEGER" />
|
|
|
+ <result column="c_name" property="c_name" jdbcType="VARCHAR" />
|
|
|
+ <result column="c_type" property="c_type" jdbcType="VARCHAR" />
|
|
|
+ <result column="c_step" property="c_step" jdbcType="INTEGER" />
|
|
|
+ <result column="isvideo" property="isvideo" jdbcType="INTEGER" />
|
|
|
+ <result column="video_href" property="video_href" jdbcType="VARCHAR" />
|
|
|
+ <result column="istest" property="istest" jdbcType="INTEGER" />
|
|
|
+ <result column="testid" property="testid" jdbcType="INTEGER" />
|
|
|
+ <result column="credit" property="credit" jdbcType="INTEGER" />
|
|
|
+ <result column="video_length" property="video_length" jdbcType="INTEGER" />
|
|
|
+ <result column="img_head_href" property="img_head_href" jdbcType="VARCHAR" />
|
|
|
+ <result column="c_desc" property="c_desc" jdbcType="VARCHAR" />
|
|
|
+ <result column="c_content" property="c_content" jdbcType="VARCHAR" />
|
|
|
+ <result column="t_image_href" property="t_image_href" jdbcType="VARCHAR" />
|
|
|
+ <result column="t_name" property="t_name" jdbcType="VARCHAR" />
|
|
|
+ <result column="t_desc" property="t_desc" jdbcType="VARCHAR" />
|
|
|
+ <result column="pcount" property="pcount" jdbcType="INTEGER" />
|
|
|
+ <result column="positive" property="positive" jdbcType="INTEGER" />
|
|
|
+ <result column="negative" property="negative" jdbcType="INTEGER" />
|
|
|
+ </resultMap>
|
|
|
+ <!--获取所有数据-->
|
|
|
+
|
|
|
+ <select id="getAll" resultType="com.ygj.yuemum.domain.college.CollegeCurriculumCore" >
|
|
|
+ select
|
|
|
+ *
|
|
|
+ from college_curriculum_core
|
|
|
+ order by id desc
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+ <select id="queryCoreByStep" resultType="com.ygj.yuemum.domain.college.CollegeCurriculumCore" parameterType="com.ygj.yuemum.domain.college.CollegeCurriculumCore">
|
|
|
+ select
|
|
|
+ *
|
|
|
+ from college_curriculum_core
|
|
|
+ where
|
|
|
+ FIND_IN_SET(#{c_step,jdbcType=VARCHAR},c_step) >0
|
|
|
+ and
|
|
|
+ c_type = #{c_type,jdbcType=VARCHAR}
|
|
|
+ order by id desc
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+ <select id="selectByPrimaryKey" resultType="com.ygj.yuemum.domain.college.CollegeCurriculumCore" parameterType="java.lang.Integer" >
|
|
|
+ select
|
|
|
+ *
|
|
|
+ from college_curriculum_core
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
|
|
+ delete from college_curriculum_core
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <insert id="insertSelective" parameterType="com.ygj.yuemum.domain.college.CollegeCurriculumCore" >
|
|
|
+ insert into college_curriculum_core
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
+ <if test="c_code != null" >
|
|
|
+ c_code,
|
|
|
+ </if>
|
|
|
+ <if test="c_name != null" >
|
|
|
+ c_name,
|
|
|
+ </if>
|
|
|
+ <if test="c_type != null" >
|
|
|
+ c_type,
|
|
|
+ </if>
|
|
|
+ <if test="c_step != null" >
|
|
|
+ c_step,
|
|
|
+ </if>
|
|
|
+ <if test="isvideo != null" >
|
|
|
+ isvideo,
|
|
|
+ </if>
|
|
|
+ <if test="video_href != null" >
|
|
|
+ video_href,
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="istest != null" >
|
|
|
+ istest,
|
|
|
+ </if>
|
|
|
+ <if test="testid != null" >
|
|
|
+ testid,
|
|
|
+ </if>
|
|
|
+ <if test="credit != null" >
|
|
|
+ credit,
|
|
|
+ </if>
|
|
|
+ <if test="video_length != null" >
|
|
|
+ video_length,
|
|
|
+ </if>
|
|
|
+ <if test="img_head_href != null" >
|
|
|
+ img_head_href,
|
|
|
+ </if>
|
|
|
+ <if test="c_desc != null" >
|
|
|
+ c_desc,
|
|
|
+ </if>
|
|
|
+ <if test="c_content != null" >
|
|
|
+ c_content,
|
|
|
+ </if>
|
|
|
+ <if test="t_image_href != null" >
|
|
|
+ t_image_href,
|
|
|
+ </if>
|
|
|
+ <if test="t_name != null" >
|
|
|
+ t_name,
|
|
|
+ </if>
|
|
|
+ <if test="video_href != null" >
|
|
|
+ video_href,
|
|
|
+ </if>
|
|
|
+ <if test="t_desc != null" >
|
|
|
+ t_desc,
|
|
|
+ </if>
|
|
|
+ <if test="pcount != null" >
|
|
|
+ pcount,
|
|
|
+ </if>
|
|
|
+ <if test="positive != null" >
|
|
|
+ positive,
|
|
|
+ </if>
|
|
|
+ <if test="negative != null" >
|
|
|
+ negative
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
+ <if test="c_code != null" >
|
|
|
+ #{c_code,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="c_name != null" >
|
|
|
+ #{c_name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="c_type != null" >
|
|
|
+ #{c_type,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="c_step != null" >
|
|
|
+ #{c_step,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="isvideo != null" >
|
|
|
+ #{isvideo,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="video_href != null" >
|
|
|
+ #{video_href,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="istest != null" >
|
|
|
+ #{istest,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="testid != null" >
|
|
|
+ #{testid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="credit != null" >
|
|
|
+ #{credit,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="video_length != null" >
|
|
|
+ #{video_length,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="img_head_href != null" >
|
|
|
+ #{img_head_href,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="c_desc != null" >
|
|
|
+ #{c_desc,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="c_content != null" >
|
|
|
+ #{c_content,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="t_image_href != null" >
|
|
|
+ #{t_image_href,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="t_name != null" >
|
|
|
+ #{t_name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="t_desc != null" >
|
|
|
+ #{t_desc,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="pcount != null" >
|
|
|
+ #{pcount,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="positive != null" >
|
|
|
+ #{positive,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="negative != null" >
|
|
|
+ #{negative,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.ygj.yuemum.domain.college.CollegeCurriculumCore" >
|
|
|
+ update college_curriculum_core
|
|
|
+ <set >
|
|
|
+ <if test="c_code != null" >
|
|
|
+ c_code = #{c_code,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="c_name != null" >
|
|
|
+ c_name = #{c_name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="c_type != null" >
|
|
|
+ c_type = #{c_type,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="c_step != null" >
|
|
|
+ c_step = #{c_step,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="isvideo != null" >
|
|
|
+ isvideo = #{isvideo,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="video_href != null" >
|
|
|
+ video_href = #{video_href,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="istest != null" >
|
|
|
+ istest = #{istest,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="testid != null" >
|
|
|
+ testid = #{testid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="credit != null" >
|
|
|
+ credit = #{credit,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="video_length != null" >
|
|
|
+ video_length = #{video_length,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="img_head_href != null" >
|
|
|
+ img_head_href = #{img_head_href,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="c_desc != null" >
|
|
|
+ c_desc = #{c_desc,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="c_content != null" >
|
|
|
+ c_content = #{c_content,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="t_image_href != null" >
|
|
|
+ t_image_href = #{t_image_href,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="t_name != null" >
|
|
|
+ t_name = #{t_name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="t_desc != null" >
|
|
|
+ t_desc = #{t_desc,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="pcount != null" >
|
|
|
+ pcount = #{pcount,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="positive != null" >
|
|
|
+ positive = #{positive,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="negative != null" >
|
|
|
+ negative = #{negative,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+
|
|
|
+</mapper>
|