Commit 7719ef3c by huangjy

feat:设备日志推送到oss

parent 3e2f79e2
...@@ -19,10 +19,8 @@ import com.makeit.vo.platform.device.PlatDeviceListVO; ...@@ -19,10 +19,8 @@ import com.makeit.vo.platform.device.PlatDeviceListVO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List; import java.util.List;
...@@ -91,4 +89,12 @@ public class SaasDeviceController { ...@@ -91,4 +89,12 @@ public class SaasDeviceController {
return ApiResponseUtils.success(); 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; ...@@ -16,6 +16,7 @@ import com.makeit.shengwang.agora.vo.PlatAlarmCallDeviceVO;
import com.makeit.vo.platform.device.PlatChildDeviceListVO; import com.makeit.vo.platform.device.PlatChildDeviceListVO;
import com.makeit.vo.platform.device.PlatDeviceListVO; import com.makeit.vo.platform.device.PlatDeviceListVO;
import com.makeit.vo.platform.device.PlatDeviceViewVO; import com.makeit.vo.platform.device.PlatDeviceViewVO;
import org.springframework.web.multipart.MultipartFile;
import java.util.List; import java.util.List;
...@@ -88,4 +89,6 @@ public interface PlatDeviceService extends IService<PlatDevice> { ...@@ -88,4 +89,6 @@ public interface PlatDeviceService extends IService<PlatDevice> {
PlatAlarmCallDeviceVO getDeviceRtmToken(PlatCallingDeviceDTO dto); PlatAlarmCallDeviceVO getDeviceRtmToken(PlatCallingDeviceDTO dto);
PlatAlarmCallDeviceVO callingDevice(PlatCallingDeviceDTO dto); PlatAlarmCallDeviceVO callingDevice(PlatCallingDeviceDTO dto);
void devicePushLog(MultipartFile multipartFile);
} }
...@@ -77,6 +77,7 @@ import org.springframework.beans.BeanUtils; ...@@ -77,6 +77,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.ZoneOffset; import java.time.ZoneOffset;
...@@ -792,4 +793,9 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev ...@@ -792,4 +793,9 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
public PlatAlarmCallDeviceVO getDeviceRtmToken(PlatCallingDeviceDTO dto) { public PlatAlarmCallDeviceVO getDeviceRtmToken(PlatCallingDeviceDTO dto) {
return shengwangService.callingDeviceAuthIgnoreRtm(dto); return shengwangService.callingDeviceAuthIgnoreRtm(dto);
} }
@Override
public void devicePushLog(MultipartFile multipartFile) {
}
} }
...@@ -14,8 +14,8 @@ spring: ...@@ -14,8 +14,8 @@ spring:
idle-timeout: 60000 idle-timeout: 60000
login-timeout: 5 login-timeout: 5
max-lifetime: 60000 max-lifetime: 60000
maximum-pool-size: 10 maximum-pool-size: 50
minimum-idle: 5 minimum-idle: 10
read-only: false read-only: false
#jackson时间格式化 #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