29 lines
1.1 KiB
XML
29 lines
1.1 KiB
XML
<?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.suisung.mall.account.mapper.AnalyticsUserDao">
|
|
<select id="getRegUser" resultType="com.suisung.mall.common.pojo.vo.RegUserVo">
|
|
SELECT
|
|
COUNT(1) AS num
|
|
FROM
|
|
account_user_login
|
|
<where>
|
|
<if test="startTime!=null and endTime!=null">
|
|
AND user_reg_time BETWEEN #{startTime} AND #{endTime}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="getUserTimeLine" resultType="com.suisung.mall.common.pojo.output.TimelineOutput">
|
|
SELECT from_unixtime(round(user_reg_time / 1000), '%m-%d') AS time,
|
|
count(*) num
|
|
FROM
|
|
account_user_login
|
|
<where>
|
|
<if test="startTime!=null and endTime!=null">
|
|
AND user_reg_time BETWEEN #{startTime} AND #{endTime}
|
|
</if>
|
|
</where>
|
|
GROUP BY user_reg_date
|
|
ORDER BY user_reg_date
|
|
</select>
|
|
</mapper> |