|
@@ -26,6 +26,7 @@ import com.hfln.portal.common.request.share.ShareParam;
|
|
|
import com.hfln.portal.common.request.share.updateShareParam;
|
|
|
import com.hfln.portal.common.response.device.UsedInfoQueryRes;
|
|
|
import com.hfln.portal.common.vo.PageRecord;
|
|
|
+import com.hfln.portal.domain.customer.OprLogType;
|
|
|
import com.hfln.portal.domain.customer.OssBusiType;
|
|
|
import com.hfln.portal.domain.customer.util.CopyUtils;
|
|
|
import com.hfln.portal.domain.customer.util.DevPosFixUtil;
|
|
@@ -112,6 +113,9 @@ public class DeviceGatewayImpl implements DeviceGateway {
|
|
|
private RedisUtil redisService;
|
|
|
|
|
|
@Autowired
|
|
|
+ private TblOprLogService logService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
private org.springframework.data.redis.core.RedisTemplate<String, Object> redisTemplate;
|
|
|
|
|
|
|
|
@@ -375,13 +379,8 @@ public class DeviceGatewayImpl implements DeviceGateway {
|
|
|
throw new BizException(ErrorEnum.DEVICE_IS_NOT_EXIST.getErrorCode(), ErrorEnum.DEVICE_IS_NOT_EXIST.getErrorMessage());
|
|
|
}
|
|
|
|
|
|
- //2.校验是否为主绑人
|
|
|
- if (!devInfo.getUserId().equals(params.getUserId())){
|
|
|
- throw new BizException(ErrorEnum.USER_NO_PERMISSION.getErrorCode(), ErrorEnum.USER_NO_PERMISSION.getErrorMessage());
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
- //3.更新数据
|
|
|
+ //2.更新数据
|
|
|
devInfo.setTenantId(params.getTenantId());
|
|
|
devInfo.setDevName(params.getDevName());
|
|
|
devInfo.setHeight(params.getHeight());
|
|
@@ -412,7 +411,9 @@ public class DeviceGatewayImpl implements DeviceGateway {
|
|
|
}
|
|
|
//4.通过MQTT把信息参数发送到设备
|
|
|
mqttSubHandle.sendWebDeviceParamsToMqtt(devInfo.getClientId(), params);
|
|
|
-
|
|
|
+
|
|
|
+ logService.saveLog(OprLogType.UPDATE_DEVICE.getCode(), devInfo);
|
|
|
+
|
|
|
return updated;
|
|
|
}
|
|
|
|
|
@@ -456,6 +457,8 @@ public class DeviceGatewayImpl implements DeviceGateway {
|
|
|
throw new BizException(ErrorEnum.DEVICE_UPDATE_FAIL.getErrorCode(),ErrorEnum.DEVICE_UPDATE_FAIL.getErrorMessage());
|
|
|
}
|
|
|
|
|
|
+ logService.saveLog(OprLogType.UPDATE_DEVICE.getCode(), devInfo);
|
|
|
+
|
|
|
//4.通过MQTT把信息参数发送到设备
|
|
|
mqttSubHandle.sendDeviceParamsToMqtt(devInfo.getClientId(), params);
|
|
|
|