提交权限修改
This commit is contained in:
@@ -22,6 +22,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="sceneId" column="scene_id"/>
|
||||
<result property="sceneName" column="scene_name"/>
|
||||
<result property="enable" column="enable"/>
|
||||
<result property="orderId" column="order_id"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.xinda.iot.model.DeviceAlertCount" id="DeviceAlertCount">
|
||||
@@ -34,11 +36,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAlertLogVo">
|
||||
select alert_log_id, alert_name, alert_level, status, product_id, detail, serial_number, create_by, create_time, remark, device_name, user_id from iot_alert_log
|
||||
select alert_log_id, alert_name, alert_level, status, product_id, detail, serial_number, create_by, create_time, remark, device_name, user_id,enable,order_id from iot_alert_log
|
||||
</sql>
|
||||
|
||||
<select id="selectAlertLogList" parameterType="com.xinda.iot.domain.AlertLog" resultMap="AlertLogResult">
|
||||
select distinct al.alert_log_id, al.alert_name, al.alert_level, al.status, al.product_id, al.detail, al.serial_number, al.create_time, al.remark, al.device_name, al.user_id
|
||||
select distinct al.alert_log_id, al.alert_name, al.alert_level, al.status, al.product_id, al.detail, al.serial_number, al.create_time, al.remark, al.device_name, al.user_id,al.enable,al.order_id
|
||||
from iot_alert_log al
|
||||
<where>
|
||||
<if test="alertName != null and alertName != ''"> and al.alert_name like concat('%', #{alertName}, '%')</if>
|
||||
@@ -55,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectAlertLogListAndScene" parameterType="com.xinda.iot.domain.AlertLog" resultMap="AlertLogResult">
|
||||
select al.alert_log_id, al.alert_name, al.alert_level, al.status, al.product_id, al.detail,
|
||||
al.serial_number, al.create_time, al.remark, al.device_name, al.user_id,
|
||||
al.serial_number, al.create_time, al.remark, al.device_name, al.user_id,al.enable,al.order_id,
|
||||
s.scene_id,s.scene_name
|
||||
from iot_alert_log al
|
||||
left join iot_scene s on CAST(COALESCE(NULLIF(TRIM(al.create_by), ''), 0) AS signed) = s.scene_id
|
||||
@@ -204,6 +206,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="deviceName != null and deviceName != ''">#{deviceName},</if>
|
||||
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -238,6 +241,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="enable != null">enable =#{enable},</if>
|
||||
<if test="orderId != null">orderId =#{orderId},</if>
|
||||
</trim>
|
||||
where alert_log_id = #{alertLogId}
|
||||
</update>
|
||||
|
||||
@@ -221,4 +221,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectSceneByAlert" resultType="Long">
|
||||
select scene_id
|
||||
from iot_alert_scene
|
||||
where alert_id in
|
||||
<foreach item="alertId" collection="array" open="(" separator="," close=")">
|
||||
#{alertId}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -750,17 +750,17 @@
|
||||
|
||||
(
|
||||
select count(product_id)
|
||||
from iot_product
|
||||
<!-- <where>-->
|
||||
<!-- <if test="deptId != null and deptId != 0">-->
|
||||
<!-- and d.user_id in (SELECT-->
|
||||
<!-- u.user_id-->
|
||||
<!-- FROM-->
|
||||
<!-- sys_user u-->
|
||||
<!-- WHERE-->
|
||||
<!-- u.dept_id IN ( SELECT dept_id FROM sys_dept WHERE find_in_set(#{deptId}, ancestors) OR dept_id = #{deptId}))-->
|
||||
<!-- </if>-->
|
||||
<!-- </where>-->
|
||||
from iot_product p
|
||||
<where>
|
||||
<if test="deptId != null and deptId != 0">
|
||||
and p.tenant_id in (SELECT
|
||||
u.user_id
|
||||
FROM
|
||||
sys_user u
|
||||
WHERE
|
||||
u.dept_id IN ( SELECT dept_id FROM sys_dept WHERE find_in_set(#{deptId}, ancestors) OR dept_id = #{deptId}))
|
||||
</if>
|
||||
</where>
|
||||
) as productCount,
|
||||
|
||||
<!-- <!–告警设备数量–>-->
|
||||
|
||||
Reference in New Issue
Block a user