ApiAccessLogStatisticsMapper.xml 905 B

12345678910111213141516171819202122
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="cn.iocoder.yudao.module.statistics.dal.mysql.infra.ApiAccessLogStatisticsMapper">
  4. <select id="selectIpCountByUserTypeAndCreateTimeBetween" resultType="java.lang.Integer">
  5. SELECT COUNT(DISTINCT user_ip)
  6. FROM infra_api_access_log
  7. WHERE user_type = #{userType}
  8. AND create_time BETWEEN #{beginTime} AND #{endTime}
  9. AND deleted = FALSE
  10. </select>
  11. <select id="selectUserCountByUserTypeAndCreateTimeBetween" resultType="java.lang.Integer">
  12. SELECT COUNT(DISTINCT user_id)
  13. FROM infra_api_access_log
  14. WHERE user_id > 0
  15. AND user_type = #{userType}
  16. AND create_time BETWEEN #{beginTime} AND #{endTime}
  17. AND deleted = FALSE
  18. </select>
  19. </mapper>