Commit 28690ac8 by tyfanchz

修改查询语句

1 parent 704c1abb
...@@ -55,14 +55,12 @@ ...@@ -55,14 +55,12 @@
</select> </select>
<select id="getApiCallTrendList" resultType="java.util.Map"> <select id="getApiCallTrendList" resultType="java.util.Map">
select *
from (
select date_format(create_time, '%Y-%m-%d') as createTime, select date_format(create_time, '%Y-%m-%d') as createTime,
count(id) as num count(id) as num
from t_platform_api_call from t_platform_api_call
where create_time >= #{statisticStartTime,jdbcType=TIMESTAMP} where create_time >= #{statisticStartTime,jdbcType=TIMESTAMP}
and create_time &lt; #{statisticEndTime,jdbcType=TIMESTAMP} and create_time &lt; #{statisticEndTime,jdbcType=TIMESTAMP}
group by createTime) a group by createTime
order by a.createTime order by createTime
</select> </select>
</mapper> </mapper>
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
</select> </select>
<select id="getAppDownloadStatistic" resultType="map"> <select id="getAppDownloadStatistic" resultType="map">
select * from (
select date_format(pad.create_time, '%Y-%m-%d') `time`, select date_format(pad.create_time, '%Y-%m-%d') `time`,
count(pad.create_time) `count` count(pad.create_time) `count`
from t_platform_app_download pad from t_platform_app_download pad
...@@ -40,7 +39,7 @@ ...@@ -40,7 +39,7 @@
and pc.customer_name = #{customerName,jdbcType=VARCHAR} and pc.customer_name = #{customerName,jdbcType=VARCHAR}
</if> </if>
</where> </where>
group by time) a group by time
order by a.time order by time
</select> </select>
</mapper> </mapper>
...@@ -83,20 +83,16 @@ ...@@ -83,20 +83,16 @@
</select> </select>
<select id="getDeviceAccessTrendList" resultType="java.util.Map"> <select id="getDeviceAccessTrendList" resultType="java.util.Map">
select *
from (
select date_format(activat_time, '%Y-%m-%d') as activatTime, select date_format(activat_time, '%Y-%m-%d') as activatTime,
count(id) as num count(id) as num
from t_platform_device from t_platform_device
where activat_time >= #{statisticStartTime,jdbcType=TIMESTAMP} where activat_time >= #{statisticStartTime,jdbcType=TIMESTAMP}
and activat_time &lt; #{statisticEndTime,jdbcType=TIMESTAMP} and activat_time &lt; #{statisticEndTime,jdbcType=TIMESTAMP}
group by activatTime) a group by activatTime
order by a.activatTime order by activatTime
</select> </select>
<select id="getDeviceActivationStatistic" resultType="map"> <select id="getDeviceActivationStatistic" resultType="map">
select *
from (
select date_format(pd.activat_time, '%Y-%m-%d') `time`, select date_format(pd.activat_time, '%Y-%m-%d') `time`,
count(pd.activat_time) `count` count(pd.activat_time) `count`
from t_platform_device pd from t_platform_device pd
...@@ -108,8 +104,8 @@ ...@@ -108,8 +104,8 @@
and pc.customer_name = #{customerName,jdbcType=VARCHAR} and pc.customer_name = #{customerName,jdbcType=VARCHAR}
</if> </if>
</where> </where>
group by time) a group by time
order by a.time order by time
</select> </select>
<select id="getDeviceCountByCustomerId" resultType="java.lang.Integer"> <select id="getDeviceCountByCustomerId" resultType="java.lang.Integer">
......
...@@ -80,7 +80,6 @@ ...@@ -80,7 +80,6 @@
</select> </select>
<select id="getUserActivityStatistic" resultType="map"> <select id="getUserActivityStatistic" resultType="map">
select * from (
select date_format(pu.last_login_time, '%Y-%m-%d') `time`, select date_format(pu.last_login_time, '%Y-%m-%d') `time`,
count(pu.last_login_time) `count` count(pu.last_login_time) `count`
from t_platform_user pu from t_platform_user pu
...@@ -92,8 +91,8 @@ ...@@ -92,8 +91,8 @@
and pc.customer_name = #{customerName,jdbcType=VARCHAR} and pc.customer_name = #{customerName,jdbcType=VARCHAR}
</if> </if>
</where> </where>
group by time) a group by time
order by a.time order by time
</select> </select>
<select id="getCustomerId" resultType="java.lang.Integer"> <select id="getCustomerId" resultType="java.lang.Integer">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!