设置信息时增加影像类型及影像类型描述字段
This commit is contained in:
parent
748067961f
commit
3c7f8a22d7
|
@ -112,6 +112,10 @@ public class ImageEntity extends AuditableEntity implements Serializable {
|
||||||
@TableField("image_type")
|
@TableField("image_type")
|
||||||
private String imageType;
|
private String imageType;
|
||||||
|
|
||||||
|
@ApiModelProperty("影像类型描述")
|
||||||
|
@TableField("image_type_label")
|
||||||
|
private String imageTypeLabel;
|
||||||
|
|
||||||
@ApiModelProperty("图片路径")
|
@ApiModelProperty("图片路径")
|
||||||
@TableField("image_path")
|
@TableField("image_path")
|
||||||
private String imagePath;
|
private String imagePath;
|
||||||
|
|
|
@ -63,6 +63,12 @@ public class ImageCollectReq implements Serializable {
|
||||||
@ApiModelProperty("来源")
|
@ApiModelProperty("来源")
|
||||||
private String imageSource;
|
private String imageSource;
|
||||||
|
|
||||||
|
@ApiModelProperty("图片类型")
|
||||||
|
private String imageType;
|
||||||
|
|
||||||
|
@ApiModelProperty("图片类型描述")
|
||||||
|
private String imageTypeLabel;
|
||||||
|
|
||||||
@ApiModelProperty("图像信息")
|
@ApiModelProperty("图像信息")
|
||||||
private List<ImageReq> imageList;
|
private List<ImageReq> imageList;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,4 +46,10 @@ public class ImageResp implements Serializable {
|
||||||
@ApiModelProperty("是否已审核,0未审核,1已审核")
|
@ApiModelProperty("是否已审核,0未审核,1已审核")
|
||||||
private Boolean reviewState;
|
private Boolean reviewState;
|
||||||
|
|
||||||
|
@ApiModelProperty("影像类型,枚举ImageTypeEnum")
|
||||||
|
private String imageType;
|
||||||
|
|
||||||
|
@ApiModelProperty("影像类型描述")
|
||||||
|
private String imageTypeLabel;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,6 +57,8 @@ public class ImageCollectServiceImpl extends ServiceImpl<ImageCollectMapper, Ima
|
||||||
imageList.forEach(image -> {
|
imageList.forEach(image -> {
|
||||||
image.setPartId(partId);
|
image.setPartId(partId);
|
||||||
image.setCollectId(imageCollect.getCollectId());
|
image.setCollectId(imageCollect.getCollectId());
|
||||||
|
image.setImageType(req.getImageType());
|
||||||
|
image.setImageTypeLabel(req.getImageTypeLabel());
|
||||||
String path = permPathPrefix + image.getImageName();
|
String path = permPathPrefix + image.getImageName();
|
||||||
File file = new File(temPathPrefix.concat(image.getImageName()));
|
File file = new File(temPathPrefix.concat(image.getImageName()));
|
||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
|
|
|
@ -77,7 +77,9 @@ public class ImageServiceImpl extends ServiceImpl<ImageMapper, ImageEntity> impl
|
||||||
resp.setAudioList(BeanUtil.copyToList(audioMap.get(resp.getImageId()), AudioFileInfoResp.class));
|
resp.setAudioList(BeanUtil.copyToList(audioMap.get(resp.getImageId()), AudioFileInfoResp.class));
|
||||||
resp.setWeatherLabel(WeatherEnum.getDescByCode(resp.getWeather()));
|
resp.setWeatherLabel(WeatherEnum.getDescByCode(resp.getWeather()));
|
||||||
resp.setShootingMethodLabel(ShootingMethodEnum.getDescByCode(resp.getShootingMethod()));
|
resp.setShootingMethodLabel(ShootingMethodEnum.getDescByCode(resp.getShootingMethod()));
|
||||||
|
if (StrUtil.isEmpty(resp.getImageTypeLabel())) {
|
||||||
resp.setImageTypeLabel(ImageTypeEnum.getDescByCode(resp.getImageType()));
|
resp.setImageTypeLabel(ImageTypeEnum.getDescByCode(resp.getImageType()));
|
||||||
|
}
|
||||||
resp.setImageSourceLabel(ImageSourceEnum.getDescByCode(resp.getImageSource()));
|
resp.setImageSourceLabel(ImageSourceEnum.getDescByCode(resp.getImageSource()));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -167,6 +169,8 @@ public class ImageServiceImpl extends ServiceImpl<ImageMapper, ImageEntity> impl
|
||||||
imageEntity.setImagePath(FilePathEnum.IMAGE_TEMP.getFileDownPath(path));
|
imageEntity.setImagePath(FilePathEnum.IMAGE_TEMP.getFileDownPath(path));
|
||||||
imageEntity.setPartId(partId);
|
imageEntity.setPartId(partId);
|
||||||
imageEntity.setCollectId(imageCollect.getCollectId());
|
imageEntity.setCollectId(imageCollect.getCollectId());
|
||||||
|
imageEntity.setImageType(collectReq.getImageType());
|
||||||
|
imageEntity.setImageTypeLabel(collectReq.getImageTypeLabel());
|
||||||
imageList.add(imageEntity);
|
imageList.add(imageEntity);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
SELECT
|
SELECT
|
||||||
i.image_id, i.image_name, i.part_id, p.part_name, i.image_resolution, i.focal_distance, i.shooting_time, i.camera_manufacturer,
|
i.image_id, i.image_name, i.part_id, p.part_name, i.image_resolution, i.focal_distance, i.shooting_time, i.camera_manufacturer,
|
||||||
i.camera_model, i.GPS, ic.weather, ic.humidness, CONCAT(ic.temperature_min, '℃', '~',temperature_max, '℃') AS temperature, ic.wind_level,
|
i.camera_model, i.GPS, ic.weather, ic.humidness, CONCAT(ic.temperature_min, '℃', '~',temperature_max, '℃') AS temperature, ic.wind_level,
|
||||||
ic.shooting_method, ic.shooting_distance,ic.collector_name, i.image_type, i.image_path, ic.image_source, i.review_state
|
ic.shooting_method, ic.shooting_distance,ic.collector_name, i.image_type, i.image_path, ic.image_source, i.review_state, i.image_type_label
|
||||||
FROM image i
|
FROM image i
|
||||||
LEFT JOIN image_collect ic ON i.collect_id = ic.collect_id
|
LEFT JOIN image_collect ic ON i.collect_id = ic.collect_id
|
||||||
LEFT JOIN part p ON i.part_id = p.part_id
|
LEFT JOIN part p ON i.part_id = p.part_id
|
||||||
|
@ -35,6 +35,8 @@
|
||||||
<result property="imageSize" column="image_size"></result>
|
<result property="imageSize" column="image_size"></result>
|
||||||
<result property="imageResolution" column="image_resolution"></result>
|
<result property="imageResolution" column="image_resolution"></result>
|
||||||
<result property="reviewState" column="review_state"></result>
|
<result property="reviewState" column="review_state"></result>
|
||||||
|
<result property="imageType" column="image_type"></result>
|
||||||
|
<result property="imageTypeLabel" column="image_type_label"></result>
|
||||||
<association property="imageExifInfo">
|
<association property="imageExifInfo">
|
||||||
<result property="imageWidth" column="image_width"></result>
|
<result property="imageWidth" column="image_width"></result>
|
||||||
<result property="imageHeight" column="image_height"></result>
|
<result property="imageHeight" column="image_height"></result>
|
||||||
|
@ -68,7 +70,7 @@
|
||||||
SELECT i.image_id, i.image_name, i.image_path, i.image_height, i.image_resolution, i.image_width, i.image_height, i.focal_distance,
|
SELECT i.image_id, i.image_name, i.image_path, i.image_height, i.image_resolution, i.image_width, i.image_height, i.focal_distance,
|
||||||
i.focal_distance35, i.x_resolution, i.y_resolution, i.resolution_units, i.shooting_time, i.camera_manufacturer, i.camera_model,
|
i.focal_distance35, i.x_resolution, i.y_resolution, i.resolution_units, i.shooting_time, i.camera_manufacturer, i.camera_model,
|
||||||
i.latitude, i.latitude, i.altitude, ic.collect_id, ic.weather, CONCAT(ic.temperature_min, '℃', '~',temperature_max, '℃') AS temperature,
|
i.latitude, i.latitude, i.altitude, ic.collect_id, ic.weather, CONCAT(ic.temperature_min, '℃', '~',temperature_max, '℃') AS temperature,
|
||||||
ic.wind_level, ic.shooting_method, ic.shooting_distance, ic.collector_name, ic.image_source, i.review_state
|
ic.wind_level, ic.shooting_method, ic.shooting_distance, ic.collector_name, ic.image_source, i.review_state, i.image_type, i.image_type_label
|
||||||
FROM image i
|
FROM image i
|
||||||
LEFT JOIN image_collect ic ON i.collect_id = ic.collect_id
|
LEFT JOIN image_collect ic ON i.collect_id = ic.collect_id
|
||||||
WHERE i.image_id = #{imageId}
|
WHERE i.image_id = #{imageId}
|
||||||
|
|
Loading…
Reference in New Issue