预设视频相关内容
This commit is contained in:
268
src/main/resources/mappers/VideoDataDao.xml
Normal file
268
src/main/resources/mappers/VideoDataDao.xml
Normal file
@@ -0,0 +1,268 @@
|
||||
<?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.yutou.nas.mybatis.dao.VideoDataDao">
|
||||
<resultMap id="BaseResultMap" type="com.yutou.nas.mybatis.model.VideoData">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="vid" jdbcType="INTEGER" property="vid" />
|
||||
<result column="fileTitle" jdbcType="VARCHAR" property="filetitle" />
|
||||
<result column="path" jdbcType="VARCHAR" property="path" />
|
||||
<result column="videoTimer" jdbcType="VARCHAR" property="videotimer" />
|
||||
<result column="videoData" jdbcType="VARCHAR" property="videodata" />
|
||||
<result column="soundData" jdbcType="VARCHAR" property="sounddata" />
|
||||
<result column="isPlay" jdbcType="INTEGER" property="isplay" />
|
||||
<result column="lastPlayTime" jdbcType="VARCHAR" property="lastplaytime" />
|
||||
</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, vid, fileTitle, `path`, videoTimer, videoData, soundData, isPlay, lastPlayTime
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.yutou.nas.mybatis.model.VideoDataExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from video_data
|
||||
<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.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from video_data
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from video_data
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.yutou.nas.mybatis.model.VideoDataExample">
|
||||
delete from video_data
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yutou.nas.mybatis.model.VideoData" useGeneratedKeys="true">
|
||||
|
||||
insert into video_data (vid, fileTitle, `path`,
|
||||
videoTimer, videoData, soundData,
|
||||
isPlay, lastPlayTime)
|
||||
values (#{vid,jdbcType=INTEGER}, #{filetitle,jdbcType=VARCHAR}, #{path,jdbcType=VARCHAR},
|
||||
#{videotimer,jdbcType=VARCHAR}, #{videodata,jdbcType=VARCHAR}, #{sounddata,jdbcType=VARCHAR},
|
||||
#{isplay,jdbcType=INTEGER}, #{lastplaytime,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yutou.nas.mybatis.model.VideoData" useGeneratedKeys="true">
|
||||
insert into video_data
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="vid != null">
|
||||
vid,
|
||||
</if>
|
||||
<if test="filetitle != null">
|
||||
fileTitle,
|
||||
</if>
|
||||
<if test="path != null">
|
||||
`path`,
|
||||
</if>
|
||||
<if test="videotimer != null">
|
||||
videoTimer,
|
||||
</if>
|
||||
<if test="videodata != null">
|
||||
videoData,
|
||||
</if>
|
||||
<if test="sounddata != null">
|
||||
soundData,
|
||||
</if>
|
||||
<if test="isplay != null">
|
||||
isPlay,
|
||||
</if>
|
||||
<if test="lastplaytime != null">
|
||||
lastPlayTime,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="vid != null">
|
||||
#{vid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="filetitle != null">
|
||||
#{filetitle,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="path != null">
|
||||
#{path,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="videotimer != null">
|
||||
#{videotimer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="videodata != null">
|
||||
#{videodata,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sounddata != null">
|
||||
#{sounddata,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isplay != null">
|
||||
#{isplay,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="lastplaytime != null">
|
||||
#{lastplaytime,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.yutou.nas.mybatis.model.VideoDataExample" resultType="java.lang.Long">
|
||||
select count(*) from video_data
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update video_data
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.vid != null">
|
||||
vid = #{record.vid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.filetitle != null">
|
||||
fileTitle = #{record.filetitle,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.path != null">
|
||||
`path` = #{record.path,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.videotimer != null">
|
||||
videoTimer = #{record.videotimer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.videodata != null">
|
||||
videoData = #{record.videodata,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.sounddata != null">
|
||||
soundData = #{record.sounddata,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.isplay != null">
|
||||
isPlay = #{record.isplay,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.lastplaytime != null">
|
||||
lastPlayTime = #{record.lastplaytime,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update video_data
|
||||
set id = #{record.id,jdbcType=INTEGER},
|
||||
vid = #{record.vid,jdbcType=INTEGER},
|
||||
fileTitle = #{record.filetitle,jdbcType=VARCHAR},
|
||||
`path` = #{record.path,jdbcType=VARCHAR},
|
||||
videoTimer = #{record.videotimer,jdbcType=VARCHAR},
|
||||
videoData = #{record.videodata,jdbcType=VARCHAR},
|
||||
soundData = #{record.sounddata,jdbcType=VARCHAR},
|
||||
isPlay = #{record.isplay,jdbcType=INTEGER},
|
||||
lastPlayTime = #{record.lastplaytime,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.yutou.nas.mybatis.model.VideoData">
|
||||
update video_data
|
||||
<set>
|
||||
<if test="vid != null">
|
||||
vid = #{vid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="filetitle != null">
|
||||
fileTitle = #{filetitle,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="path != null">
|
||||
`path` = #{path,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="videotimer != null">
|
||||
videoTimer = #{videotimer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="videodata != null">
|
||||
videoData = #{videodata,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sounddata != null">
|
||||
soundData = #{sounddata,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isplay != null">
|
||||
isPlay = #{isplay,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="lastplaytime != null">
|
||||
lastPlayTime = #{lastplaytime,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.yutou.nas.mybatis.model.VideoData">
|
||||
update video_data
|
||||
set vid = #{vid,jdbcType=INTEGER},
|
||||
fileTitle = #{filetitle,jdbcType=VARCHAR},
|
||||
`path` = #{path,jdbcType=VARCHAR},
|
||||
videoTimer = #{videotimer,jdbcType=VARCHAR},
|
||||
videoData = #{videodata,jdbcType=VARCHAR},
|
||||
soundData = #{sounddata,jdbcType=VARCHAR},
|
||||
isPlay = #{isplay,jdbcType=INTEGER},
|
||||
lastPlayTime = #{lastplaytime,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
347
src/main/resources/mappers/VideoInfoDao.xml
Normal file
347
src/main/resources/mappers/VideoInfoDao.xml
Normal file
@@ -0,0 +1,347 @@
|
||||
<?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.yutou.nas.mybatis.dao.VideoInfoDao">
|
||||
<resultMap id="BaseResultMap" type="com.yutou.nas.mybatis.model.VideoInfo">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="title_cn" jdbcType="VARCHAR" property="titleCn" />
|
||||
<result column="title_jp" jdbcType="VARCHAR" property="titleJp" />
|
||||
<result column="air_data" jdbcType="VARCHAR" property="airData" />
|
||||
<result column="air_weekday" jdbcType="VARCHAR" property="airWeekday" />
|
||||
<result column="bangumi_url" jdbcType="VARCHAR" property="bangumiUrl" />
|
||||
<result column="bangumi_rating" jdbcType="FLOAT" property="bangumiRating" />
|
||||
<result column="eps_count" jdbcType="VARCHAR" property="epsCount" />
|
||||
<result column="eps_now" jdbcType="VARCHAR" property="epsNow" />
|
||||
<result column="crts" jdbcType="VARCHAR" property="crts" />
|
||||
<result column="staffs" jdbcType="VARCHAR" property="staffs" />
|
||||
<result column="image" jdbcType="VARCHAR" property="image" />
|
||||
<result column="info" jdbcType="VARCHAR" property="info" />
|
||||
<result column="path" jdbcType="VARCHAR" property="path" />
|
||||
</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_cn, title_jp, air_data, air_weekday, bangumi_url, bangumi_rating, eps_count,
|
||||
eps_now, crts, staffs, image, info, `path`
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.yutou.nas.mybatis.model.VideoInfoExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from video_info
|
||||
<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.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from video_info
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from video_info
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.yutou.nas.mybatis.model.VideoInfoExample">
|
||||
delete from video_info
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yutou.nas.mybatis.model.VideoInfo" useGeneratedKeys="true">
|
||||
insert into video_info (title_cn, title_jp, air_data,
|
||||
air_weekday, bangumi_url, bangumi_rating,
|
||||
eps_count, eps_now, crts,
|
||||
staffs, image, info,
|
||||
`path`)
|
||||
values (#{titleCn,jdbcType=VARCHAR}, #{titleJp,jdbcType=VARCHAR}, #{airData,jdbcType=VARCHAR},
|
||||
#{airWeekday,jdbcType=VARCHAR}, #{bangumiUrl,jdbcType=VARCHAR}, #{bangumiRating,jdbcType=FLOAT},
|
||||
#{epsCount,jdbcType=VARCHAR}, #{epsNow,jdbcType=VARCHAR}, #{crts,jdbcType=VARCHAR},
|
||||
#{staffs,jdbcType=VARCHAR}, #{image,jdbcType=VARCHAR}, #{info,jdbcType=VARCHAR},
|
||||
#{path,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yutou.nas.mybatis.model.VideoInfo" useGeneratedKeys="true">
|
||||
insert into video_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="titleCn != null">
|
||||
title_cn,
|
||||
</if>
|
||||
<if test="titleJp != null">
|
||||
title_jp,
|
||||
</if>
|
||||
<if test="airData != null">
|
||||
air_data,
|
||||
</if>
|
||||
<if test="airWeekday != null">
|
||||
air_weekday,
|
||||
</if>
|
||||
<if test="bangumiUrl != null">
|
||||
bangumi_url,
|
||||
</if>
|
||||
<if test="bangumiRating != null">
|
||||
bangumi_rating,
|
||||
</if>
|
||||
<if test="epsCount != null">
|
||||
eps_count,
|
||||
</if>
|
||||
<if test="epsNow != null">
|
||||
eps_now,
|
||||
</if>
|
||||
<if test="crts != null">
|
||||
crts,
|
||||
</if>
|
||||
<if test="staffs != null">
|
||||
staffs,
|
||||
</if>
|
||||
<if test="image != null">
|
||||
image,
|
||||
</if>
|
||||
<if test="info != null">
|
||||
info,
|
||||
</if>
|
||||
<if test="path != null">
|
||||
`path`,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="titleCn != null">
|
||||
#{titleCn,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="titleJp != null">
|
||||
#{titleJp,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="airData != null">
|
||||
#{airData,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="airWeekday != null">
|
||||
#{airWeekday,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bangumiUrl != null">
|
||||
#{bangumiUrl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bangumiRating != null">
|
||||
#{bangumiRating,jdbcType=FLOAT},
|
||||
</if>
|
||||
<if test="epsCount != null">
|
||||
#{epsCount,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="epsNow != null">
|
||||
#{epsNow,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="crts != null">
|
||||
#{crts,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="staffs != null">
|
||||
#{staffs,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="image != null">
|
||||
#{image,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="info != null">
|
||||
#{info,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="path != null">
|
||||
#{path,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.yutou.nas.mybatis.model.VideoInfoExample" resultType="java.lang.Long">
|
||||
select count(*) from video_info
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update video_info
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.titleCn != null">
|
||||
title_cn = #{record.titleCn,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.titleJp != null">
|
||||
title_jp = #{record.titleJp,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.airData != null">
|
||||
air_data = #{record.airData,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.airWeekday != null">
|
||||
air_weekday = #{record.airWeekday,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.bangumiUrl != null">
|
||||
bangumi_url = #{record.bangumiUrl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.bangumiRating != null">
|
||||
bangumi_rating = #{record.bangumiRating,jdbcType=FLOAT},
|
||||
</if>
|
||||
<if test="record.epsCount != null">
|
||||
eps_count = #{record.epsCount,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.epsNow != null">
|
||||
eps_now = #{record.epsNow,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.crts != null">
|
||||
crts = #{record.crts,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.staffs != null">
|
||||
staffs = #{record.staffs,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.image != null">
|
||||
image = #{record.image,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.info != null">
|
||||
info = #{record.info,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.path != null">
|
||||
`path` = #{record.path,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update video_info
|
||||
set id = #{record.id,jdbcType=INTEGER},
|
||||
title_cn = #{record.titleCn,jdbcType=VARCHAR},
|
||||
title_jp = #{record.titleJp,jdbcType=VARCHAR},
|
||||
air_data = #{record.airData,jdbcType=VARCHAR},
|
||||
air_weekday = #{record.airWeekday,jdbcType=VARCHAR},
|
||||
bangumi_url = #{record.bangumiUrl,jdbcType=VARCHAR},
|
||||
bangumi_rating = #{record.bangumiRating,jdbcType=FLOAT},
|
||||
eps_count = #{record.epsCount,jdbcType=VARCHAR},
|
||||
eps_now = #{record.epsNow,jdbcType=VARCHAR},
|
||||
crts = #{record.crts,jdbcType=VARCHAR},
|
||||
staffs = #{record.staffs,jdbcType=VARCHAR},
|
||||
image = #{record.image,jdbcType=VARCHAR},
|
||||
info = #{record.info,jdbcType=VARCHAR},
|
||||
`path` = #{record.path,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.yutou.nas.mybatis.model.VideoInfo">
|
||||
update video_info
|
||||
<set>
|
||||
<if test="titleCn != null">
|
||||
title_cn = #{titleCn,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="titleJp != null">
|
||||
title_jp = #{titleJp,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="airData != null">
|
||||
air_data = #{airData,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="airWeekday != null">
|
||||
air_weekday = #{airWeekday,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bangumiUrl != null">
|
||||
bangumi_url = #{bangumiUrl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bangumiRating != null">
|
||||
bangumi_rating = #{bangumiRating,jdbcType=FLOAT},
|
||||
</if>
|
||||
<if test="epsCount != null">
|
||||
eps_count = #{epsCount,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="epsNow != null">
|
||||
eps_now = #{epsNow,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="crts != null">
|
||||
crts = #{crts,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="staffs != null">
|
||||
staffs = #{staffs,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="image != null">
|
||||
image = #{image,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="info != null">
|
||||
info = #{info,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="path != null">
|
||||
`path` = #{path,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.yutou.nas.mybatis.model.VideoInfo">
|
||||
update video_info
|
||||
set title_cn = #{titleCn,jdbcType=VARCHAR},
|
||||
title_jp = #{titleJp,jdbcType=VARCHAR},
|
||||
air_data = #{airData,jdbcType=VARCHAR},
|
||||
air_weekday = #{airWeekday,jdbcType=VARCHAR},
|
||||
bangumi_url = #{bangumiUrl,jdbcType=VARCHAR},
|
||||
bangumi_rating = #{bangumiRating,jdbcType=FLOAT},
|
||||
eps_count = #{epsCount,jdbcType=VARCHAR},
|
||||
eps_now = #{epsNow,jdbcType=VARCHAR},
|
||||
crts = #{crts,jdbcType=VARCHAR},
|
||||
staffs = #{staffs,jdbcType=VARCHAR},
|
||||
image = #{image,jdbcType=VARCHAR},
|
||||
info = #{info,jdbcType=VARCHAR},
|
||||
`path` = #{path,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
190
src/main/resources/mappers/VideoSubtitlesDao.xml
Normal file
190
src/main/resources/mappers/VideoSubtitlesDao.xml
Normal file
@@ -0,0 +1,190 @@
|
||||
<?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.yutou.nas.mybatis.dao.VideoSubtitlesDao">
|
||||
<resultMap id="BaseResultMap" type="com.yutou.nas.mybatis.model.VideoSubtitles">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="vid" jdbcType="INTEGER" property="vid" />
|
||||
<result column="subTitle" jdbcType="VARCHAR" property="subtitle" />
|
||||
<result column="path" jdbcType="VARCHAR" property="path" />
|
||||
</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, vid, subTitle, `path`
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.yutou.nas.mybatis.model.VideoSubtitlesExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from video_subtitles
|
||||
<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.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from video_subtitles
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from video_subtitles
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.yutou.nas.mybatis.model.VideoSubtitlesExample">
|
||||
delete from video_subtitles
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yutou.nas.mybatis.model.VideoSubtitles" useGeneratedKeys="true">
|
||||
insert into video_subtitles (vid, subTitle, `path`
|
||||
)
|
||||
values (#{vid,jdbcType=INTEGER}, #{subtitle,jdbcType=VARCHAR}, #{path,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yutou.nas.mybatis.model.VideoSubtitles" useGeneratedKeys="true">
|
||||
insert into video_subtitles
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="vid != null">
|
||||
vid,
|
||||
</if>
|
||||
<if test="subtitle != null">
|
||||
subTitle,
|
||||
</if>
|
||||
<if test="path != null">
|
||||
`path`,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="vid != null">
|
||||
#{vid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="subtitle != null">
|
||||
#{subtitle,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="path != null">
|
||||
#{path,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.yutou.nas.mybatis.model.VideoSubtitlesExample" resultType="java.lang.Long">
|
||||
select count(*) from video_subtitles
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update video_subtitles
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.vid != null">
|
||||
vid = #{record.vid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.subtitle != null">
|
||||
subTitle = #{record.subtitle,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.path != null">
|
||||
`path` = #{record.path,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update video_subtitles
|
||||
set id = #{record.id,jdbcType=INTEGER},
|
||||
vid = #{record.vid,jdbcType=INTEGER},
|
||||
subTitle = #{record.subtitle,jdbcType=VARCHAR},
|
||||
`path` = #{record.path,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.yutou.nas.mybatis.model.VideoSubtitles">
|
||||
update video_subtitles
|
||||
<set>
|
||||
<if test="vid != null">
|
||||
vid = #{vid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="subtitle != null">
|
||||
subTitle = #{subtitle,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="path != null">
|
||||
`path` = #{path,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.yutou.nas.mybatis.model.VideoSubtitles">
|
||||
update video_subtitles
|
||||
set vid = #{vid,jdbcType=INTEGER},
|
||||
subTitle = #{subtitle,jdbcType=VARCHAR},
|
||||
`path` = #{path,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user