<?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.tanpu.feo.feojob.dao.user.mapper.CurriculumResMapper"> <resultMap id="BaseResultMap" type="com.tanpu.feo.feojob.dao.user.entity.CurriculumRes"> <id column="id" jdbcType="VARCHAR" property="id" /> <result column="title" jdbcType="VARCHAR" property="title" /> <result column="audio" jdbcType="VARCHAR" property="audio" /> <result column="audio_type" jdbcType="INTEGER" property="audioType" /> <result column="teacher_id" jdbcType="VARCHAR" property="teacherId" /> <result column="teacher_name" jdbcType="VARCHAR" property="teacherName" /> <result column="duration" jdbcType="INTEGER" property="duration" /> <result column="file_size" jdbcType="INTEGER" property="fileSize" /> <result column="org_id" jdbcType="VARCHAR" property="orgId" /> <result column="room_pwd" jdbcType="VARCHAR" property="roomPwd" /> <result column="white_list" jdbcType="INTEGER" property="whiteList" /> <result column="create_by" jdbcType="VARCHAR" property="createBy" /> <result column="read_num" jdbcType="INTEGER" property="readNum" /> <result column="read_base_num" jdbcType="INTEGER" property="readBaseNum" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="update_by" jdbcType="VARCHAR" property="updateBy" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="delete_tag" jdbcType="INTEGER" property="deleteTag" /> <result column="status" jdbcType="INTEGER" property="status" /> <result column="sort" jdbcType="INTEGER" property="sort" /> <result column="info" jdbcType="VARCHAR" property="info" /> <result column="cover" jdbcType="VARCHAR" property="cover" /> <result column="source" jdbcType="INTEGER" property="source" /> <result column="isTop" jdbcType="INTEGER" property="istop" /> </resultMap> <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.tanpu.feo.feojob.dao.user.entity.CurriculumRes"> <result column="content" jdbcType="LONGVARCHAR" property="content" /> </resultMap> <sql id="Example_Where_Clause"> <where> <foreach collection="oredCriteria" item="criteria" separator="or"> <if test="criteria.valid"> <trim prefix="(" prefixOverrides="and" suffix=")"> <foreach collection="criteria.criteria" item="criterion"> <choose> <when test="criterion.noValue"> and ${criterion.condition} </when> <when test="criterion.singleValue"> and ${criterion.condition} #{criterion.value} </when> <when test="criterion.betweenValue"> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when> <when test="criterion.listValue"> and ${criterion.condition} <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Update_By_Example_Where_Clause"> <where> <foreach collection="example.oredCriteria" item="criteria" separator="or"> <if test="criteria.valid"> <trim prefix="(" prefixOverrides="and" suffix=")"> <foreach collection="criteria.criteria" item="criterion"> <choose> <when test="criterion.noValue"> and ${criterion.condition} </when> <when test="criterion.singleValue"> and ${criterion.condition} #{criterion.value} </when> <when test="criterion.betweenValue"> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when> <when test="criterion.listValue"> and ${criterion.condition} <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Base_Column_List"> id, title, audio, audio_type, teacher_id, teacher_name, duration, file_size, org_id, room_pwd, white_list, create_by, read_num, read_base_num, create_time, update_by, update_time, delete_tag, status, sort, info, cover, source, isTop </sql> <sql id="Blob_Column_List"> content </sql> <select id="selectByExampleWithBLOBs" parameterType="com.tanpu.feo.feojob.dao.user.entity.CurriculumResExample" resultMap="ResultMapWithBLOBs"> select <if test="distinct"> distinct </if> <include refid="Base_Column_List" /> , <include refid="Blob_Column_List" /> from curriculum_res <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> <if test="orderByClause != null"> order by ${orderByClause} </if> </select> <select id="selectByExample" parameterType="com.tanpu.feo.feojob.dao.user.entity.CurriculumResExample" resultMap="BaseResultMap"> select <if test="distinct"> distinct </if> <include refid="Base_Column_List" /> from curriculum_res <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> <if test="orderByClause != null"> order by ${orderByClause} </if> </select> <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs"> select <include refid="Base_Column_List" /> , <include refid="Blob_Column_List" /> from curriculum_res where id = #{id,jdbcType=VARCHAR} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> delete from curriculum_res where id = #{id,jdbcType=VARCHAR} </delete> <delete id="deleteByExample" parameterType="com.tanpu.feo.feojob.dao.user.entity.CurriculumResExample"> delete from curriculum_res <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> </delete> <insert id="insert" parameterType="com.tanpu.feo.feojob.dao.user.entity.CurriculumRes"> insert into curriculum_res (id, title, audio, audio_type, teacher_id, teacher_name, duration, file_size, org_id, room_pwd, white_list, create_by, read_num, read_base_num, create_time, update_by, update_time, delete_tag, status, sort, info, cover, source, isTop, content) values (#{id,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{audio,jdbcType=VARCHAR}, #{audioType,jdbcType=INTEGER}, #{teacherId,jdbcType=VARCHAR}, #{teacherName,jdbcType=VARCHAR}, #{duration,jdbcType=INTEGER}, #{fileSize,jdbcType=INTEGER}, #{orgId,jdbcType=VARCHAR}, #{roomPwd,jdbcType=VARCHAR}, #{whiteList,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR}, #{readNum,jdbcType=INTEGER}, #{readBaseNum,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{deleteTag,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}, #{info,jdbcType=VARCHAR}, #{cover,jdbcType=VARCHAR}, #{source,jdbcType=INTEGER}, #{istop,jdbcType=INTEGER}, #{content,jdbcType=LONGVARCHAR}) </insert> <insert id="insertSelective" parameterType="com.tanpu.feo.feojob.dao.user.entity.CurriculumRes"> insert into curriculum_res <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null"> id, </if> <if test="title != null"> title, </if> <if test="audio != null"> audio, </if> <if test="audioType != null"> audio_type, </if> <if test="teacherId != null"> teacher_id, </if> <if test="teacherName != null"> teacher_name, </if> <if test="duration != null"> duration, </if> <if test="fileSize != null"> file_size, </if> <if test="orgId != null"> org_id, </if> <if test="roomPwd != null"> room_pwd, </if> <if test="whiteList != null"> white_list, </if> <if test="createBy != null"> create_by, </if> <if test="readNum != null"> read_num, </if> <if test="readBaseNum != null"> read_base_num, </if> <if test="createTime != null"> create_time, </if> <if test="updateBy != null"> update_by, </if> <if test="updateTime != null"> update_time, </if> <if test="deleteTag != null"> delete_tag, </if> <if test="status != null"> status, </if> <if test="sort != null"> sort, </if> <if test="info != null"> info, </if> <if test="cover != null"> cover, </if> <if test="source != null"> source, </if> <if test="istop != null"> isTop, </if> <if test="content != null"> content, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null"> #{id,jdbcType=VARCHAR}, </if> <if test="title != null"> #{title,jdbcType=VARCHAR}, </if> <if test="audio != null"> #{audio,jdbcType=VARCHAR}, </if> <if test="audioType != null"> #{audioType,jdbcType=INTEGER}, </if> <if test="teacherId != null"> #{teacherId,jdbcType=VARCHAR}, </if> <if test="teacherName != null"> #{teacherName,jdbcType=VARCHAR}, </if> <if test="duration != null"> #{duration,jdbcType=INTEGER}, </if> <if test="fileSize != null"> #{fileSize,jdbcType=INTEGER}, </if> <if test="orgId != null"> #{orgId,jdbcType=VARCHAR}, </if> <if test="roomPwd != null"> #{roomPwd,jdbcType=VARCHAR}, </if> <if test="whiteList != null"> #{whiteList,jdbcType=INTEGER}, </if> <if test="createBy != null"> #{createBy,jdbcType=VARCHAR}, </if> <if test="readNum != null"> #{readNum,jdbcType=INTEGER}, </if> <if test="readBaseNum != null"> #{readBaseNum,jdbcType=INTEGER}, </if> <if test="createTime != null"> #{createTime,jdbcType=TIMESTAMP}, </if> <if test="updateBy != null"> #{updateBy,jdbcType=VARCHAR}, </if> <if test="updateTime != null"> #{updateTime,jdbcType=TIMESTAMP}, </if> <if test="deleteTag != null"> #{deleteTag,jdbcType=INTEGER}, </if> <if test="status != null"> #{status,jdbcType=INTEGER}, </if> <if test="sort != null"> #{sort,jdbcType=INTEGER}, </if> <if test="info != null"> #{info,jdbcType=VARCHAR}, </if> <if test="cover != null"> #{cover,jdbcType=VARCHAR}, </if> <if test="source != null"> #{source,jdbcType=INTEGER}, </if> <if test="istop != null"> #{istop,jdbcType=INTEGER}, </if> <if test="content != null"> #{content,jdbcType=LONGVARCHAR}, </if> </trim> </insert> <select id="countByExample" parameterType="com.tanpu.feo.feojob.dao.user.entity.CurriculumResExample" resultType="java.lang.Long"> select count(*) from curriculum_res <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> </select> <update id="updateByExampleSelective" parameterType="map"> update curriculum_res <set> <if test="record.id != null"> id = #{record.id,jdbcType=VARCHAR}, </if> <if test="record.title != null"> title = #{record.title,jdbcType=VARCHAR}, </if> <if test="record.audio != null"> audio = #{record.audio,jdbcType=VARCHAR}, </if> <if test="record.audioType != null"> audio_type = #{record.audioType,jdbcType=INTEGER}, </if> <if test="record.teacherId != null"> teacher_id = #{record.teacherId,jdbcType=VARCHAR}, </if> <if test="record.teacherName != null"> teacher_name = #{record.teacherName,jdbcType=VARCHAR}, </if> <if test="record.duration != null"> duration = #{record.duration,jdbcType=INTEGER}, </if> <if test="record.fileSize != null"> file_size = #{record.fileSize,jdbcType=INTEGER}, </if> <if test="record.orgId != null"> org_id = #{record.orgId,jdbcType=VARCHAR}, </if> <if test="record.roomPwd != null"> room_pwd = #{record.roomPwd,jdbcType=VARCHAR}, </if> <if test="record.whiteList != null"> white_list = #{record.whiteList,jdbcType=INTEGER}, </if> <if test="record.createBy != null"> create_by = #{record.createBy,jdbcType=VARCHAR}, </if> <if test="record.readNum != null"> read_num = #{record.readNum,jdbcType=INTEGER}, </if> <if test="record.readBaseNum != null"> read_base_num = #{record.readBaseNum,jdbcType=INTEGER}, </if> <if test="record.createTime != null"> create_time = #{record.createTime,jdbcType=TIMESTAMP}, </if> <if test="record.updateBy != null"> update_by = #{record.updateBy,jdbcType=VARCHAR}, </if> <if test="record.updateTime != null"> update_time = #{record.updateTime,jdbcType=TIMESTAMP}, </if> <if test="record.deleteTag != null"> delete_tag = #{record.deleteTag,jdbcType=INTEGER}, </if> <if test="record.status != null"> status = #{record.status,jdbcType=INTEGER}, </if> <if test="record.sort != null"> sort = #{record.sort,jdbcType=INTEGER}, </if> <if test="record.info != null"> info = #{record.info,jdbcType=VARCHAR}, </if> <if test="record.cover != null"> cover = #{record.cover,jdbcType=VARCHAR}, </if> <if test="record.source != null"> source = #{record.source,jdbcType=INTEGER}, </if> <if test="record.istop != null"> isTop = #{record.istop,jdbcType=INTEGER}, </if> <if test="record.content != null"> content = #{record.content,jdbcType=LONGVARCHAR}, </if> </set> <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByExampleWithBLOBs" parameterType="map"> update curriculum_res set id = #{record.id,jdbcType=VARCHAR}, title = #{record.title,jdbcType=VARCHAR}, audio = #{record.audio,jdbcType=VARCHAR}, audio_type = #{record.audioType,jdbcType=INTEGER}, teacher_id = #{record.teacherId,jdbcType=VARCHAR}, teacher_name = #{record.teacherName,jdbcType=VARCHAR}, duration = #{record.duration,jdbcType=INTEGER}, file_size = #{record.fileSize,jdbcType=INTEGER}, org_id = #{record.orgId,jdbcType=VARCHAR}, room_pwd = #{record.roomPwd,jdbcType=VARCHAR}, white_list = #{record.whiteList,jdbcType=INTEGER}, create_by = #{record.createBy,jdbcType=VARCHAR}, read_num = #{record.readNum,jdbcType=INTEGER}, read_base_num = #{record.readBaseNum,jdbcType=INTEGER}, create_time = #{record.createTime,jdbcType=TIMESTAMP}, update_by = #{record.updateBy,jdbcType=VARCHAR}, update_time = #{record.updateTime,jdbcType=TIMESTAMP}, delete_tag = #{record.deleteTag,jdbcType=INTEGER}, status = #{record.status,jdbcType=INTEGER}, sort = #{record.sort,jdbcType=INTEGER}, info = #{record.info,jdbcType=VARCHAR}, cover = #{record.cover,jdbcType=VARCHAR}, source = #{record.source,jdbcType=INTEGER}, isTop = #{record.istop,jdbcType=INTEGER}, content = #{record.content,jdbcType=LONGVARCHAR} <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByExample" parameterType="map"> update curriculum_res set id = #{record.id,jdbcType=VARCHAR}, title = #{record.title,jdbcType=VARCHAR}, audio = #{record.audio,jdbcType=VARCHAR}, audio_type = #{record.audioType,jdbcType=INTEGER}, teacher_id = #{record.teacherId,jdbcType=VARCHAR}, teacher_name = #{record.teacherName,jdbcType=VARCHAR}, duration = #{record.duration,jdbcType=INTEGER}, file_size = #{record.fileSize,jdbcType=INTEGER}, org_id = #{record.orgId,jdbcType=VARCHAR}, room_pwd = #{record.roomPwd,jdbcType=VARCHAR}, white_list = #{record.whiteList,jdbcType=INTEGER}, create_by = #{record.createBy,jdbcType=VARCHAR}, read_num = #{record.readNum,jdbcType=INTEGER}, read_base_num = #{record.readBaseNum,jdbcType=INTEGER}, create_time = #{record.createTime,jdbcType=TIMESTAMP}, update_by = #{record.updateBy,jdbcType=VARCHAR}, update_time = #{record.updateTime,jdbcType=TIMESTAMP}, delete_tag = #{record.deleteTag,jdbcType=INTEGER}, status = #{record.status,jdbcType=INTEGER}, sort = #{record.sort,jdbcType=INTEGER}, info = #{record.info,jdbcType=VARCHAR}, cover = #{record.cover,jdbcType=VARCHAR}, source = #{record.source,jdbcType=INTEGER}, isTop = #{record.istop,jdbcType=INTEGER} <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByPrimaryKeySelective" parameterType="com.tanpu.feo.feojob.dao.user.entity.CurriculumRes"> update curriculum_res <set> <if test="title != null"> title = #{title,jdbcType=VARCHAR}, </if> <if test="audio != null"> audio = #{audio,jdbcType=VARCHAR}, </if> <if test="audioType != null"> audio_type = #{audioType,jdbcType=INTEGER}, </if> <if test="teacherId != null"> teacher_id = #{teacherId,jdbcType=VARCHAR}, </if> <if test="teacherName != null"> teacher_name = #{teacherName,jdbcType=VARCHAR}, </if> <if test="duration != null"> duration = #{duration,jdbcType=INTEGER}, </if> <if test="fileSize != null"> file_size = #{fileSize,jdbcType=INTEGER}, </if> <if test="orgId != null"> org_id = #{orgId,jdbcType=VARCHAR}, </if> <if test="roomPwd != null"> room_pwd = #{roomPwd,jdbcType=VARCHAR}, </if> <if test="whiteList != null"> white_list = #{whiteList,jdbcType=INTEGER}, </if> <if test="createBy != null"> create_by = #{createBy,jdbcType=VARCHAR}, </if> <if test="readNum != null"> read_num = #{readNum,jdbcType=INTEGER}, </if> <if test="readBaseNum != null"> read_base_num = #{readBaseNum,jdbcType=INTEGER}, </if> <if test="createTime != null"> create_time = #{createTime,jdbcType=TIMESTAMP}, </if> <if test="updateBy != null"> update_by = #{updateBy,jdbcType=VARCHAR}, </if> <if test="updateTime != null"> update_time = #{updateTime,jdbcType=TIMESTAMP}, </if> <if test="deleteTag != null"> delete_tag = #{deleteTag,jdbcType=INTEGER}, </if> <if test="status != null"> status = #{status,jdbcType=INTEGER}, </if> <if test="sort != null"> sort = #{sort,jdbcType=INTEGER}, </if> <if test="info != null"> info = #{info,jdbcType=VARCHAR}, </if> <if test="cover != null"> cover = #{cover,jdbcType=VARCHAR}, </if> <if test="source != null"> source = #{source,jdbcType=INTEGER}, </if> <if test="istop != null"> isTop = #{istop,jdbcType=INTEGER}, </if> <if test="content != null"> content = #{content,jdbcType=LONGVARCHAR}, </if> </set> where id = #{id,jdbcType=VARCHAR} </update> <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.tanpu.feo.feojob.dao.user.entity.CurriculumRes"> update curriculum_res set title = #{title,jdbcType=VARCHAR}, audio = #{audio,jdbcType=VARCHAR}, audio_type = #{audioType,jdbcType=INTEGER}, teacher_id = #{teacherId,jdbcType=VARCHAR}, teacher_name = #{teacherName,jdbcType=VARCHAR}, duration = #{duration,jdbcType=INTEGER}, file_size = #{fileSize,jdbcType=INTEGER}, org_id = #{orgId,jdbcType=VARCHAR}, room_pwd = #{roomPwd,jdbcType=VARCHAR}, white_list = #{whiteList,jdbcType=INTEGER}, create_by = #{createBy,jdbcType=VARCHAR}, read_num = #{readNum,jdbcType=INTEGER}, read_base_num = #{readBaseNum,jdbcType=INTEGER}, create_time = #{createTime,jdbcType=TIMESTAMP}, update_by = #{updateBy,jdbcType=VARCHAR}, update_time = #{updateTime,jdbcType=TIMESTAMP}, delete_tag = #{deleteTag,jdbcType=INTEGER}, status = #{status,jdbcType=INTEGER}, sort = #{sort,jdbcType=INTEGER}, info = #{info,jdbcType=VARCHAR}, cover = #{cover,jdbcType=VARCHAR}, source = #{source,jdbcType=INTEGER}, isTop = #{istop,jdbcType=INTEGER}, content = #{content,jdbcType=LONGVARCHAR} where id = #{id,jdbcType=VARCHAR} </update> <update id="updateByPrimaryKey" parameterType="com.tanpu.feo.feojob.dao.user.entity.CurriculumRes"> update curriculum_res set title = #{title,jdbcType=VARCHAR}, audio = #{audio,jdbcType=VARCHAR}, audio_type = #{audioType,jdbcType=INTEGER}, teacher_id = #{teacherId,jdbcType=VARCHAR}, teacher_name = #{teacherName,jdbcType=VARCHAR}, duration = #{duration,jdbcType=INTEGER}, file_size = #{fileSize,jdbcType=INTEGER}, org_id = #{orgId,jdbcType=VARCHAR}, room_pwd = #{roomPwd,jdbcType=VARCHAR}, white_list = #{whiteList,jdbcType=INTEGER}, create_by = #{createBy,jdbcType=VARCHAR}, read_num = #{readNum,jdbcType=INTEGER}, read_base_num = #{readBaseNum,jdbcType=INTEGER}, create_time = #{createTime,jdbcType=TIMESTAMP}, update_by = #{updateBy,jdbcType=VARCHAR}, update_time = #{updateTime,jdbcType=TIMESTAMP}, delete_tag = #{deleteTag,jdbcType=INTEGER}, status = #{status,jdbcType=INTEGER}, sort = #{sort,jdbcType=INTEGER}, info = #{info,jdbcType=VARCHAR}, cover = #{cover,jdbcType=VARCHAR}, source = #{source,jdbcType=INTEGER}, isTop = #{istop,jdbcType=INTEGER} where id = #{id,jdbcType=VARCHAR} </update> </mapper>