feat(后端): 联调修改9
parent
1c8325d05f
commit
c1ddd33cf4
|
@ -167,7 +167,7 @@ public class FileChunkController {
|
|||
ResponseEntity<Boolean> responseEntity = restTemplate.exchange(url, HttpMethod.GET, null, Boolean.class);
|
||||
log.info("请求bt创建接口返回: {}", JSONUtil.toJsonStr(responseEntity));
|
||||
HttpStatus statusCode = responseEntity.getStatusCode();
|
||||
if (statusCode != HttpStatus.OK) {
|
||||
if (statusCode == HttpStatus.OK) {
|
||||
boolean result = Boolean.TRUE.equals(responseEntity.getBody());
|
||||
if (result) {
|
||||
log.info("请求bt创建接口成功");
|
||||
|
|
|
@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @TableName image
|
||||
|
@ -70,6 +71,11 @@ public class ImageRes implements Serializable {
|
|||
@ApiModelProperty("镜像存储路径")
|
||||
@JsonProperty("storage_path")
|
||||
private String storagePath;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
@JsonProperty("create_time")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
|
|
@ -119,8 +119,13 @@ public class ImageServiceImpl extends ServiceImpl<ImageMapper, Image>
|
|||
return Result.successResult();
|
||||
}
|
||||
} else {
|
||||
int deleted = imageMapper.deleteById(deleteIdReq.getId());
|
||||
log.info("文件不存在,镜像删除insert:{}", deleted);
|
||||
if (deleted == 1) {
|
||||
return Result.successResult();
|
||||
}
|
||||
log.warn("文件不存在,无需删除: {}", filePath);
|
||||
return Result.errorResultMessage(BaseErrorCode.HTTP_ERROR_CODE_500, "文件不存在,无需删除");
|
||||
return Result.successResult();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
log.error("删除文件失败: {}", e.getMessage(), e);
|
||||
|
|
Loading…
Reference in New Issue