MediaMapper.xml
1.89 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
<?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.hui.iqiyi.mapper.MediaMapper">
<select id="selectAllIqIy" resultType="com.hui.iqiyi.entity.Media" parameterType="com.hui.iqiyi.request.MediaRequest">
select im.*
from iqiyi_media as im
where 1=1
<if test="id != null and id != ''">
and id = #{id}
</if>
<if test="cid != null and cid != ''">
and cid = #{cid}
</if>
<if test="type != null and type != ''">
and type = #{type}
</if>
<if test="name!= null and name!= ''">
AND name = #{name}
</if>
<if test="cname!= null and cname!= ''">
AND cname = #{cname}
</if>
<if test="beginTime != null">
and create_time >= #{beginTime}
</if>
<if test="EndTime != null">
and create_time <= #{EndTime}
</if>
<if test="score != null">
and score = #{score}
</if>
<if test="platformInfo != null">
and platform_info = #{platformInfo}
</if>
<if test="follow != null">
and platform_info is not null
</if>
<if test="downloadStatus !=null" >
and local_status=#{downloadStatus}
</if>
ORDER BY create_time desc
</select>
<select id="selectAllfollow" resultType="com.hui.iqiyi.entity.Media">
select * from iqiyi_media as a
LEFT JOIN iqiyi_program as c on a.id =c.iqiyi_content_id
LEFT JOIN iqiyi_movie as d on d.iqiyi_program_id=c.id
<where>
1=1
<if test="platformInfo!=null">
and a.platform_info=#{platformInfo}
</if>
</where>
ORDER BY a.update_time
</select>
</mapper>