提交修改

This commit is contained in:
LEED
2025-04-13 18:00:19 +08:00
parent 988e68bdc7
commit 4201690d93
60 changed files with 2589 additions and 285 deletions

View File

@@ -136,6 +136,7 @@ public class MqttPublish implements MqttHandler {
reportBo.setReportType(1);
}
// 规则引擎脚本处理,完成后返回结果
// MsgContext context = ruleProcess.processRuleScript(topicsUtils.parseSerialNumber(topicName), 1, topicName, new String(source));
MsgContext context;
if (topicName.startsWith(TopicType.PROPERTY_XINDA_DEV.getTopicSuffix())) {
context = ruleProcess.processNoRuleScript(topicsUtils.parseNewSerialNumber(topicName), 1, topicName, new String(source));

View File

@@ -136,7 +136,8 @@ public class MqttMessagePublishImpl implements IMqttMessagePublish {
switch (serverType) {
case MQTT:
// 规则引擎脚本处理,完成后返回结果
MsgContext context;
// MsgContext context = ruleProcess.processRuleScript(serialNumber, 2, backBo.getTopicName(), new String(backBo.getMessage()));
MsgContext context;
if (backBo.getTopicName().startsWith(TopicType.PROPERTY_XINDA_DEV.getTopicSuffix())) {
context = ruleProcess.processNoRuleScript(serialNumber, 2, backBo.getTopicName(), new String(backBo.getMessage()));
}else{

View File

@@ -1,5 +1,6 @@
package com.xinda.sip.service.impl;
import com.xinda.common.core.domain.entity.SysRole;
import com.xinda.common.core.domain.entity.SysUser;
import com.xinda.common.core.redis.RedisCache;
import com.xinda.common.core.redis.RedisKeyBuilder;
@@ -109,7 +110,7 @@ public class SipDeviceChannelServiceImpl implements ISipDeviceChannelService {
public List<SipDeviceChannel> selectSipDeviceChannelList(SipDeviceChannel sipDeviceChannel) {
SysUser user = getLoginUser().getUser();
// List<SysRole> roles=user.getRoles();
// 租户
//// 租户
// if(roles.stream().anyMatch(a->a.getRoleKey().equals("tenant"))){
// sipDeviceChannel.setTenantId(user.getUserId());
// }
@@ -183,9 +184,10 @@ public class SipDeviceChannelServiceImpl implements ISipDeviceChannelService {
@Override
public int insertSipDeviceChannel(SipDeviceChannel sipDeviceChannel) {
SysUser sysUser = getLoginUser().getUser();
Product product = productService.getProductBySerialNumber(sipDeviceChannel.getDeviceSipId());
if (product != null) {
sipDeviceChannel.setTenantId(product.getTenantId());
sipDeviceChannel.setTenantId(sysUser.getDept().getDeptUserId());
sipDeviceChannel.setTenantName(product.getTenantName());
sipDeviceChannel.setProductId(product.getProductId());
sipDeviceChannel.setProductName(product.getProductName());

View File

@@ -136,7 +136,7 @@
from sip_device_channel s
left join iot_sip_relation d on s.channel_sip_id = d.channel_id
<where>
<if test="tenantId != null ">and s.tenant_id = #{tenantId}</if>
<if test="tenantId != null and tenantId !=1 ">and s.tenant_id = #{tenantId}</if>
<if test="tenantName != null and tenantName != ''">and s.tenant_name like concat('%', #{tenantName}, '%')</if>
<if test="productId != null ">and s.product_id = #{productId}</if>
<if test="productName != null and productName != ''">and s.product_name like concat('%', #{productName},'%')</if>