|
@@ -3,6 +3,7 @@ package com.fdkankan.manage.inner.controller;
|
|
|
import cn.hutool.extra.servlet.ServletUtil;
|
|
|
import cn.hutool.log.Log;
|
|
|
import com.fdkankan.common.util.SecurityUtil;
|
|
|
+import com.fdkankan.manage.common.CacheUtil;
|
|
|
import com.fdkankan.manage.common.ResultCode;
|
|
|
import com.fdkankan.manage.common.ResultData;
|
|
|
import com.fdkankan.manage.controller.BaseController;
|
|
@@ -94,6 +95,15 @@ public class InnerController extends BaseController {
|
|
|
if(StringUtils.isBlank(rtkSnCode)){
|
|
|
throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
|
}
|
|
|
+ if("aws".equals(CacheUtil.uploadType)){
|
|
|
+ RtkInfo rtkInfo = rtkInfoService.getByRtkSnCode(rtkSnCode);
|
|
|
+ if(rtkInfo == null){
|
|
|
+ throw new BusinessException(ResultCode.RTK_SN_CODE_NOT_EXIT);
|
|
|
+ }
|
|
|
+ String clientIP = ServletUtil.getClientIP(request);
|
|
|
+ rtkUseLogService.saveLog(rtkInfo,clientIP,cameraSn,0);
|
|
|
+ return ResultData.ok(rtkInfo);
|
|
|
+ }
|
|
|
RtkDevice rtkDevice = rtkDeviceService.getByRtkSnCode(rtkSnCode);
|
|
|
if(rtkDevice == null || rtkDevice.getUseStatus() !=0){
|
|
|
throw new BusinessException(ResultCode.RTK_SN_CODE_NOT_EXIT);
|
|
@@ -122,6 +132,15 @@ public class InnerController extends BaseController {
|
|
|
if(StringUtils.isBlank(rtkSnCode)){
|
|
|
throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
|
}
|
|
|
+ if("aws".equals(CacheUtil.uploadType)){
|
|
|
+ RtkInfo rtkInfo = rtkInfoService.getByRtkSnCode(rtkSnCode);
|
|
|
+ if(rtkInfo == null){
|
|
|
+ throw new BusinessException(ResultCode.RTK_SN_CODE_NOT_EXIT);
|
|
|
+ }
|
|
|
+ String clientIP = ServletUtil.getClientIP(request);
|
|
|
+ rtkUseLogService.saveLog(rtkInfo,clientIP,cameraSn,1);
|
|
|
+ return ResultData.ok();
|
|
|
+ }
|
|
|
RtkDevice rtkDevice = rtkDeviceService.getByRtkSnCode(rtkSnCode);
|
|
|
if(rtkDevice == null){
|
|
|
throw new BusinessException(ResultCode.RTK_SN_CODE_NOT_EXIT);
|