AppAdSourceMonitorAnaMapper.xml
1.9 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
<?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.yoho.unions.dal.AppAdSourceMonitorAnaMapper">
<resultMap id="BaseResultMap" type="com.yoho.unions.dal.model.AppAdSourceMonitorAna">
<result column="date_id" property="dateId" jdbcType="INTEGER"/>
<result column="hour" property="hour" jdbcType="INTEGER"/>
<result column="union_type" property="unionType" jdbcType="VARCHAR"/>
<result column="union_name" property="unionName" jdbcType="VARCHAR"/>
<result column="pv" property="pv" jdbcType="INTEGER"/>
<result column="info_pv" property="infoPv" jdbcType="INTEGER"/>
<result column="cart_pv" property="cartPv" jdbcType="INTEGER"/>
<result column="order_num" property="orderNum" jdbcType="INTEGER"/>
<result column="ips" property="ips" jdbcType="LONGVARCHAR"/>
<result column="skns" property="skns" jdbcType="LONGVARCHAR"/>
</resultMap>
<sql id="Blob_Column_List">
date_id,hour,union_type,union_name,pv,info_pv,cart_pv,order_num,ips,skns
</sql>
<select id="selectByUnionType" resultMap="BaseResultMap">
select
<include refid="Blob_Column_List"/>
from APP_AD_SOURCE_MONITOR_ANA where union_type = #{unionType}
AND date_id = #{date_id}
ORDER BY hour DESC limit 1
</select>
<select id="selectIpsById" resultType="java.lang.String">
select
ips
from APP_AD_SOURCE_MONITOR_ANA where id = #{id}
</select>
<select id="selectSknsById" resultType="java.lang.String">
select
skns
from APP_AD_SOURCE_MONITOR_ANA where id = #{id}
</select>
<select id="selectCount" resultType="java.lang.Integer">
select
COUNT(*)
from APP_AD_SOURCE_MONITOR_ANA where union_type = #{unionType}
</select>
</mapper>