Commit 0d9cf0ac by tyfanchz

修改设备列表过滤条件

1 parent b55e66cc
......@@ -69,6 +69,7 @@
<select id="getDeviceCount" resultType="java.lang.Integer">
select count(1)
from t_platform_device
where status != 9
</select>
<select id="getDeviceGraphData" resultType="java.util.Map">
......@@ -83,6 +84,7 @@
from t_platform_device a
left join t_platform_customer b on a.customer_id = b.id
<where>
and a.status != 9
<if test="customerName != null and customerName != ''">
and b.customer_name = #{customerName,jdbcType=VARCHAR}
</if>
......@@ -95,6 +97,7 @@
from t_platform_device
where activat_time >= #{statisticStartTime,jdbcType=TIMESTAMP}
and activat_time &lt; #{statisticEndTime,jdbcType=TIMESTAMP}
and status != 9
group by activatTime
order by activatTime
</select>
......@@ -105,7 +108,8 @@
from t_platform_device pd
left join t_platform_customer pc on pc.id = pd.customer_id
<where>
pd.activat_time >= #{startTime,jdbcType=TIMESTAMP}
and pd.status != 9
and pd.activat_time >= #{startTime,jdbcType=TIMESTAMP}
and pd.activat_time &lt; #{endTime,jdbcType=TIMESTAMP}
<if test="customerName != null and customerName != ''">
and pc.customer_name = #{customerName,jdbcType=VARCHAR}
......@@ -119,6 +123,7 @@
select count(1)
from t_platform_device
where customer_id = #{customerId,jdbcType=INTEGER}
and status != 9
<if test="deviceTypeStr != null and deviceTypeStr != ''">
and device_type = #{deviceTypeStr,jdbcType=VARCHAR}
</if>
......@@ -127,7 +132,7 @@
<select id="getacticveDeviceCountByCustomerId" resultType="java.lang.Integer">
select count(1)
from t_platform_device
where status = 1
where status = 1 and status != 9
and customer_id = #{customerId,jdbcType=INTEGER}
<if test="deviceTypeStr != null and deviceTypeStr != ''">
and device_type = #{deviceTypeStr,jdbcType=VARCHAR}
......@@ -135,20 +140,24 @@
</select>
<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
on tpd.user_id = tpu.id
where tpd.activat_time >= #{startTime,jdbcType=TIMESTAMP}
and tpd.activat_time &lt; #{endTime,jdbcType=TIMESTAMP}
and tpd.customer_id = #{customerID,jdbcType=INTEGER}
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 on tpd.user_id = tpu.id
where tpd.activat_time >= #{startTime,jdbcType=TIMESTAMP}
and tpd.activat_time &lt; #{endTime,jdbcType=TIMESTAMP}
and tpd.customer_id = #{customerID,jdbcType=INTEGER}
and tpd.status != 9
order by tpd.activat_time desc
</select>
<select id="getCountDeviceByTimeRangeAndCustID" resultType="java.lang.Integer">
select count(1) from t_platform_device tpd inner join t_platform_user tpu
on tpd.user_id = tpu.id
where tpd.activat_time >= #{startTime,jdbcType=TIMESTAMP}
and tpd.activat_time &lt; #{endTime,jdbcType=TIMESTAMP}
and tpd.customer_id = #{customerID,jdbcType=INTEGER}
select count(1)
from t_platform_device tpd
inner join t_platform_user tpu on tpd.user_id = tpu.id
where tpd.activat_time >= #{startTime,jdbcType=TIMESTAMP}
and tpd.activat_time &lt; #{endTime,jdbcType=TIMESTAMP}
and tpd.customer_id = #{customerID,jdbcType=INTEGER}
and tpd.status != 9
order by tpd.activat_time desc
</select>
</mapper>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!