图像管理 todo
This commit is contained in:
parent
546750e754
commit
6dfb965631
|
@ -134,6 +134,12 @@
|
||||||
<artifactId>fastjson</artifactId>
|
<artifactId>fastjson</artifactId>
|
||||||
<version>1.2.83</version>
|
<version>1.2.83</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!--读取照片EXIF信息-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.drewnoakes</groupId>
|
||||||
|
<artifactId>metadata-extractor</artifactId>
|
||||||
|
<version>2.15.0</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|
|
@ -1,20 +1,23 @@
|
||||||
package com.dite.znpt.domain.entity;
|
package com.dite.znpt.domain.entity;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import java.io.Serializable;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.dite.znpt.domain.AuditableEntity;
|
import com.dite.znpt.domain.AuditableEntity;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author huise23
|
* @author Bear.G
|
||||||
* @date 2025/04/24 13:44
|
* @date 2025/4/24/周四 13:15
|
||||||
* @Description: 图像信息表实体类
|
* @description
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ -22,56 +25,47 @@ import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
@ApiModel(value="ImageEntity对象", description="图像信息表")
|
@ApiModel(value="ImageEntity对象", description="图像信息表")
|
||||||
public class ImageEntity extends AuditableEntity implements Serializable {
|
public class ImageEntity extends AuditableEntity implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -60463872766900490L;
|
@Serial
|
||||||
|
private static final long serialVersionUID = -7702927820673158420L;
|
||||||
|
|
||||||
@ExcelProperty("图像id")
|
|
||||||
@ApiModelProperty("图像id")
|
@ApiModelProperty("图像id")
|
||||||
@TableId(value = "image_id", type = IdType.ASSIGN_UUID)
|
@TableId(value = "part_id", type = IdType.ASSIGN_UUID)
|
||||||
private Long imageId;
|
private String imageId;
|
||||||
|
|
||||||
@ExcelProperty("部件id")
|
|
||||||
@ApiModelProperty("部件id")
|
@ApiModelProperty("部件id")
|
||||||
@TableField("part_id")
|
@TableField("part_id")
|
||||||
private Long partId;
|
private String partId;
|
||||||
|
|
||||||
|
@ApiModelProperty("项目id")
|
||||||
|
@TableField("project_id")
|
||||||
|
private String projectId;
|
||||||
|
|
||||||
@ExcelProperty("机组id")
|
|
||||||
@ApiModelProperty("机组id")
|
@ApiModelProperty("机组id")
|
||||||
@TableField("turbine_id")
|
@TableField("turbine_id")
|
||||||
private Long turbineId;
|
private String turbineId;
|
||||||
|
|
||||||
@ExcelProperty("项目id")
|
|
||||||
@ApiModelProperty("项目id")
|
|
||||||
@TableField("project")
|
|
||||||
private Long project;
|
|
||||||
|
|
||||||
@ExcelProperty("图像名称")
|
|
||||||
@ApiModelProperty("图像名称")
|
@ApiModelProperty("图像名称")
|
||||||
@TableField("image_name")
|
@TableField("image_name")
|
||||||
private String imageName;
|
private String imageName;
|
||||||
|
|
||||||
@ExcelProperty("图像尺寸")
|
|
||||||
@ApiModelProperty("图像尺寸")
|
@ApiModelProperty("图像尺寸")
|
||||||
@TableField("image_size")
|
@TableField("image_size")
|
||||||
private String imageSize;
|
private String imageSize;
|
||||||
|
|
||||||
@ExcelProperty("焦距")
|
|
||||||
@ApiModelProperty("焦距")
|
@ApiModelProperty("焦距")
|
||||||
@TableField("focal_distance")
|
@TableField("focal_distance")
|
||||||
private String focalDistance;
|
private String focalDistance;
|
||||||
|
|
||||||
@ExcelProperty("拍摄时间")
|
|
||||||
@ApiModelProperty("拍摄时间")
|
@ApiModelProperty("拍摄时间")
|
||||||
@TableField("shooting_time")
|
@TableField("shooting_time")
|
||||||
private LocalDateTime shootingTime;
|
private LocalDateTime shootingTime;
|
||||||
|
|
||||||
@ExcelProperty("相机制造商")
|
|
||||||
@ApiModelProperty("相机制造商")
|
@ApiModelProperty("相机制造商")
|
||||||
@TableField("camera_manufacturer")
|
@TableField("camera_manufacturer")
|
||||||
private String cameraManufacturer;
|
private String cameraManufacturer;
|
||||||
|
|
||||||
@ExcelProperty("相机型号")
|
|
||||||
@ApiModelProperty("相机型号")
|
@ApiModelProperty("相机型号")
|
||||||
@TableField("camera_model")
|
@TableField("camera_model")
|
||||||
private String cameraModel;
|
private String cameraModel;
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -1,55 +1,19 @@
|
||||||
package com.dite.znpt.domain.vo;
|
package com.dite.znpt.domain.vo;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author huise23
|
* @author Bear.G
|
||||||
* @date 2025/04/24 13:44
|
* @date 2025/4/24/周四 14:18
|
||||||
* @Description: 图像信息请求实体
|
* @description
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ApiModel("图像信息列表请求实体")
|
@ApiModel("图像信息列表查询实体")
|
||||||
public class ImageListReq implements Serializable {
|
public class ImageListReq implements Serializable {
|
||||||
|
@Serial
|
||||||
private static final long serialVersionUID = 734848078850759056L;
|
private static final long serialVersionUID = 671014582625089979L;
|
||||||
|
|
||||||
@ApiModelProperty("查询关键字")
|
|
||||||
private String keyword;
|
|
||||||
|
|
||||||
@ApiModelProperty("图像信息Id")
|
|
||||||
private Long imageId;
|
|
||||||
|
|
||||||
@ApiModelProperty("部件id")
|
|
||||||
private Long partId;
|
|
||||||
|
|
||||||
@ApiModelProperty("机组id")
|
|
||||||
private Long turbineId;
|
|
||||||
|
|
||||||
@ApiModelProperty("项目id")
|
|
||||||
private Long project;
|
|
||||||
|
|
||||||
@ApiModelProperty("图像名称")
|
|
||||||
private String imageName;
|
|
||||||
|
|
||||||
@ApiModelProperty("图像尺寸")
|
|
||||||
private String imageSize;
|
|
||||||
|
|
||||||
@ApiModelProperty("焦距")
|
|
||||||
private String focalDistance;
|
|
||||||
|
|
||||||
@ApiModelProperty("拍摄时间")
|
|
||||||
private LocalDateTime shootingTime;
|
|
||||||
|
|
||||||
@ApiModelProperty("相机制造商")
|
|
||||||
private String cameraManufacturer;
|
|
||||||
|
|
||||||
@ApiModelProperty("相机型号")
|
|
||||||
private String cameraModel;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
package com.dite.znpt.domain.vo;
|
package com.dite.znpt.domain.vo;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import com.dite.znpt.domain.entity.ImageEntity;
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author huise23
|
* @author Bear.G
|
||||||
* @date 2025/04/24 13:44
|
* @date 2025/4/24/周四 14:16
|
||||||
* @Description: 图像信息响应实体
|
* @description
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@ApiModel("图像信息响应实体")
|
@ApiModel("图像信息响应实体")
|
||||||
public class ImageResp extends ImageEntity {
|
public class ImageResp implements Serializable {
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -5215414858454232077L;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,16 +4,16 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.dite.znpt.domain.entity.ImageEntity;
|
import com.dite.znpt.domain.entity.ImageEntity;
|
||||||
import com.dite.znpt.domain.vo.ImageListReq;
|
import com.dite.znpt.domain.vo.ImageListReq;
|
||||||
import com.dite.znpt.domain.vo.ImageResp;
|
import com.dite.znpt.domain.vo.ImageResp;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import com.dite.znpt.domain.vo.PartListReq;
|
||||||
|
import com.dite.znpt.domain.vo.PartResp;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author huise23
|
* @author Bear.G
|
||||||
* @date 2025/04/24 13:44
|
* @date 2025/4/24/周四 13:17
|
||||||
* @Description: 图像信息表数据库访问层
|
* @description
|
||||||
*/
|
*/
|
||||||
public interface ImageMapper extends BaseMapper<ImageEntity> {
|
public interface ImageMapper extends BaseMapper<ImageEntity> {
|
||||||
List<ImageResp> queryBySelective(ImageListReq imageReq);
|
List<ImageResp> queryBySelective(ImageListReq req);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,57 +8,11 @@ import com.dite.znpt.domain.vo.ImageResp;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author huise23
|
* @author Bear.G
|
||||||
* @date 2025/04/24 13:44
|
* @date 2025/4/24/周四 13:14
|
||||||
* @Description: 图像信息表服务接口
|
* @description
|
||||||
*/
|
*/
|
||||||
public interface ImageService extends IService<ImageEntity> {
|
public interface ImageService extends IService<ImageEntity> {
|
||||||
|
|
||||||
/**
|
List<ImageResp> selectList(ImageListReq req);
|
||||||
* 功能描述:查询图像信息列表
|
|
||||||
*
|
|
||||||
* @param imageReq 图像信息
|
|
||||||
* @return {@link List }<{@link ImageEntity }>
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/24 13:44
|
|
||||||
**/
|
|
||||||
List<ImageResp> selectList(ImageListReq imageReq);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:查询单条图像信息
|
|
||||||
*
|
|
||||||
* @param imageId 图像信息Id
|
|
||||||
* @return {@link ImageResp }
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/24 13:44
|
|
||||||
**/
|
|
||||||
ImageResp selectById(Long imageId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:新增图像信息
|
|
||||||
*
|
|
||||||
* @param image 图像信息
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/24 13:44
|
|
||||||
**/
|
|
||||||
void saveData(ImageEntity image);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:更新图像信息
|
|
||||||
*
|
|
||||||
* @param image 图像信息
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/24 13:44
|
|
||||||
**/
|
|
||||||
void updateData(ImageEntity image);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:删除图像信息
|
|
||||||
*
|
|
||||||
* @param imageId 图像信息Id
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/24 13:44
|
|
||||||
**/
|
|
||||||
void deleteById(Long imageId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,96 +4,25 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.dite.znpt.domain.entity.ImageEntity;
|
import com.dite.znpt.domain.entity.ImageEntity;
|
||||||
import com.dite.znpt.domain.vo.ImageListReq;
|
import com.dite.znpt.domain.vo.ImageListReq;
|
||||||
import com.dite.znpt.domain.vo.ImageResp;
|
import com.dite.znpt.domain.vo.ImageResp;
|
||||||
import com.dite.znpt.service.ImageService;
|
|
||||||
import com.dite.znpt.mapper.ImageMapper;
|
import com.dite.znpt.mapper.ImageMapper;
|
||||||
import org.springframework.stereotype.Service;
|
import com.dite.znpt.service.ImageService;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import com.dite.znpt.util.PageUtil;
|
import com.dite.znpt.util.PageUtil;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author huise23
|
* @author Bear.G
|
||||||
* @date 2025/04/24 13:44
|
* @date 2025/4/24/周四 13:23
|
||||||
* @Description: 图像信息表服务实现类
|
* @description
|
||||||
*/
|
*/
|
||||||
@Service
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class ImageServiceImpl extends ServiceImpl<ImageMapper, ImageEntity> implements ImageService {
|
public class ImageServiceImpl extends ServiceImpl<ImageMapper, ImageEntity> implements ImageService {
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:查询图像信息列表
|
|
||||||
*
|
|
||||||
* @param imageReq 图像信息信息
|
|
||||||
* @return {@link List }<{@link ImageResp }>
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/24 13:44
|
|
||||||
**/
|
|
||||||
@Override
|
@Override
|
||||||
public List<ImageResp> selectList(ImageListReq imageReq) {
|
public List<ImageResp> selectList(ImageListReq req) {
|
||||||
PageUtil.startPage();
|
PageUtil.startPage();
|
||||||
List<ImageResp> imageList= this.baseMapper.queryBySelective(imageReq);
|
List<ImageResp> imageList= this.baseMapper.queryBySelective(req);
|
||||||
imageList.forEach(resp -> {
|
imageList.forEach(resp -> {
|
||||||
|
|
||||||
});
|
});
|
||||||
return imageList;
|
return imageList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:查询单条图像信息
|
|
||||||
*
|
|
||||||
* @param imageId 图像信息Id
|
|
||||||
* @return {@link ImageResp }
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/24 13:44
|
|
||||||
**/
|
|
||||||
@Override
|
|
||||||
public ImageResp selectById(Long imageId) {
|
|
||||||
ImageListReq imageReq = new ImageListReq();
|
|
||||||
imageReq.setImageId(imageId);
|
|
||||||
|
|
||||||
List<ImageResp> list = selectList(imageReq);
|
|
||||||
return list.isEmpty() ? CollUtil.getFirst(list) : new ImageResp();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:新增图像信息
|
|
||||||
*
|
|
||||||
* @param image 图像信息
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/24 13:44
|
|
||||||
**/
|
|
||||||
@Override
|
|
||||||
public void saveData(ImageEntity image) {
|
|
||||||
// todo 校验
|
|
||||||
save(image);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:更新图像信息
|
|
||||||
*
|
|
||||||
* @param image 图像信息
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/24 13:44
|
|
||||||
**/
|
|
||||||
@Override
|
|
||||||
public void updateData(ImageEntity image) {
|
|
||||||
// todo 校验
|
|
||||||
updateById(image);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:删除图像信息
|
|
||||||
*
|
|
||||||
* @param imageId 图像信息Id
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/24 13:44
|
|
||||||
**/
|
|
||||||
@Override
|
|
||||||
public void deleteById(Long imageId) {
|
|
||||||
// todo 校验
|
|
||||||
removeById(imageId);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,69 @@
|
||||||
|
package com.dite.znpt.util;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import com.drew.imaging.ImageMetadataReader;
|
||||||
|
import com.drew.metadata.Directory;
|
||||||
|
import com.drew.metadata.Metadata;
|
||||||
|
import com.drew.metadata.Tag;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Bear.G
|
||||||
|
* @date 2025/4/24/周四 14:10
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
public class EXIFUtil {
|
||||||
|
|
||||||
|
public static void main(String[] args) throws Exception {
|
||||||
|
File file = new File("C:\\Users\\Administrator\\Desktop\\水杯.jpg");
|
||||||
|
printImageTags(file);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 读取照片里面的信息
|
||||||
|
*/
|
||||||
|
public static JSONObject printImageTags(File file) throws Exception {
|
||||||
|
Metadata metadata = ImageMetadataReader.readMetadata(file);
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
String lat = "";
|
||||||
|
String log = "";
|
||||||
|
for (Directory directory : metadata.getDirectories()) {
|
||||||
|
for (Tag tag : directory.getTags()) {
|
||||||
|
// 标签名
|
||||||
|
String tagName = tag.getTagName();
|
||||||
|
// 标签信息
|
||||||
|
String desc = tag.getDescription();
|
||||||
|
System.out.println(tagName + "=" + desc);
|
||||||
|
switch (tagName) {
|
||||||
|
// 经度
|
||||||
|
case "GPS Longitude":
|
||||||
|
lat = pointToLatlong(desc);
|
||||||
|
jsonObject.put(tagName, lat);
|
||||||
|
break;
|
||||||
|
// 纬度
|
||||||
|
case "GPS Latitude":
|
||||||
|
log = pointToLatlong(desc);
|
||||||
|
jsonObject.put(tagName, log);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
jsonObject.put(tagName, desc);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
System.out.println("**********" + jsonObject.toString());
|
||||||
|
return jsonObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 经纬度坐标格式转换(* °转十进制格式)
|
||||||
|
* @param point
|
||||||
|
*/
|
||||||
|
public static String pointToLatlong(String point) {
|
||||||
|
Double du = Double.parseDouble(point.substring(0, point.indexOf("°")).trim());
|
||||||
|
Double fen = Double.parseDouble(point.substring(point.indexOf("°") + 1, point.indexOf("'")).trim());
|
||||||
|
Double miao = Double.parseDouble(point.substring(point.indexOf("'") + 1, point.indexOf("\"")).trim());
|
||||||
|
Double duStr = du + fen / 60 + miao / 60 / 60;
|
||||||
|
return duStr.toString();
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,11 +1,8 @@
|
||||||
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.dite.znpt.mapper.ImageMapper">
|
<mapper namespace="com.dite.znpt.mapper.ImageMapper">
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
a.image_id, a.part_id, a.turbine_id, a.project,
|
a.image, a.part_id, a.turbine_id, a.project_id, a.image_name, a.image_size, a.focal_distance, a.shooting_time, a.camera_manufacture, a.camera_model
|
||||||
a.image_name, a.image_size, a.focal_distance, a.shooting_time,
|
|
||||||
a.camera_manufacturer, a.camera_model
|
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="queryBySelective" resultType="com.dite.znpt.domain.vo.ImageResp">
|
<select id="queryBySelective" resultType="com.dite.znpt.domain.vo.ImageResp">
|
||||||
|
@ -14,39 +11,8 @@
|
||||||
from image a
|
from image a
|
||||||
<where>
|
<where>
|
||||||
<if test="keyword != null and keyword != ''">
|
<if test="keyword != null and keyword != ''">
|
||||||
# and (a.TODO like concat('%', #{keyword,jdbcType=VARCHAR}, '%') or a.TODO like concat('%', #{keyword,jdbcType=VARCHAR}, '%'))
|
and a.image_name like concat('%', #{keyword,jdbcType=VARCHAR}, '%')
|
||||||
</if>
|
|
||||||
<if test="imageId != null">
|
|
||||||
and a.image_id = #{imageId}
|
|
||||||
</if>
|
|
||||||
<if test="partId != null">
|
|
||||||
and a.part_id = #{partId}
|
|
||||||
</if>
|
|
||||||
<if test="turbineId != null">
|
|
||||||
and a.turbine_id = #{turbineId}
|
|
||||||
</if>
|
|
||||||
<if test="project != null">
|
|
||||||
and a.project = #{project}
|
|
||||||
</if>
|
|
||||||
<if test="imageName != null and imageName != ''">
|
|
||||||
and a.image_name like concat ('%', #{imageName}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="imageSize != null and imageSize != ''">
|
|
||||||
and a.image_size like concat ('%', #{imageSize}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="focalDistance != null and focalDistance != ''">
|
|
||||||
and a.focal_distance like concat ('%', #{focalDistance}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="shootingTime != null">
|
|
||||||
and a.shooting_time = #{shootingTime}
|
|
||||||
</if>
|
|
||||||
<if test="cameraManufacturer != null and cameraManufacturer != ''">
|
|
||||||
and a.camera_manufacturer like concat ('%', #{cameraManufacturer}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="cameraModel != null and cameraModel != ''">
|
|
||||||
and a.camera_model like concat ('%', #{cameraModel}, '%')
|
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.dite.znpt.web.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.dite.znpt.domain.PageResult;
|
||||||
|
import com.dite.znpt.domain.vo.ImageListReq;
|
||||||
|
import com.dite.znpt.domain.vo.ImageResp;
|
||||||
|
import com.dite.znpt.service.ImageService;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Bear.G
|
||||||
|
* @date 2025/4/24/周四 12:46
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
public class ImageController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ImageService imageService;
|
||||||
|
|
||||||
|
@ApiOperation(value = "分页查询图像列表", httpMethod = "GET")
|
||||||
|
@GetMapping("/page")
|
||||||
|
public PageResult<ImageResp> list(ImageListReq req) {
|
||||||
|
return PageResult.ok(imageService.selectList(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
server:
|
server:
|
||||||
# 服务器的HTTP端口,默认为8080
|
# 服务器的HTTP端口,默认为8080
|
||||||
port: 8080
|
port: 8888
|
||||||
|
|
||||||
# 数据源配置
|
# 数据源配置
|
||||||
spring:
|
spring:
|
||||||
|
@ -10,7 +10,7 @@ spring:
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://39.99.201.243:3306/test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://39.99.201.243:3306/test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: root
|
username: root
|
||||||
password: h67&E98HS8^6
|
password: BUw8YW6%@^8q
|
||||||
druid:
|
druid:
|
||||||
# 初始连接数
|
# 初始连接数
|
||||||
initialSize: 5
|
initialSize: 5
|
||||||
|
@ -59,11 +59,16 @@ spring:
|
||||||
max-wait: 3000
|
max-wait: 3000
|
||||||
host: 39.99.201.243
|
host: 39.99.201.243
|
||||||
port: 6379
|
port: 6379
|
||||||
password: yfeng@123
|
password: diTeZn@123
|
||||||
timeout: 3000
|
timeout: 3000
|
||||||
# 0 gaea系统,3 gaea-dev/gaea-test系统,4 znpt开发,5 znpt测试 6 znpt生产
|
# 0 gaea系统,3 gaea-dev/gaea-test系统,4 znpt开发,5 znpt测试 6 znpt生产
|
||||||
database: 4
|
database: 4
|
||||||
|
# mq 配置
|
||||||
|
rabbitmq:
|
||||||
|
host: 39.99.201.243
|
||||||
|
port: 3389
|
||||||
|
username: dite
|
||||||
|
password: diTezN@123
|
||||||
## MINIO配置
|
## MINIO配置
|
||||||
#minio:
|
#minio:
|
||||||
# url: http://10.20.32.11:9000
|
# url: http://10.20.32.11:9000
|
||||||
|
@ -80,7 +85,7 @@ spring:
|
||||||
|
|
||||||
sip-config:
|
sip-config:
|
||||||
name: 信令服务
|
name: 信令服务
|
||||||
ip: 10.17.12.203
|
ip: 192.168.0.207
|
||||||
port: 1074
|
port: 1074
|
||||||
charset: gb2312
|
charset: gb2312
|
||||||
domain: 3402000000
|
domain: 3402000000
|
||||||
|
@ -96,17 +101,17 @@ zlm-config:
|
||||||
# 公网ip
|
# 公网ip
|
||||||
publicHost:
|
publicHost:
|
||||||
# 接口ip
|
# 接口ip
|
||||||
apiHost: 10.17.12.203
|
apiHost: 192.168.0.207
|
||||||
# 接口端口
|
# 接口端口
|
||||||
apiPort: 30186
|
apiPort: 8080
|
||||||
# 密钥
|
# 密钥
|
||||||
secretKey: JvVotkdN01y4qZHlrJsdq4gD7n9rK6wV
|
secretKey: 6Q76ivvVOQDsnnfOSKbtVzcYpbgy4n1G
|
||||||
# 流id前缀
|
# 流id前缀
|
||||||
streamPrefix:
|
streamPrefix:
|
||||||
# rtp ip
|
# rtp ip
|
||||||
rtpHost: 10.17.12.203
|
rtpHost: 10.17.12.203
|
||||||
# rtp 端口
|
# rtp 端口
|
||||||
rtpPort: 30186
|
rtpPort: 8080
|
||||||
# 动态端口起始值
|
# 动态端口起始值
|
||||||
dynamicPortStart: 30150
|
dynamicPortStart: 30150
|
||||||
# 动态端口结束值
|
# 动态端口结束值
|
||||||
|
|
Loading…
Reference in New Issue