ShyVideosMapper.xml
3.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?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.cnlive.shenhe.mapper.ShyVideosMapper">
<resultMap id="BaseResultMap" type="com.cnlive.shenhe.entity.ShyVideos">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="video_title" jdbcType="VARCHAR" property="video_title"/>
<result column="spid" jdbcType="INTEGER" property="spid"/>
<result column="video_url" jdbcType="VARCHAR" property="video_url"/>
<result column="video_poster" jdbcType="VARCHAR" property="video_poster"/>
<result column="video_imgs" jdbcType="VARCHAR" property="video_imgs"/>
<result column="video_tags" jdbcType="VARCHAR" property="video_tags"/>
<result column="updater" jdbcType="VARCHAR" property="updater"/>
<result column="auditor_id" jdbcType="VARCHAR" property="auditor_id"/>
<result column="callback" jdbcType="VARCHAR" property="callback"/>
<result column="video_priority" jdbcType="VARCHAR" property="video_priority"/>
<result column="attr_tags" jdbcType="VARCHAR" property="attr_tags"/>
<result column="msg" jdbcType="VARCHAR" property="msg"/>
<result column="shenhe_type" jdbcType="INTEGER" property="shenhe_type"/>
<result column="state" jdbcType="INTEGER" property="state"/>
<result column="video_upload_time" jdbcType="TIMESTAMP" property="video_upload_time"/>
<result column="video_keyword" jdbcType="VARCHAR" property="video_keyword"/>
<result column="video_desc" jdbcType="VARCHAR" property="video_desc"/>
<result column="video_id" jdbcType="VARCHAR" property="video_id"/>
<result column="created_at" jdbcType="TIMESTAMP" property="created_at"/>
<result column="updated_at" jdbcType="TIMESTAMP" property="updated_at"/>
<result column="receive" jdbcType="INTEGER" property="receive"/>
<result column="receive_user_id" jdbcType="VARCHAR" property="receive_user_id"/>
<result column="avsample" jdbcType="INTEGER" property="avsample"/>
<result column="task_id" jdbcType="VARCHAR" property="task_id"/>
<result column="bucket" jdbcType="VARCHAR" property="bucket"/>
<result column="plat" jdbcType="INTEGER" property="plat"/>
<result column="duration" jdbcType="INTEGER" property="duration"/>
<result column="category" jdbcType="VARCHAR" property="category"/>
<result column="video_user_id" jdbcType="VARCHAR" property="video_user_id"/>
<result column="source" jdbcType="VARCHAR" property="source"/>
<result column="video_md5" jdbcType="VARCHAR" property="video_md5"/>
<result column="avsample_imgs" jdbcType="LONGVARCHAR" property="avsample_imgs"/>
<result column="avsample_msg" jdbcType="LONGVARCHAR" property="avsample_msg"/>
</resultMap>
<select id="selectBySpId" resultType="com.cnlive.shenhe.entity.ShyVideos">
select *
from shy_videos
<where>
<if test="id != null">
and id = #{id}
</if>
<if test="spId != null and spId != 0">
and spid = #{spId}
</if>
</where>
</select>
<select id="findMSVideo" resultType="com.cnlive.shenhe.entity.ShyVideos">
select * from shy_videos where shenhe_type=1 AND state =0
</select>
<select id="findJSVideo" resultType="com.cnlive.shenhe.entity.ShyVideos">
select * from shy_videos where shenhe_type=2 AND state =0 AND avsample =2
</select>
</mapper>