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 0d9cf0ac
authored
Dec 30, 2020
by
tyfanchz
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改设备列表过滤条件
1 parent
b55e66cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
12 deletions
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformDeviceMapper.xml
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformDeviceMapper.xml
View file @
0d9cf0a
...
@@ -69,6 +69,7 @@
...
@@ -69,6 +69,7 @@
<select
id=
"getDeviceCount"
resultType=
"java.lang.Integer"
>
<select
id=
"getDeviceCount"
resultType=
"java.lang.Integer"
>
select count(1)
select count(1)
from t_platform_device
from t_platform_device
where status != 9
</select>
</select>
<select
id=
"getDeviceGraphData"
resultType=
"java.util.Map"
>
<select
id=
"getDeviceGraphData"
resultType=
"java.util.Map"
>
...
@@ -83,6 +84,7 @@
...
@@ -83,6 +84,7 @@
from t_platform_device a
from t_platform_device a
left join t_platform_customer b on a.customer_id = b.id
left join t_platform_customer b on a.customer_id = b.id
<where>
<where>
and a.status != 9
<if
test=
"customerName != null and customerName != ''"
>
<if
test=
"customerName != null and customerName != ''"
>
and b.customer_name = #{customerName,jdbcType=VARCHAR}
and b.customer_name = #{customerName,jdbcType=VARCHAR}
</if>
</if>
...
@@ -95,6 +97,7 @@
...
@@ -95,6 +97,7 @@
from t_platform_device
from t_platform_device
where activat_time >= #{statisticStartTime,jdbcType=TIMESTAMP}
where activat_time >= #{statisticStartTime,jdbcType=TIMESTAMP}
and activat_time
<
#{statisticEndTime,jdbcType=TIMESTAMP}
and activat_time
<
#{statisticEndTime,jdbcType=TIMESTAMP}
and status != 9
group by activatTime
group by activatTime
order by activatTime
order by activatTime
</select>
</select>
...
@@ -105,7 +108,8 @@
...
@@ -105,7 +108,8 @@
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>
pd.activat_time >= #{startTime,jdbcType=TIMESTAMP}
and pd.status != 9
and pd.activat_time >= #{startTime,jdbcType=TIMESTAMP}
and pd.activat_time
<
#{endTime,jdbcType=TIMESTAMP}
and pd.activat_time
<
#{endTime,jdbcType=TIMESTAMP}
<if
test=
"customerName != null and customerName != ''"
>
<if
test=
"customerName != null and customerName != ''"
>
and pc.customer_name = #{customerName,jdbcType=VARCHAR}
and pc.customer_name = #{customerName,jdbcType=VARCHAR}
...
@@ -119,6 +123,7 @@
...
@@ -119,6 +123,7 @@
select count(1)
select count(1)
from t_platform_device
from t_platform_device
where customer_id = #{customerId,jdbcType=INTEGER}
where customer_id = #{customerId,jdbcType=INTEGER}
and status != 9
<if
test=
"deviceTypeStr != null and deviceTypeStr != ''"
>
<if
test=
"deviceTypeStr != null and deviceTypeStr != ''"
>
and device_type = #{deviceTypeStr,jdbcType=VARCHAR}
and device_type = #{deviceTypeStr,jdbcType=VARCHAR}
</if>
</if>
...
@@ -127,7 +132,7 @@
...
@@ -127,7 +132,7 @@
<select
id=
"getacticveDeviceCountByCustomerId"
resultType=
"java.lang.Integer"
>
<select
id=
"getacticveDeviceCountByCustomerId"
resultType=
"java.lang.Integer"
>
select count(1)
select count(1)
from t_platform_device
from t_platform_device
where status = 1
where status = 1
and status != 9
and customer_id = #{customerId,jdbcType=INTEGER}
and customer_id = #{customerId,jdbcType=INTEGER}
<if
test=
"deviceTypeStr != null and deviceTypeStr != ''"
>
<if
test=
"deviceTypeStr != null and deviceTypeStr != ''"
>
and device_type = #{deviceTypeStr,jdbcType=VARCHAR}
and device_type = #{deviceTypeStr,jdbcType=VARCHAR}
...
@@ -135,20 +140,24 @@
...
@@ -135,20 +140,24 @@
</select>
</select>
<select
id=
"getDeviceByTimeRangeAndCustID"
resultType=
"cn.com.glsx.openplatform.vo.OpenDeviceVo"
>
<select
id=
"getDeviceByTimeRangeAndCustID"
resultType=
"cn.com.glsx.openplatform.vo.OpenDeviceVo"
>
select tpd.device_sn as sn,tpu.nickname as username,tpu.contact_number as mobile from t_platform_device tpd inner join t_platform_user tpu
select tpd.device_sn as sn,tpu.nickname as username,tpu.contact_number as mobile
on tpd.user_id = tpu.id
from t_platform_device tpd
where tpd.activat_time >= #{startTime,jdbcType=TIMESTAMP}
inner join t_platform_user tpu on tpd.user_id = tpu.id
and tpd.activat_time
<
#{endTime,jdbcType=TIMESTAMP}
where tpd.activat_time >= #{startTime,jdbcType=TIMESTAMP}
and tpd.customer_id = #{customerID,jdbcType=INTEGER}
and tpd.activat_time
<
#{endTime,jdbcType=TIMESTAMP}
and tpd.customer_id = #{customerID,jdbcType=INTEGER}
and tpd.status != 9
order by tpd.activat_time desc
order by tpd.activat_time desc
</select>
</select>
<select
id=
"getCountDeviceByTimeRangeAndCustID"
resultType=
"java.lang.Integer"
>
<select
id=
"getCountDeviceByTimeRangeAndCustID"
resultType=
"java.lang.Integer"
>
select count(1) from t_platform_device tpd inner join t_platform_user tpu
select count(1)
on tpd.user_id = tpu.id
from t_platform_device tpd
where tpd.activat_time >= #{startTime,jdbcType=TIMESTAMP}
inner join t_platform_user tpu on tpd.user_id = tpu.id
and tpd.activat_time
<
#{endTime,jdbcType=TIMESTAMP}
where tpd.activat_time >= #{startTime,jdbcType=TIMESTAMP}
and tpd.customer_id = #{customerID,jdbcType=INTEGER}
and tpd.activat_time
<
#{endTime,jdbcType=TIMESTAMP}
and tpd.customer_id = #{customerID,jdbcType=INTEGER}
and tpd.status != 9
order by tpd.activat_time desc
order by tpd.activat_time desc
</select>
</select>
</mapper>
</mapper>
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