UserNoticeMapper.xml
2.18 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.bjivt.entity.showtime.UserNoticeMapper">
<resultMap id="BaseResultMap" type="java.lang.String" >
<result column="id" property="id" />
</resultMap>
<resultMap id="AnchorResultMap" type="java.lang.String" >
<result column="user_id" property="id" />
</resultMap>
<sql id="Base_Column_List">
user_id
</sql>
<select id="loadAllUserList" parameterType="java.util.HashMap" resultMap="BaseResultMap">
<![CDATA[
SELECT id FROM tbl_user_list where is_robot<>1 and active='Y'
]]>
<if test="page != null and page !=''">
<if test="page.from != null and page.size != null">
limit #{page.from},#{page.size}
</if>
</if>
</select>
<select id="loadAnchorUserList" parameterType="java.util.HashMap" resultMap="AnchorResultMap">
<![CDATA[
SELECT user_id FROM tbl_live_list
]]>
<if test="page != null and page !=''">
<if test="page.from != null and page.size != null">
limit #{page.from},#{page.size}
</if>
</if>
</select>
<select id="loadCommonUserList" parameterType="java.util.HashMap" resultMap="BaseResultMap">
<![CDATA[
select id from tbl_user_list where id not in (select user_id from tbl_live_list ) and is_robot<>1 and active='Y'
]]>
<if test="page != null and page !=''">
<if test="page.from != null and page.size != null">
limit #{page.from},#{page.size}
</if>
</if>
</select>
<select id="loadAllUserCount" resultType="java.lang.Integer" parameterType="java.util.HashMap">
<![CDATA[
SELECT count(id) FROM tbl_user_list where is_robot<>1 and active='Y'
]]>
</select>
<select id="loadAnchorUserCount" resultType="java.lang.Integer" parameterType="java.util.HashMap">
SELECT count(id)
FROM
tbl_live_list
</select>
<select id="loadCommonUserCount" resultType="java.lang.Integer" parameterType="java.util.HashMap">
<![CDATA[
select count(id) from tbl_user_list where id not in (select user_id from tbl_live_list ) and is_robot<>1 and active='Y'
]]>
</select>
</mapper>