Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
rpc-openplatform
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 28690ac8
authored
Dec 19, 2020
by
tyfanchz
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改查询语句
1 parent
704c1abb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
30 deletions
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformApiCallMapper.xml
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformAppDownloadMapper.xml
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformDeviceMapper.xml
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformUserMapper.xml
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformApiCallMapper.xml
View file @
28690ac
...
@@ -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 *
select date_format(create_time, '%Y-%m-%d') as createTime,
from (
count(id) as num
select date_format(create_time, '%Y-%m-%d') as createTime,
from t_platform_api_call
count(id) as num
where create_time >= #{statisticStartTime,jdbcType=TIMESTAMP}
from t_platform_api_call
and create_time
<
#{statisticEndTime,jdbcType=TIMESTAMP}
where create_time >= #{statisticStartTime,jdbcType=TIMESTAMP}
group by createTime
and create_time
<
#{statisticEndTime,jdbcType=TIMESTAMP}
order by createTime
group by createTime) a
order by a.createTime
</select>
</select>
</mapper>
</mapper>
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformAppDownloadMapper.xml
View file @
28690ac
...
@@ -28,9 +28,8 @@
...
@@ -28,9 +28,8 @@
</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
left join t_platform_customer pc on pc.id = pad.customer_id
left join t_platform_customer pc on pc.id = pad.customer_id
<where>
<where>
...
@@ -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>
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformDeviceMapper.xml
View file @
28690ac
...
@@ -83,22 +83,18 @@
...
@@ -83,22 +83,18 @@
</select>
</select>
<select
id=
"getDeviceAccessTrendList"
resultType=
"java.util.Map"
>
<select
id=
"getDeviceAccessTrendList"
resultType=
"java.util.Map"
>
select *
select date_format(activat_time, '%Y-%m-%d') as activatTime,
from (
count(id) as num
select date_format(activat_time, '%Y-%m-%d') as activatTime,
from t_platform_device
count(id) as num
where activat_time >= #{statisticStartTime,jdbcType=TIMESTAMP}
from t_platform_device
and activat_time
<
#{statisticEndTime,jdbcType=TIMESTAMP}
where activat_time >= #{statisticStartTime,jdbcType=TIMESTAMP}
group by activatTime
and activat_time
<
#{statisticEndTime,jdbcType=TIMESTAMP}
order by activatTime
group by activatTime) a
order by a.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
left join t_platform_customer pc on pc.id = pd.customer_id
left join t_platform_customer pc on pc.id = pd.customer_id
<where>
<where>
...
@@ -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"
>
...
...
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformUserMapper.xml
View file @
28690ac
...
@@ -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"
>
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment