|
@@ -88,8 +88,9 @@ public class InnerController extends BaseController {
|
|
|
/**
|
|
|
* 相机开启rtk获取账号
|
|
|
*/
|
|
|
- @GetMapping("/info/{rtkSnCode}")
|
|
|
- public synchronized ResultData info(@PathVariable String rtkSnCode){
|
|
|
+ @GetMapping("/info/{rtkSnCode}/{cameraSn}")
|
|
|
+ public synchronized ResultData info(@PathVariable String rtkSnCode,
|
|
|
+ @PathVariable String cameraSn){
|
|
|
if(StringUtils.isBlank(rtkSnCode)){
|
|
|
throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
|
}
|
|
@@ -108,15 +109,16 @@ public class InnerController extends BaseController {
|
|
|
BeanUtils.copyProperties(rtkAccount,rtkInfo);
|
|
|
}
|
|
|
String clientIP = ServletUtil.getClientIP(request);
|
|
|
- rtkUseLogService.saveLog(rtkInfo,clientIP,rtkAccountId);
|
|
|
+ rtkUseLogService.saveLog(rtkInfo,clientIP,rtkAccountId,cameraSn);
|
|
|
return ResultData.ok(rtkInfo);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 相机关闭rtk,回收账号
|
|
|
*/
|
|
|
- @GetMapping("/stop/{rtkSnCode}")
|
|
|
- public ResultData stop(@PathVariable String rtkSnCode){
|
|
|
+ @GetMapping("/stop/{rtkSnCode}/{cameraSn}")
|
|
|
+ public ResultData stop(@PathVariable String rtkSnCode,
|
|
|
+ @PathVariable String cameraSn){
|
|
|
if(StringUtils.isBlank(rtkSnCode)){
|
|
|
throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
|
}
|
|
@@ -125,7 +127,7 @@ public class InnerController extends BaseController {
|
|
|
throw new BusinessException(ResultCode.RTK_SN_CODE_NOT_EXIT);
|
|
|
}
|
|
|
String clientIP = ServletUtil.getClientIP(request);
|
|
|
- rtkAccountService.stop(rtkDevice,clientIP);
|
|
|
+ rtkAccountService.stop(rtkDevice,clientIP,cameraSn);
|
|
|
return ResultData.ok();
|
|
|
}
|
|
|
}
|