diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationFrameRecordController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationFrameRecordController.java index 482c337..7af76ec 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationFrameRecordController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationFrameRecordController.java @@ -11,6 +11,7 @@ import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.ObjectUtil; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; @@ -39,10 +40,14 @@ public class StationFrameRecordController extends BladeController { @ApiOperation(value = "查询站点视频播放保存记录", notes = "传入VideoRecordEntity") public R query(@RequestParam("stationId") String stationId, @RequestParam("userId") String userId) { - return R.data(frameRecordService.getOne(Wrappers.lambdaQuery() + FrameRecordEntity frameRecord = frameRecordService.getOne(Wrappers.lambdaQuery() .eq(FrameRecordEntity::getStationId,stationId) .eq(FrameRecordEntity::getCreateUser,userId) - )); + ); + if(ObjectUtil.isEmpty(frameRecord)){ + return R.status(true); + } + return R.data(frameRecord); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoRecordController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoRecordController.java index 722dc2c..878aca0 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoRecordController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoRecordController.java @@ -9,6 +9,7 @@ import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.ObjectUtil; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; @@ -37,10 +38,14 @@ public class StationVideoRecordController extends BladeController { @ApiOperation(value = "查询站点视频播放保存记录", notes = "传入VideoRecordEntity") public R query(@RequestParam("stationId") String stationId, @RequestParam("userId") String userId) { - return R.data(videoRecordService.getOne(Wrappers.lambdaQuery() + VideoRecordEntity videoRecord = videoRecordService.getOne(Wrappers.lambdaQuery() .eq(VideoRecordEntity::getStationId,stationId) .eq(VideoRecordEntity::getCreateUser,userId) - )); + ); + if(ObjectUtil.isEmpty(videoRecord)){ + return R.status(true); + } + return R.data(videoRecord); }