Commit 7719ef3c by huangjy

feat:设备日志推送到oss

parent 3e2f79e2
......@@ -19,10 +19,8 @@ import com.makeit.vo.platform.device.PlatDeviceListVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
......@@ -91,4 +89,12 @@ public class SaasDeviceController {
return ApiResponseUtils.success();
}
@ApiOperation("设备日志推送")
@PostMapping("devicePushLog")
@TenantIdIgnore
public ApiResponseEntity devicePushLog(@RequestParam(value = "file", required = false) MultipartFile multipartFile) {
platDeviceService.devicePushLog(multipartFile);
return ApiResponseUtils.success();
}
}
......@@ -16,6 +16,7 @@ import com.makeit.shengwang.agora.vo.PlatAlarmCallDeviceVO;
import com.makeit.vo.platform.device.PlatChildDeviceListVO;
import com.makeit.vo.platform.device.PlatDeviceListVO;
import com.makeit.vo.platform.device.PlatDeviceViewVO;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
......@@ -88,4 +89,6 @@ public interface PlatDeviceService extends IService<PlatDevice> {
PlatAlarmCallDeviceVO getDeviceRtmToken(PlatCallingDeviceDTO dto);
PlatAlarmCallDeviceVO callingDevice(PlatCallingDeviceDTO dto);
void devicePushLog(MultipartFile multipartFile);
}
......@@ -77,6 +77,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
......@@ -792,4 +793,9 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
public PlatAlarmCallDeviceVO getDeviceRtmToken(PlatCallingDeviceDTO dto) {
return shengwangService.callingDeviceAuthIgnoreRtm(dto);
}
@Override
public void devicePushLog(MultipartFile multipartFile) {
}
}
......@@ -14,8 +14,8 @@ spring:
idle-timeout: 60000
login-timeout: 5
max-lifetime: 60000
maximum-pool-size: 10
minimum-idle: 5
maximum-pool-size: 50
minimum-idle: 10
read-only: false
#jackson时间格式化
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment