diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/FrameRecordEntity.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/FrameRecordEntity.java new file mode 100644 index 0000000..90dead1 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/FrameRecordEntity.java @@ -0,0 +1,31 @@ +package com.hnac.hzims.operational.station.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.springblade.core.tenant.mp.TenantEntity; + + +/** + * @author ysj + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("hzims_station_frame_record") +public class FrameRecordEntity extends TenantEntity { + + @ApiModelProperty("站点ID") + private String stationId; + + @ApiModelProperty("站点名称") + private String stationName; + + @ApiModelProperty("实时画面保存配置ID,用逗号分割") + private String frameids; + + @ApiModelProperty("实时画面保存名称,用逗号分割") + private String frameNames; +} \ No newline at end of file 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 new file mode 100644 index 0000000..91e8902 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationFrameRecordController.java @@ -0,0 +1,49 @@ +package com.hnac.hzims.operational.station.controller; + +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzims.operational.station.entity.FrameRecordEntity; +import com.hnac.hzims.operational.station.entity.VideoRecordEntity; +import com.hnac.hzims.operational.station.service.FrameRecordService; +import com.hnac.hzims.operational.station.service.VideoRecordService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.tool.api.R; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; + + +/** + * @author ysj + */ +@RestController +@RequestMapping("/station/frameRecord") +@RequiredArgsConstructor +@Api(value = "站点实时画面保存记录", tags = "实时画面保存记录") +public class StationFrameRecordController extends BladeController { + + private final FrameRecordService frameRecordService; + + @PostMapping("/submit") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "新增或修改站点视频播放保存记录", notes = "传入VideoRecordEntity") + public R submit(@Valid @RequestBody FrameRecordEntity entity) { + return R.status(frameRecordService.saveOrUpdate(entity)); + } + + @GetMapping("/query") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "查询站点视频播放保存记录", notes = "传入VideoRecordEntity") + public R query(@RequestParam("stationId") String stationId, + @RequestParam("userId") String userId) { + return R.data(frameRecordService.getOne(Wrappers.lambdaQuery() + .eq(FrameRecordEntity::getStationId,stationId) + .eq(FrameRecordEntity::getCreateUser,userId) + )); + } + + +} \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/FrameRecordMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/FrameRecordMapper.java new file mode 100644 index 0000000..493ada6 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/FrameRecordMapper.java @@ -0,0 +1,12 @@ +package com.hnac.hzims.operational.station.mapper; + +import com.hnac.hzims.operational.station.entity.FrameRecordEntity; +import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; + + +/** + * @author ysj + */ +public interface FrameRecordMapper extends UserDataScopeBaseMapper { + +} \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/FrameRecordMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/FrameRecordMapper.xml new file mode 100644 index 0000000..df7fae3 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/FrameRecordMapper.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/FrameRecordService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/FrameRecordService.java new file mode 100644 index 0000000..f22ba35 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/FrameRecordService.java @@ -0,0 +1,10 @@ +package com.hnac.hzims.operational.station.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.hnac.hzims.operational.station.entity.FrameRecordEntity; + +/** + * @author ysj + */ +public interface FrameRecordService extends IService { +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/FrameRecordServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/FrameRecordServiceImpl.java new file mode 100644 index 0000000..99408ed --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/FrameRecordServiceImpl.java @@ -0,0 +1,22 @@ +package com.hnac.hzims.operational.station.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.hnac.hzims.operational.station.entity.FrameRecordEntity; +import com.hnac.hzims.operational.station.entity.VideoRecordEntity; +import com.hnac.hzims.operational.station.mapper.FrameRecordMapper; +import com.hnac.hzims.operational.station.mapper.VideoRecordMapper; +import com.hnac.hzims.operational.station.service.FrameRecordService; +import com.hnac.hzims.operational.station.service.VideoRecordService; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +/** + * @author 86187 + */ +@Service +@RequiredArgsConstructor +@Slf4j +public class FrameRecordServiceImpl extends ServiceImpl implements FrameRecordService { + +} \ No newline at end of file