yang_shj
3 months ago
6 changed files with 130 additions and 0 deletions
@ -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; |
||||||
|
} |
@ -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.<FrameRecordEntity>lambdaQuery() |
||||||
|
.eq(FrameRecordEntity::getStationId,stationId) |
||||||
|
.eq(FrameRecordEntity::getCreateUser,userId) |
||||||
|
)); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
} |
@ -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<FrameRecordEntity> { |
||||||
|
|
||||||
|
} |
@ -0,0 +1,6 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||||
|
<mapper namespace="com.hnac.hzims.operational.station.mapper.FrameRecordMapper"> |
||||||
|
|
||||||
|
|
||||||
|
</mapper> |
@ -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<FrameRecordEntity> { |
||||||
|
} |
@ -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<FrameRecordMapper, FrameRecordEntity> implements FrameRecordService { |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue