编号:ZSSAC-163 描述:修改文件上传接口

This commit is contained in:
pengren 2024-04-16 09:45:04 +08:00
parent 2f77f047a5
commit b5d583e9bc
2 changed files with 13 additions and 0 deletions

View File

@ -136,6 +136,7 @@ public class SysOssController extends BaseController
throw new FileSizeLimitExceededException(defaultMaxSize / 1024 / 1024); throw new FileSizeLimitExceededException(defaultMaxSize / 1024 / 1024);
} }
SysOss oss = sysOssService.upload(file); SysOss oss = sysOssService.upload(file);
oss.setSize(file.getSize());
return R.ok(oss); return R.ok(oss);
} }

View File

@ -47,6 +47,10 @@ public class SysOss extends BaseEntity
@Excel(name = "服务商") @Excel(name = "服务商")
private String service; private String service;
/** 文件大小 */
@Excel(name = "文件大小")
private Long size;
public void setId(String id) public void setId(String id)
{ {
this.id = id; this.id = id;
@ -119,6 +123,13 @@ public class SysOss extends BaseEntity
{ {
return service; return service;
} }
public Long getSize() {
return size;
}
public void setSize(Long size) {
this.size = size;
}
@Override @Override
public String toString() { public String toString() {
@ -135,6 +146,7 @@ public class SysOss extends BaseEntity
.append("updateTime", getUpdateTime()) .append("updateTime", getUpdateTime())
.append("updateBy", getUpdateBy()) .append("updateBy", getUpdateBy())
.append("service", getService()) .append("service", getService())
.append("size",getSize())
.toString(); .toString();
} }
} }