Blame view

urbanops-module-mall/urbanops-module-statistics/src/main/resources/mapper/infra/ApiAccessLogStatisticsMapper.xml 908 Bytes
2f252ffd   王彪总   feat(pay): 实现支付宝支...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  <?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.zteits.urbanops.module.statistics.dal.mysql.infra.ApiAccessLogStatisticsMapper">
  
      <select id="selectIpCountByUserTypeAndCreateTimeBetween" resultType="java.lang.Integer">
          SELECT COUNT(DISTINCT user_ip)
          FROM infra_api_access_log
          WHERE user_type = #{userType}
          AND create_time BETWEEN #{beginTime} AND #{endTime}
          AND deleted = FALSE
      </select>
  
      <select id="selectUserCountByUserTypeAndCreateTimeBetween" resultType="java.lang.Integer">
          SELECT COUNT(DISTINCT user_id)
          FROM infra_api_access_log
          WHERE user_id > 0
            AND user_type = #{userType}
            AND create_time BETWEEN #{beginTime} AND #{endTime}
            AND deleted = FALSE
      </select>
  
  </mapper>