水库详情文件上传修改,闸阀与摄像头列表查询新增
parent
a7e5c33e8d
commit
11a5d61122
|
|
@ -3,17 +3,22 @@ package com.gunshi.project.xyt.controller;
|
||||||
import com.gunshi.core.result.R;
|
import com.gunshi.core.result.R;
|
||||||
import com.gunshi.project.xyt.model.AttResBase;
|
import com.gunshi.project.xyt.model.AttResBase;
|
||||||
import com.gunshi.project.xyt.service.AttResBaseService;
|
import com.gunshi.project.xyt.service.AttResBaseService;
|
||||||
|
import com.gunshi.project.xyt.service.FileAssociationsService;
|
||||||
import com.gunshi.project.xyt.validate.markers.Insert;
|
import com.gunshi.project.xyt.validate.markers.Insert;
|
||||||
import com.gunshi.project.xyt.validate.markers.Update;
|
import com.gunshi.project.xyt.validate.markers.Update;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 描述: 水库基本信息表
|
* 描述: 水库基本信息表
|
||||||
* author: xusan
|
* author: xusan
|
||||||
|
|
@ -27,31 +32,70 @@ public class AttResBaseController extends AbstractCommonFileController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private AttResBaseService service;
|
private AttResBaseService service;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private FileAssociationsService fileService;
|
||||||
|
|
||||||
@Operation(summary = "新增")
|
@Operation(summary = "新增")
|
||||||
@PostMapping("/insert")
|
@PostMapping("/insert")
|
||||||
public R<AttResBase> insert(@Validated(Insert.class) @RequestBody AttResBase dto) {
|
public R<AttResBase> insert(@Validated(Insert.class) @RequestBody AttResBase dto) {
|
||||||
|
if (Objects.nonNull(service.getById(dto.getResCode()))) {
|
||||||
|
throw new RuntimeException("当前编号已存在");
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(dto.getResName())){
|
||||||
|
if (service.lambdaQuery().eq(AttResBase::getResName,dto.getResName()).count() > 0) {
|
||||||
|
throw new RuntimeException("当前名称已存在");
|
||||||
|
}
|
||||||
|
}
|
||||||
boolean result = service.save(dto);
|
boolean result = service.save(dto);
|
||||||
|
if (result){
|
||||||
|
fileService.saveFile(dto.getFiles(), getGroupId(), dto.getResCode());
|
||||||
|
}
|
||||||
return R.ok(result ? dto : null);
|
return R.ok(result ? dto : null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "修改")
|
@Operation(summary = "修改")
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
public R<AttResBase> update(@Validated(Update.class) @RequestBody AttResBase dto) {
|
public R<AttResBase> update(@Validated(Update.class) @RequestBody AttResBase dto) {
|
||||||
|
if (Objects.isNull(service.getById(dto.getResCode()))) {
|
||||||
|
throw new RuntimeException("当前数据不存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(dto.getResName())){
|
||||||
|
if (service.lambdaQuery()
|
||||||
|
.eq(AttResBase::getResName,dto.getResName())
|
||||||
|
.ne(AttResBase::getResCode,dto.getResCode())
|
||||||
|
.count() > 0) {
|
||||||
|
throw new RuntimeException("当前名称已存在");
|
||||||
|
}
|
||||||
|
}
|
||||||
boolean result = service.updateById(dto);
|
boolean result = service.updateById(dto);
|
||||||
|
if (result){
|
||||||
|
fileService.saveFile(dto.getFiles(), getGroupId(), dto.getResCode());
|
||||||
|
}
|
||||||
return R.ok(result ? dto : null);
|
return R.ok(result ? dto : null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "删除")
|
@Operation(summary = "删除")
|
||||||
@GetMapping("/del/{id}")
|
@GetMapping("/del/{id}")
|
||||||
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
||||||
return R.ok(service.removeById(id));
|
if (Objects.isNull(service.getById(id))) {
|
||||||
|
throw new RuntimeException("当前数据不存在");
|
||||||
|
}
|
||||||
|
boolean data = service.removeById(id);
|
||||||
|
if (data){
|
||||||
|
fileService.deleteFile(getGroupId(),id.toString());
|
||||||
|
}
|
||||||
|
return R.ok(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "列表")
|
@Operation(summary = "列表")
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
public R<List<AttResBase>> list() {
|
public R<List<AttResBase>> list() {
|
||||||
return R.ok(service.lambdaQuery().list());
|
List<AttResBase> list = service.lambdaQuery().list();
|
||||||
|
if (CollectionUtils.isNotEmpty(list)){
|
||||||
|
list.forEach(o -> o.setFiles(fileService.getFiles(getGroupId(),o.getResCode())));
|
||||||
|
}
|
||||||
|
return R.ok(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "分页")
|
@Operation(summary = "分页")
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
package com.gunshi.project.xyt.controller;
|
package com.gunshi.project.xyt.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.gunshi.core.result.R;
|
import com.gunshi.core.result.R;
|
||||||
|
import com.gunshi.project.xyt.entity.so.GateValveCctvRelPage;
|
||||||
|
import com.gunshi.project.xyt.entity.vo.GateValveCctvRelVo;
|
||||||
import com.gunshi.project.xyt.model.GateValveCctvRel;
|
import com.gunshi.project.xyt.model.GateValveCctvRel;
|
||||||
import com.gunshi.project.xyt.service.GateValveCctvRelService;
|
import com.gunshi.project.xyt.service.GateValveCctvRelService;
|
||||||
import com.gunshi.project.xyt.validate.markers.Insert;
|
import com.gunshi.project.xyt.validate.markers.Insert;
|
||||||
|
|
@ -14,6 +17,8 @@ import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 描述: 闸阀关联视频点
|
* 描述: 闸阀关联视频点
|
||||||
* author: xusan
|
* author: xusan
|
||||||
|
|
@ -30,7 +35,13 @@ public class GateValveCctvRelController {
|
||||||
|
|
||||||
@Operation(summary = "新增")
|
@Operation(summary = "新增")
|
||||||
@PostMapping("/insert")
|
@PostMapping("/insert")
|
||||||
public R<GateValveCctvRel> insert(@Validated(Insert.class) @RequestBody GateValveCctvRel dto) {
|
public R<GateValveCctvRel> insert(@Validated(Insert.class)@RequestBody GateValveCctvRel dto) {
|
||||||
|
if (service.lambdaQuery()
|
||||||
|
.eq(GateValveCctvRel::getValveCode,dto.getValveCode())
|
||||||
|
.eq(GateValveCctvRel::getIndexCode,dto.getIndexCode())
|
||||||
|
.count() > 0) {
|
||||||
|
throw new RuntimeException("当前编号已关联");
|
||||||
|
}
|
||||||
boolean result = service.save(dto);
|
boolean result = service.save(dto);
|
||||||
return R.ok(result ? dto : null);
|
return R.ok(result ? dto : null);
|
||||||
}
|
}
|
||||||
|
|
@ -38,6 +49,16 @@ public class GateValveCctvRelController {
|
||||||
@Operation(summary = "修改")
|
@Operation(summary = "修改")
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
public R<GateValveCctvRel> update(@Validated(Update.class) @RequestBody GateValveCctvRel dto) {
|
public R<GateValveCctvRel> update(@Validated(Update.class) @RequestBody GateValveCctvRel dto) {
|
||||||
|
if (Objects.isNull(service.getById(dto.getId()))) {
|
||||||
|
throw new RuntimeException("当前数据不存在");
|
||||||
|
}
|
||||||
|
if (service.lambdaQuery()
|
||||||
|
.eq(GateValveCctvRel::getValveCode,dto.getValveCode())
|
||||||
|
.eq(GateValveCctvRel::getIndexCode,dto.getIndexCode())
|
||||||
|
.ne(GateValveCctvRel::getId,dto.getId())
|
||||||
|
.count() > 0) {
|
||||||
|
throw new RuntimeException("当前编号已关联");
|
||||||
|
}
|
||||||
boolean result = service.updateById(dto);
|
boolean result = service.updateById(dto);
|
||||||
return R.ok(result ? dto : null);
|
return R.ok(result ? dto : null);
|
||||||
}
|
}
|
||||||
|
|
@ -45,6 +66,9 @@ public class GateValveCctvRelController {
|
||||||
@Operation(summary = "删除")
|
@Operation(summary = "删除")
|
||||||
@GetMapping("/del/{id}")
|
@GetMapping("/del/{id}")
|
||||||
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
||||||
|
if (Objects.isNull(service.getById(id))) {
|
||||||
|
throw new RuntimeException("当前数据不存在");
|
||||||
|
}
|
||||||
return R.ok(service.removeById(id));
|
return R.ok(service.removeById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -56,8 +80,8 @@ public class GateValveCctvRelController {
|
||||||
|
|
||||||
@Operation(summary = "分页")
|
@Operation(summary = "分页")
|
||||||
@PostMapping("/page")
|
@PostMapping("/page")
|
||||||
public R<List<GateValveCctvRel>> page() {
|
public R<Page<GateValveCctvRelVo>> page(@RequestBody GateValveCctvRelPage page) {
|
||||||
return R.ok(service.page(null,null));
|
return R.ok(service.pages(page));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,72 @@
|
||||||
|
package com.gunshi.project.xyt.entity.enums;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2022/7/14 16:55
|
||||||
|
* 系统业务文件类型 对应 file_associations.type
|
||||||
|
*/
|
||||||
|
public enum SysFileType {
|
||||||
|
|
||||||
|
SFT000("0", "水库基本信息-工程基础信息-工程特性表"),
|
||||||
|
SFT001("1", "水库基本信息-设计图纸和资料"),
|
||||||
|
SFT099("99", "");
|
||||||
|
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
private SysFileType(String name, String value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Map<String, SysFileType> map() {
|
||||||
|
Map<String, SysFileType> map = new HashMap<>();
|
||||||
|
SysFileType[] values = SysFileType.values();
|
||||||
|
for (SysFileType e : values) {
|
||||||
|
map.put(e.getValue(), e);
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Map<String, SysFileType> mapName() {
|
||||||
|
Map<String, SysFileType> map = new HashMap<>();
|
||||||
|
SysFileType[] values = SysFileType.values();
|
||||||
|
for (SysFileType e : values) {
|
||||||
|
map.put(e.getName(), e);
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static SysFileType getByValue(String value) {
|
||||||
|
if (Objects.isNull(value)) return null;
|
||||||
|
return map().get(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static SysFileType getByName(String name) {
|
||||||
|
if (StringUtils.isEmpty(name)) return null;
|
||||||
|
return mapName().get(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.gunshi.project.xyt.entity.so;
|
||||||
|
|
||||||
|
import com.gunshi.project.xyt.entity.page.GenericPageParams;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:
|
||||||
|
* Created by XuSan on 2024/7/19.
|
||||||
|
*
|
||||||
|
* @author XuSan
|
||||||
|
* @version 1.0
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
public class GateValveCctvRelPage extends GenericPageParams {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 闸阀编号
|
||||||
|
*/
|
||||||
|
@Schema(description="闸阀编号名称")
|
||||||
|
private String valveName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频点
|
||||||
|
*/
|
||||||
|
@Schema(description="视频点名称")
|
||||||
|
private String indexName;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.gunshi.project.xyt.entity.vo;
|
||||||
|
|
||||||
|
import com.gunshi.project.xyt.model.GateValveCctvRel;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:
|
||||||
|
* Created by XuSan on 2024/7/19.
|
||||||
|
*
|
||||||
|
* @author XuSan
|
||||||
|
* @version 1.0
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
public class GateValveCctvRelVo extends GateValveCctvRel {
|
||||||
|
/**
|
||||||
|
* 闸阀名称
|
||||||
|
*/
|
||||||
|
@Schema(description="闸阀名称")
|
||||||
|
private String valveName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@Schema(description="摄像头id")
|
||||||
|
private Long indexId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 摄像头名称
|
||||||
|
*/
|
||||||
|
@Schema(description="摄像头名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,8 +1,13 @@
|
||||||
package com.gunshi.project.xyt.mapper;
|
package com.gunshi.project.xyt.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.gunshi.project.xyt.entity.so.GateValveCctvRelPage;
|
||||||
|
import com.gunshi.project.xyt.entity.vo.GateValveCctvRelVo;
|
||||||
import com.gunshi.project.xyt.model.GateValveCctvRel;
|
import com.gunshi.project.xyt.model.GateValveCctvRel;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 描述: 闸阀关联视频点
|
* 描述: 闸阀关联视频点
|
||||||
|
|
@ -12,4 +17,24 @@ import org.apache.ibatis.annotations.Mapper;
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface GateValveCctvRelMapper extends BaseMapper<GateValveCctvRel> {
|
public interface GateValveCctvRelMapper extends BaseMapper<GateValveCctvRel> {
|
||||||
|
|
||||||
|
@Select("""
|
||||||
|
<script>
|
||||||
|
select t.*,agv.valve_name,acb.id index_id,acb.name
|
||||||
|
from public.gate_valve_cctv_rel t
|
||||||
|
LEFT JOIN public.att_gate_valve agv ON t.valve_code = agv.valve_code
|
||||||
|
LEFT JOIN public.att_cctv_base acb ON t.index_code = acb.index_code
|
||||||
|
<where>
|
||||||
|
<if test="obj.valveName != null and obj.valveName !=''">
|
||||||
|
agv.valve_name LIKE concat('%',#{obj.valveName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="obj.indexName != null and obj.indexName !=''">
|
||||||
|
acb.name LIKE concat('%',#{obj.indexName},'%')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
<if test="obj.sortField != null and obj.sortField !=''">
|
||||||
|
order by t.${obj.sortField} asc
|
||||||
|
</if>
|
||||||
|
</script>
|
||||||
|
""")
|
||||||
|
Page<GateValveCctvRelVo> pages(@Param("page") Page<GateValveCctvRel> page,@Param("obj") GateValveCctvRelPage obj);
|
||||||
}
|
}
|
||||||
|
|
@ -488,6 +488,6 @@ public class AttResBase implements Serializable {
|
||||||
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@Schema(description = "文件id集合")
|
@Schema(description = "文件集合")
|
||||||
private List<String> fileIds;
|
private List<FileAssociations> files;
|
||||||
}
|
}
|
||||||
|
|
@ -87,6 +87,12 @@ public class FileAssociations implements Serializable {
|
||||||
private String del;
|
private String del;
|
||||||
|
|
||||||
|
|
||||||
|
@TableField(value = "type")
|
||||||
|
@Schema(description = "业务文件类型 /n 0:水库基本信息-工程基础信息-工程特性表," +
|
||||||
|
"/n 1:水库基本信息-设计图纸和资料")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@Schema(description = "文件路径")
|
@Schema(description = "文件路径")
|
||||||
private String filePath;
|
private String filePath;
|
||||||
|
|
|
||||||
|
|
@ -5,15 +5,14 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.gunshi.project.xyt.validate.markers.Insert;
|
||||||
import com.gunshi.core.dateformat.DateFormatString;
|
import com.gunshi.project.xyt.validate.markers.Update;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import jakarta.validation.constraints.Size;
|
import jakarta.validation.constraints.Size;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 描述: 闸阀关联视频点
|
* 描述: 闸阀关联视频点
|
||||||
|
|
@ -33,7 +32,7 @@ public class GateValveCctvRel implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableId(value="id", type= IdType.AUTO)
|
@TableId(value="id", type= IdType.AUTO)
|
||||||
@Schema(description="id")
|
@Schema(description="id")
|
||||||
@NotBlank(message = "id不能为空")
|
@NotBlank(message = "id不能为空", groups = {Update.class})
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -42,7 +41,7 @@ public class GateValveCctvRel implements Serializable {
|
||||||
@TableField(value="valve_code")
|
@TableField(value="valve_code")
|
||||||
@Schema(description="闸阀编号")
|
@Schema(description="闸阀编号")
|
||||||
@Size(max = 20,message = "闸阀编号最大长度要小于 20")
|
@Size(max = 20,message = "闸阀编号最大长度要小于 20")
|
||||||
@NotBlank(message = "闸阀编号不能为空")
|
@NotBlank(message = "闸阀编号不能为空", groups = {Insert.class,Update.class})
|
||||||
private String valveCode;
|
private String valveCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -51,7 +50,14 @@ public class GateValveCctvRel implements Serializable {
|
||||||
@TableField(value="index_code")
|
@TableField(value="index_code")
|
||||||
@Schema(description="视频点")
|
@Schema(description="视频点")
|
||||||
@Size(max = 150,message = "视频点最大长度要小于 150")
|
@Size(max = 150,message = "视频点最大长度要小于 150")
|
||||||
@NotBlank(message = "视频点不能为空")
|
@NotBlank(message = "视频点不能为空", groups = {Insert.class,Update.class})
|
||||||
private String indexCode;
|
private String indexCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(value="create_time")
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,14 +1,15 @@
|
||||||
package com.gunshi.project.xyt.service;
|
package com.gunshi.project.xyt.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.gunshi.project.xyt.entity.so.GateValveCctvRelPage;
|
||||||
|
import com.gunshi.project.xyt.entity.vo.GateValveCctvRelVo;
|
||||||
import com.gunshi.project.xyt.mapper.GateValveCctvRelMapper;
|
import com.gunshi.project.xyt.mapper.GateValveCctvRelMapper;
|
||||||
import com.gunshi.project.xyt.model.GateValveCctvRel;
|
import com.gunshi.project.xyt.model.GateValveCctvRel;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 描述: 闸阀关联视频点
|
* 描述: 闸阀关联视频点
|
||||||
* author: xusan
|
* author: xusan
|
||||||
|
|
@ -20,6 +21,9 @@ import java.util.Date;
|
||||||
public class GateValveCctvRelService extends ServiceImpl<GateValveCctvRelMapper, GateValveCctvRel>
|
public class GateValveCctvRelService extends ServiceImpl<GateValveCctvRelMapper, GateValveCctvRel>
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public Page<GateValveCctvRelVo> pages(GateValveCctvRelPage page){
|
||||||
|
return getBaseMapper().pages(page.getPageSo().toPage(), page);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue