|
@@ -1,6 +1,7 @@
|
|
|
package com.usky.meeting.controller.web;
|
|
|
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
import com.usky.common.core.bean.ApiResult;
|
|
|
import com.usky.common.core.bean.CommonPage;
|
|
|
import com.usky.common.security.utils.SecurityUtils;
|
|
@@ -8,6 +9,7 @@ import com.usky.common.log.annotation.Log;
|
|
|
import com.usky.common.log.enums.BusinessType;
|
|
|
import com.usky.meeting.domain.MeetingRoom;
|
|
|
import com.usky.meeting.repository.MeetingDeviceRepository;
|
|
|
+import com.usky.meeting.repository.MeetingRoomRepository;
|
|
|
import com.usky.meeting.service.MeetingRoomService;
|
|
|
import com.usky.meeting.service.dto.DmMeetingRoomDto;
|
|
|
import com.usky.meeting.service.vo.MeetingRoomRequestVO;
|
|
@@ -37,6 +39,8 @@ public class MeetingRoomController {
|
|
|
private MeetingRoomService meetingRoomService;
|
|
|
@Autowired
|
|
|
private RemoteTransferService remoteTransferService;
|
|
|
+ @Autowired
|
|
|
+ private MeetingRoomRepository dmMeetingRoomRepository;
|
|
|
|
|
|
/**
|
|
|
* 下发门禁开门
|
|
@@ -44,8 +48,15 @@ public class MeetingRoomController {
|
|
|
@GetMapping("/{productCode}/{deviceId}/control")
|
|
|
public ApiResult<Map<String,Object>> control(@PathVariable("productCode") String productCode,
|
|
|
@PathVariable("deviceId") String deviceId,
|
|
|
- @RequestParam(value = "commandStr") String commandStr){
|
|
|
- return ApiResult.success(remoteTransferService.deviceControl(productCode,deviceId,commandStr));
|
|
|
+ @RequestParam(value = "commandStr") String commandStr,
|
|
|
+ @RequestParam(value = "domain") String domain){
|
|
|
+ Integer tenantId;
|
|
|
+ if(StringUtils.isNotBlank(domain)){
|
|
|
+ tenantId = dmMeetingRoomRepository.getTenantIdByDomain(domain);
|
|
|
+ }else{
|
|
|
+ tenantId = SecurityUtils.getTenantId();
|
|
|
+ }
|
|
|
+ return ApiResult.success(remoteTransferService.deviceControl(productCode,deviceId,commandStr,tenantId));
|
|
|
}
|
|
|
|
|
|
/**
|