diff --git a/shapelight-admin/pom.xml b/shapelight-admin/pom.xml
index ccfade2..1721552 100644
--- a/shapelight-admin/pom.xml
+++ b/shapelight-admin/pom.xml
@@ -245,6 +245,15 @@
1.4.4
+
+ org.modelmapper
+ modelmapper
+ 3.1.0
+
+
+
+
+
diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/enter/vo/PeronType.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/enter/vo/PeronType.java
index 52d9d00..0c7edc7 100644
--- a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/enter/vo/PeronType.java
+++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/enter/vo/PeronType.java
@@ -8,6 +8,6 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
@NoArgsConstructor
public class PeronType {
- private int labelId;
+ private int type;
private String name;
}
diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/member/CqMemberController.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/member/CqMemberController.java
index c5f3271..d68fc12 100644
--- a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/member/CqMemberController.java
+++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/member/CqMemberController.java
@@ -65,16 +65,6 @@ public class CqMemberController {
// 创建分页对象
Page pageRequest = new Page<>(page, size);
- /* QueryWrapper queryWrapper = new QueryWrapper<>();
-
- // 假设你想按名字进行筛选(name 为数据库中的字段名)
- if (!unitName.isEmpty()){
- queryWrapper.eq("cell_name", unitName);
- }
-
- queryWrapper.orderByDesc("upload_time");*/
-
-
// 使用 MyBatis-Plus 提供的分页查询
IPage pageResult = cqMemberMapper.selectPage(pageRequest, null);
@@ -380,7 +370,7 @@ public class CqMemberController {
}else{
tenPersonEntity.setGender(2);
}
- tenPersonEntity.setIc(visitorDto.getIdCard());
+ tenPersonEntity.setIdCard(visitorDto.getIdCard());
tenPersonEntity.setMobile(visitorDto.getPhone());
tenPersonEntity.setOrgImageTemp(visitorDto.getFacePhotoUrl());
tenPersonEntity.setIsProtectDevice(visitorDto.getIsProtectDevice());
diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/CqSafeVideoController.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/CqSafeVideoController.java
index a69eac8..b363e0b 100644
--- a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/CqSafeVideoController.java
+++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/CqSafeVideoController.java
@@ -1,26 +1,22 @@
package net.shapelight.modules.iCq.controller.video;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
-import net.shapelight.common.config.MinioConfig;
import net.shapelight.common.utils.R;
import net.shapelight.modules.face.rtsp.RtspFrameGrabber;
import net.shapelight.modules.iCq.controller.video.dto.UpdateVideoDto;
import net.shapelight.modules.iCq.controller.video.dto.UploadVideoDto;
-import net.shapelight.modules.iCq.controller.video.vo.Unit;
import net.shapelight.modules.iCq.dal.dataobject.video.TenSafeVideoEntity;
import net.shapelight.modules.iCq.dal.mysql.video.CqFileMapper;
import net.shapelight.modules.iCq.dal.mysql.video.CqSafeVideoMapper;
+import net.shapelight.modules.iCq.service.video.CqSafeVideoServiceImpl;
+import net.shapelight.modules.ten.dao.TenCellDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
-import java.util.Date;
import java.util.List;
/**
@@ -32,114 +28,81 @@ import java.util.List;
@RequiredArgsConstructor
public class CqSafeVideoController {
- private static String BUCKET_NAME = "cqyt";
-
- private final MinioConfig minioConfig;
+ private final CqSafeVideoServiceImpl cqSafeVideoService;
private final CqSafeVideoMapper cqSafeVideoMapper;
private final CqFileMapper cqFileMapper;
+ private final TenCellDao cqCellMapper;
+
@Autowired
private RtspFrameGrabber rtspFrameGrabber;
- @GetMapping("/getTopUnits")
+
+ @GetMapping("/getCells")
@ApiOperation(value = "获取单位列表")
- public R getTopUnits() {
- List queryUnit = cqSafeVideoMapper.queryUnit();
- return R.ok().put("data", queryUnit);
+ public R getCells() {
+ return R.ok()
+ .put("data", cqSafeVideoService.getCellInfos())
+ .put("total", cqSafeVideoService.getCellInfos().size());
}
@PostMapping("/insert")
- public R insert(@RequestBody UploadVideoDto uploadVideoDto) throws IOException {
- TenSafeVideoEntity tenSafeVideoEntity = new TenSafeVideoEntity();
-
- tenSafeVideoEntity.setName(cqFileMapper.selectByFileId(uploadVideoDto.getFileId()).getFileName());
- /* tenSafeVideoEntity.setCellId(cqSafeVideoMapper.runTheNameById(uploadVideoDto.getUnitName()));
- tenSafeVideoEntity.setCellName(uploadVideoDto.getUnitName());*/
- tenSafeVideoEntity.setCellId(uploadVideoDto.getUnitId());
- tenSafeVideoEntity.setCellName(cqSafeVideoMapper.findTheNameById(uploadVideoDto.getUnitId()));
- tenSafeVideoEntity.setUploadId(uploadVideoDto.getUploaderId());
- tenSafeVideoEntity.setUploadName(uploadVideoDto.getUploader());
- tenSafeVideoEntity.setUploadTime(new Date());
- tenSafeVideoEntity.setUrl(cqFileMapper.selectByFileId(uploadVideoDto.getFileId()).getFileUrl());
- tenSafeVideoEntity.setPlayCount(0);
- tenSafeVideoEntity.setFileId(uploadVideoDto.getFileId());
-
- if (cqSafeVideoMapper.insert(tenSafeVideoEntity) == 1) {
+ @ApiOperation(value = "新增视频接口")
+ public R insert(@RequestBody UploadVideoDto uploadVideoDto) throws IOException {
+ if (cqSafeVideoService.insert(uploadVideoDto) == 1) {
return R.ok();
} else {
return R.error();
}
}
-
@GetMapping("/list")
+ @ApiOperation(value = "列表视频接口")
public R list(@RequestParam(defaultValue = "1") int page,
@RequestParam(defaultValue = "10") int size,
- String unitId) {
- // 创建分页对象
- Page pageRequest = new Page<>(page, size);
- QueryWrapper queryWrapper = new QueryWrapper<>();
- // 假设你想按名字进行筛选(name 为数据库中的字段名)
- if (unitId != null && !unitId.isEmpty()){
- queryWrapper.eq("cell_id", unitId);
- }
-
- queryWrapper.orderByDesc("upload_time");
-
-
- // 使用 MyBatis-Plus 提供的分页查询
- IPage pageResult = cqSafeVideoMapper.selectPage(pageRequest, queryWrapper);
-
- List list = pageResult.getRecords();
-
- /* for (TenSafeVideoEntity tenSafeVideoEntity : list) {
- tenSafeVideoEntity.setCellName(cqSafeVideoMapper.findsTheParentId(tenSafeVideoEntity.getCellId()) + "/" +
- tenSafeVideoEntity.getCellName());
- }*/
-
- return R.ok().put("data", list).put("total", pageResult.getTotal());
+ String cellId) {
+ List list = cqSafeVideoService.list(page, size, cellId);
+ return R.ok()
+ .put("data", list)
+ .put("total", list.size());
}
@DeleteMapping("/delete/{id}")
+ @ApiOperation(value = "删除视频接口")
public R delete(@PathVariable Long id) {
- if (cqSafeVideoMapper.deleteById(id) == 1) {
+ if (cqSafeVideoService.delete(id)) {
return R.ok();
- } else {
+ }else {
return R.error();
}
}
- //修改
- @PostMapping("/update")
+ @PutMapping("/update")
+ @ApiOperation(value = "更新视频接口")
public R update(@RequestBody UpdateVideoDto updateVideoDto) {
- TenSafeVideoEntity tenSafeVideoEntity = new TenSafeVideoEntity();
- tenSafeVideoEntity.setName(cqFileMapper.selectByFileId(updateVideoDto.getFileId()).getFileName());
- tenSafeVideoEntity.setId(updateVideoDto.getVideoId());
- /* tenSafeVideoEntity.setCellId(cqSafeVideoMapper.runTheNameById(updateVideoDto.getUnitName()));
- tenSafeVideoEntity.setCellName(updateVideoDto.getUnitName());*/
- tenSafeVideoEntity.setCellId(updateVideoDto.getUnitId());
- tenSafeVideoEntity.setCellName(cqSafeVideoMapper.findTheNameById(updateVideoDto.getUnitId()));
- tenSafeVideoEntity.setUploadTime(new Date());
- tenSafeVideoEntity.setUrl(cqFileMapper.selectByFileId(updateVideoDto.getFileId()).getFileUrl());
- tenSafeVideoEntity.setFileId(updateVideoDto.getFileId());
- if (cqSafeVideoMapper.updateById(tenSafeVideoEntity) == 1) {
+ if (cqSafeVideoService.update(updateVideoDto) == 1) {
return R.ok();
} else {
return R.error();
}
}
-
- @GetMapping("/inquireVideo")
+ @GetMapping("/inquireVideo")
+ @ApiOperation(value = "条件查询视频接口")
public R inquireVideo(@RequestParam(defaultValue = "1") int page,
@RequestParam(defaultValue = "10") int size,
- String unitId, String videoName, String uploader){
- System.out.println("uploader + 上传人 = " + uploader);
- List list = cqSafeVideoMapper.relatedQuery(unitId, videoName, uploader);
- return R.ok().put("data", list);
- }
+ @RequestParam(required = false) String cellId,
+ @RequestParam(required = false) String videoName,
+ @RequestParam(required = false) String uploadName){
+ List tenSafeVideoEntities =
+ cqSafeVideoService.inquireVideo(cellId, videoName, uploadName);
+ return R.ok()
+ .put("data", tenSafeVideoEntities)
+ .put("total",tenSafeVideoEntities.size());
+ }
+
@GetMapping("/singleFind")
public R singleFind(int videoId){
@@ -154,7 +117,6 @@ public class CqSafeVideoController {
return R.ok();
}
-
@PostMapping("/face/recognition")
public R aWatchStart(@RequestParam("image") MultipartFile image, @RequestParam String cellId) {
rtspFrameGrabber.recognition(image,cellId);
diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/dto/UpdateVideoDto.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/dto/UpdateVideoDto.java
index bf4bb3f..78eee6b 100644
--- a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/dto/UpdateVideoDto.java
+++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/dto/UpdateVideoDto.java
@@ -4,7 +4,16 @@ import lombok.Data;
@Data
public class UpdateVideoDto {
+ /**
+ * 文件id
+ */
private String fileId;
+ /**
+ * 视频id
+ */
private Long videoId;
- private String unitId;
+ /**
+ * 单位id
+ */
+ private Long cellId;
}
diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/dto/UploadVideoDto.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/dto/UploadVideoDto.java
index 8f7505b..ff11810 100644
--- a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/dto/UploadVideoDto.java
+++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/dto/UploadVideoDto.java
@@ -1,13 +1,29 @@
package net.shapelight.modules.iCq.controller.video.dto;
-import io.swagger.models.auth.In;
+import lombok.AllArgsConstructor;
import lombok.Data;
-import org.springframework.web.multipart.MultipartFile;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Accessors(chain = true)
public class UploadVideoDto {
+ /**
+ * 文件id
+ */
private String fileId;
- private String uploader;
- private Long uploaderId;
- private String unitId;
+ /**
+ * 上传人姓名
+ */
+ private String uploadName;
+ /**
+ * 上传人id
+ */
+ private Long uploadId;
+ /**
+ * 单位id
+ */
+ private Long cellId;
}
diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/dto/VideoQueryDto.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/dto/VideoQueryDto.java
new file mode 100644
index 0000000..a37b030
--- /dev/null
+++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/dto/VideoQueryDto.java
@@ -0,0 +1,26 @@
+package net.shapelight.modules.iCq.controller.video.dto;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Accessors(chain = true)
+public class VideoQueryDto {
+ /**
+ * 单位id
+ */
+ private String cellId;
+ /**
+ * 视频名称
+ */
+ private String videoName;
+ /**
+ * 上传人姓名
+ */
+ private String uploadName;
+
+}
diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/vo/Unit.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/vo/CellVo.java
similarity index 51%
rename from shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/vo/Unit.java
rename to shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/vo/CellVo.java
index 9637f7f..bd9d9eb 100644
--- a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/vo/Unit.java
+++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/video/vo/CellVo.java
@@ -1,14 +1,22 @@
package net.shapelight.modules.iCq.controller.video.vo;
+//前端查询部门返回Vo
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
-//单位返回Vo
@Data
@AllArgsConstructor
@NoArgsConstructor
-public class Unit {
- private String orgId;
+@Accessors(chain = true)
+public class CellVo {
+ /**
+ * 部门Id
+ */
+ private Long cellId;
+ /**
+ * 部门名称
+ */
private String name;
}
diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/dataobject/video/FileEntity.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/dataobject/video/FileEntity.java
index 30000c1..e872232 100644
--- a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/dataobject/video/FileEntity.java
+++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/dataobject/video/FileEntity.java
@@ -1,5 +1,7 @@
package net.shapelight.modules.iCq.dal.dataobject.video;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
@@ -15,9 +17,24 @@ import java.util.Date;
@TableName("ten_file")
public class FileEntity implements Serializable {
private static final long serialVersionUID = 1L;
+ /**
+ * 文件id
+ */
+ @TableId
private String fileId;
- private String fileName;
- private String fileUrl;
+ /**
+ * 文件名称
+ */
+ @TableField("file_name")
+ private String name;
+ /**
+ * 文件url
+ */
+ @TableField("file_url")
+ private String url;
+ /**
+ * 文件上传时间
+ */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date uploadTime;
}
diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/dataobject/video/TenSafeVideoEntity.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/dataobject/video/TenSafeVideoEntity.java
index e984806..c7e5ed9 100644
--- a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/dataobject/video/TenSafeVideoEntity.java
+++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/dataobject/video/TenSafeVideoEntity.java
@@ -30,7 +30,7 @@ public class TenSafeVideoEntity implements Serializable {
/**
* 单位ID
*/
- private String cellId;
+ private Long cellId;
/**
* 单位名称
diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/mysql/video/CqSafeVideoMapper.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/mysql/video/CqSafeVideoMapper.java
index 3dd8c32..b5f642f 100644
--- a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/mysql/video/CqSafeVideoMapper.java
+++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/mysql/video/CqSafeVideoMapper.java
@@ -2,41 +2,14 @@ package net.shapelight.modules.iCq.dal.mysql.video;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import net.shapelight.modules.iCq.controller.video.vo.Unit;
import net.shapelight.modules.iCq.dal.dataobject.video.TenSafeVideoEntity;
-import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
-import java.util.List;
-import java.util.Map;
-
@Mapper
public interface CqSafeVideoMapper extends BaseMapper {
- /**
- * 查询 单位 信息(名称 和 id)
- * @return
- */
- List queryUnit();
-
- /**
- * 根据单位id查询单位名称
- * @param unitName 单位名称
- * @return
- */
- Long runTheNameById(String unitName);
- //目前没用 明天测试 待删除
- String findsTheParentId(Long id);
- //目前没用 明天测试 待删除
- List queryHighestLevelUnit();
-
- //目前没用 明天测试 待删除
- List queryChildUnit(String name);
-
- List relatedQuery(String unitId, String videoName, String uploader);
-
- String findTheNameById(String unitId);
+ String findTheNameById(long cellId);
}
diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/service/video/CqSafeVideoService.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/service/video/CqSafeVideoService.java
index f900c1e..d2c37b8 100644
--- a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/service/video/CqSafeVideoService.java
+++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/service/video/CqSafeVideoService.java
@@ -1,4 +1,5 @@
package net.shapelight.modules.iCq.service.video;
public interface CqSafeVideoService {
+ //接口声明()
}
diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/service/video/CqSafeVideoServiceImpl.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/service/video/CqSafeVideoServiceImpl.java
new file mode 100644
index 0000000..c8b0058
--- /dev/null
+++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/service/video/CqSafeVideoServiceImpl.java
@@ -0,0 +1,108 @@
+package net.shapelight.modules.iCq.service.video;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.RequiredArgsConstructor;
+import net.shapelight.common.utils.R;
+import net.shapelight.modules.iCq.controller.video.dto.UpdateVideoDto;
+import net.shapelight.modules.iCq.controller.video.dto.UploadVideoDto;
+import net.shapelight.modules.iCq.controller.video.dto.VideoQueryDto;
+import net.shapelight.modules.iCq.controller.video.vo.CellVo;
+import net.shapelight.modules.iCq.dal.dataobject.video.FileEntity;
+import net.shapelight.modules.iCq.dal.dataobject.video.TenSafeVideoEntity;
+import net.shapelight.modules.iCq.dal.mysql.video.CqFileMapper;
+import net.shapelight.modules.iCq.dal.mysql.video.CqSafeVideoMapper;
+import net.shapelight.modules.ten.dao.TenCellDao;
+import net.shapelight.modules.ten.entity.TenCellEntity;
+import org.modelmapper.ModelMapper;
+import org.modelmapper.TypeMap;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Service
+@RequiredArgsConstructor
+public class CqSafeVideoServiceImpl {
+
+ private final TenCellDao cqCellMapper;
+
+ private final CqFileMapper cqFileMapper;
+
+ private final CqSafeVideoMapper cqSafeVideoMapper;
+
+ /**
+ * 获取部门信息
+ * @return
+ */
+ public List getCellInfos() {
+ return cqCellMapper.selectList(new QueryWrapper<>()).stream()
+ .map(cell -> {
+ CellVo cellVo = new CellVo();
+ BeanUtils.copyProperties(cell, cellVo);
+ return cellVo;
+ })
+ .collect(Collectors.toList());
+ }
+
+ public int insert(UploadVideoDto uploadVideoDto) {
+ TenSafeVideoEntity tenSafeVideoEntity = new TenSafeVideoEntity();
+ BeanUtils.copyProperties(uploadVideoDto, tenSafeVideoEntity);
+ BeanUtils.copyProperties(cqFileMapper.selectById(uploadVideoDto.getFileId()), tenSafeVideoEntity);
+ tenSafeVideoEntity.setCellName(cqCellMapper.selectOne(new QueryWrapper()
+ .select("name")
+ .eq("cell_id", uploadVideoDto.getCellId())).getName());
+ tenSafeVideoEntity.setPlayCount(0);
+ return cqSafeVideoMapper.insert(tenSafeVideoEntity);
+ }
+
+ public List list(int page, int size, String cellId) {
+ Page pageRequest = new Page<>(page, size);
+ QueryWrapper queryWrapper = new QueryWrapper<>();
+ if (cellId != null && !cellId.isEmpty()){
+ queryWrapper.eq("cell_id", cellId);
+ }
+ queryWrapper.orderByDesc("upload_time");
+ IPage pageResult = cqSafeVideoMapper.selectPage(pageRequest, queryWrapper);
+ return pageResult.getRecords();
+
+ }
+
+ public boolean delete(Long id) {
+ return (cqSafeVideoMapper.deleteById(id) == 1);
+ }
+
+ public int update(UpdateVideoDto updateVideoDto) {
+ TenSafeVideoEntity tenSafeVideoEntity = new TenSafeVideoEntity();
+ FileEntity fileEntity = cqFileMapper.selectById(updateVideoDto.getFileId());
+ BeanUtils.copyProperties(fileEntity, tenSafeVideoEntity);
+ tenSafeVideoEntity.setId(updateVideoDto.getVideoId());
+ tenSafeVideoEntity.setCellId(updateVideoDto.getCellId());
+ tenSafeVideoEntity.setCellName(cqCellMapper.selectById(updateVideoDto.getCellId()).getName());
+ tenSafeVideoEntity.setUploadTime(new Date());
+ return cqSafeVideoMapper.updateById(tenSafeVideoEntity);
+ }
+
+ public List inquireVideo(String cellId, String videoName, String uploadName) {
+ VideoQueryDto queryDto = new VideoQueryDto();
+ queryDto.setCellId(cellId)
+ .setVideoName(videoName)
+ .setUploadName(uploadName);
+ QueryWrapper queryWrapper = new QueryWrapper<>();
+ if (queryDto.getCellId() != null && !queryDto.getCellId().isEmpty()) {
+ queryWrapper.eq("cell_id", queryDto.getCellId());
+ }
+ if (queryDto.getVideoName() != null && !queryDto.getVideoName().isEmpty()) {
+ queryWrapper.like("name", queryDto.getVideoName());
+ }
+ if (queryDto.getUploadName() != null && !queryDto.getUploadName().isEmpty()) {
+ queryWrapper.eq("upload_name", queryDto.getUploadName());
+ }
+ queryWrapper.orderByDesc("upload_time");
+ return cqSafeVideoMapper.selectList(queryWrapper);
+ }
+}
diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenPersonController.java b/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenPersonController.java
index a27f3c4..4f1310c 100644
--- a/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenPersonController.java
+++ b/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenPersonController.java
@@ -262,6 +262,9 @@ public class TenPersonController extends AbstractController {
params.put("cellId", scope.getCellId().toString());
}
params.put("personType", Constant.PERSON_TYPE_GUEST);
+
+
+
PageUtils page = tenPersonService.queryPage(params);
// Date now = new Date();
// for (TenPersonEntity guest : (List)page.getList()) {
diff --git a/shapelight-admin/src/main/resources/mapper/iCq/CqSafeVideoMapper.xml b/shapelight-admin/src/main/resources/mapper/iCq/CqSafeVideoMapper.xml
index 8384f76..7ba27ff 100644
--- a/shapelight-admin/src/main/resources/mapper/iCq/CqSafeVideoMapper.xml
+++ b/shapelight-admin/src/main/resources/mapper/iCq/CqSafeVideoMapper.xml
@@ -3,64 +3,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file