Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
This commit is contained in:
+5
-5
@@ -85,11 +85,11 @@ public class JeroBootExceptionHandler {
|
|||||||
/**
|
/**
|
||||||
* spring默认上传大小100MB 超出大小捕获异常MaxUploadSizeExceededException
|
* spring默认上传大小100MB 超出大小捕获异常MaxUploadSizeExceededException
|
||||||
*/
|
*/
|
||||||
@ExceptionHandler(MaxUploadSizeExceededException.class)
|
// @ExceptionHandler(MaxUploadSizeExceededException.class)
|
||||||
public Result<?> handleMaxUploadSizeExceededException(MaxUploadSizeExceededException e) {
|
// public Result<?> handleMaxUploadSizeExceededException(MaxUploadSizeExceededException e) {
|
||||||
log.error(e.getMessage(), e);
|
// log.error(e.getMessage(), e);
|
||||||
return Result.error("文件大小超出100MB限制, 请压缩或降低文件质量! ");
|
// return Result.error("文件大小超出100MB限制, 请压缩或降低文件质量! ");
|
||||||
}
|
// }
|
||||||
|
|
||||||
@ExceptionHandler(DataIntegrityViolationException.class)
|
@ExceptionHandler(DataIntegrityViolationException.class)
|
||||||
public Result<?> handleDataIntegrityViolationException(DataIntegrityViolationException e) {
|
public Result<?> handleDataIntegrityViolationException(DataIntegrityViolationException e) {
|
||||||
|
|||||||
+27
-27
@@ -72,15 +72,15 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
|||||||
public OSSFile uploadLocal(MultipartFile mf, String bizPath, String state, String cut) {
|
public OSSFile uploadLocal(MultipartFile mf, String bizPath, String state, String cut) {
|
||||||
|
|
||||||
//处理文件大小,大于100M抛出异常
|
//处理文件大小,大于100M抛出异常
|
||||||
long fileSize = mf.getSize() / 1024 / 1024;
|
// long fileSize = mf.getSize() / 1024 / 1024;
|
||||||
String originalFilename = mf.getOriginalFilename();
|
// String originalFilename = mf.getOriginalFilename();
|
||||||
if (fileSize >= 100) {
|
// if (fileSize >= 100) {
|
||||||
if (cut.equals(CutEnum.CN.getValue())) {
|
// if (cut.equals(CutEnum.CN.getValue())) {
|
||||||
throw new JeroBootException(originalFilename + "文件大小超出100MB, 请压缩或降低文件质量!");
|
// throw new JeroBootException(originalFilename + "文件大小超出100MB, 请压缩或降低文件质量!");
|
||||||
} else {
|
// } else {
|
||||||
throw new JeroBootException(originalFilename + "File size out 100MB, Please compress or reduce file quality!");
|
// throw new JeroBootException(originalFilename + "File size out 100MB, Please compress or reduce file quality!");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
OSSFile oSSFile = new OSSFile();
|
OSSFile oSSFile = new OSSFile();
|
||||||
try {
|
try {
|
||||||
@@ -191,15 +191,15 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
|||||||
public OSSFile uploadLocalOfCos(MultipartFile mf, String bizPath, String state, String cut) {
|
public OSSFile uploadLocalOfCos(MultipartFile mf, String bizPath, String state, String cut) {
|
||||||
|
|
||||||
//处理文件大小,大于100M抛出异常
|
//处理文件大小,大于100M抛出异常
|
||||||
long fileSize = mf.getSize() / 1024 / 1024;
|
// long fileSize = mf.getSize() / 1024 / 1024;
|
||||||
String originalFilename = mf.getOriginalFilename();
|
// String originalFilename = mf.getOriginalFilename();
|
||||||
if (fileSize >= 100) {
|
// if (fileSize >= 100) {
|
||||||
if (cut.equals(CutEnum.CN.getValue())) {
|
// if (cut.equals(CutEnum.CN.getValue())) {
|
||||||
throw new JeroBootException(originalFilename + "文件大小超出100MB, 请压缩或降低文件质量!");
|
// throw new JeroBootException(originalFilename + "文件大小超出100MB, 请压缩或降低文件质量!");
|
||||||
} else {
|
// } else {
|
||||||
throw new JeroBootException(originalFilename + "File size out 100MB, Please compress or reduce file quality!");
|
// throw new JeroBootException(originalFilename + "File size out 100MB, Please compress or reduce file quality!");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
OSSFile oSSFile = new OSSFile();
|
OSSFile oSSFile = new OSSFile();
|
||||||
String ctxPath = uploadCospath;
|
String ctxPath = uploadCospath;
|
||||||
@@ -296,15 +296,15 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
|||||||
public OSSFile uploadLocalForSplit(MultipartFile mf, String bizPath, String state, String cut) {
|
public OSSFile uploadLocalForSplit(MultipartFile mf, String bizPath, String state, String cut) {
|
||||||
|
|
||||||
//处理文件大小,大于100M抛出异常
|
//处理文件大小,大于100M抛出异常
|
||||||
long fileSize = mf.getSize() / 1024 / 1024;
|
// long fileSize = mf.getSize() / 1024 / 1024;
|
||||||
String originalFilename = mf.getOriginalFilename();
|
// String originalFilename = mf.getOriginalFilename();
|
||||||
if (fileSize >= 100) {
|
// if (fileSize >= 100) {
|
||||||
if (cut.equals(CutEnum.CN.getValue())) {
|
// if (cut.equals(CutEnum.CN.getValue())) {
|
||||||
throw new JeroBootException(originalFilename + "文件大小超出100MB, 请压缩或降低文件质量!");
|
// throw new JeroBootException(originalFilename + "文件大小超出100MB, 请压缩或降低文件质量!");
|
||||||
} else {
|
// } else {
|
||||||
throw new JeroBootException(originalFilename + "File size out 100MB, Please compress or reduce file quality!");
|
// throw new JeroBootException(originalFilename + "File size out 100MB, Please compress or reduce file quality!");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
OSSFile oSSFile = new OSSFile();
|
OSSFile oSSFile = new OSSFile();
|
||||||
String ctxPath = uploadCospath;
|
String ctxPath = uploadCospath;
|
||||||
|
|||||||
+3
-1
@@ -74,11 +74,13 @@ public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoD
|
|||||||
// 文件名称模糊查询
|
// 文件名称模糊查询
|
||||||
String fileName = req.getParameter("fileName");
|
String fileName = req.getParameter("fileName");
|
||||||
if (StringUtils.isNotBlank(fileName)) {
|
if (StringUtils.isNotBlank(fileName)) {
|
||||||
|
fileName = fileName.replace("%","\\%");
|
||||||
queryWrapper.like(ExtRepoData::getFileName, fileName);
|
queryWrapper.like(ExtRepoData::getFileName, fileName);
|
||||||
}
|
}
|
||||||
// 上传人模糊查询
|
// 上传人模糊查询
|
||||||
String createBy = req.getParameter("createBy");
|
String createBy = req.getParameter("createBy");
|
||||||
if (StringUtils.isNotBlank(createBy)) {
|
if (StringUtils.isNotBlank(createBy)) {
|
||||||
|
createBy = createBy.replace("%","\\%");
|
||||||
queryWrapper.like(ExtRepoData::getCreateBy, createBy);
|
queryWrapper.like(ExtRepoData::getCreateBy, createBy);
|
||||||
}
|
}
|
||||||
// 更新时间查询
|
// 更新时间查询
|
||||||
@@ -185,7 +187,7 @@ public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoD
|
|||||||
ExtRepoData erd = extRepoDataService.queryById(id);
|
ExtRepoData erd = extRepoDataService.queryById(id);
|
||||||
if (null != erd) {
|
if (null != erd) {
|
||||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
if (extRepoFolderService.isManager() || sysUser.getUsername().equals(erd.getCreateBy())) {
|
if (sysUser.getUsername().equals(erd.getCreateBy())) {
|
||||||
extRepoDataService.deleteById(id);
|
extRepoDataService.deleteById(id);
|
||||||
CosBootUtil.delete(erd.getFileKey());
|
CosBootUtil.delete(erd.getFileKey());
|
||||||
if (CutEnum.CN.getValue().equals(cut)) {
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
|||||||
+1
-1
@@ -359,7 +359,7 @@ public class ExtRepoFolderServiceImpl extends ServiceImpl<ExtRepoFolderMapper, E
|
|||||||
res = res || getStringList(erf.getAuthManageIds()).contains(sysUser.getId())
|
res = res || getStringList(erf.getAuthManageIds()).contains(sysUser.getId())
|
||||||
|| getStringList(erf.getAuthViewIds()).contains(sysUser.getId());
|
|| getStringList(erf.getAuthViewIds()).contains(sysUser.getId());
|
||||||
}
|
}
|
||||||
return false;
|
return res;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,8 +84,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- :placeholder="$t('PleaseSelect')+$t('uploadTime')"-->
|
<!-- :placeholder="$t('PleaseSelect')+$t('uploadTime')"-->
|
||||||
<a-range-picker
|
<a-range-picker
|
||||||
style='width: 264px'
|
class="box-input"
|
||||||
@change="onChange"
|
@change="onChange"
|
||||||
|
style='margin-left: -1px'
|
||||||
format="YYYY-MM-DD"
|
format="YYYY-MM-DD"
|
||||||
:getCalendarContainer="(trigger) => trigger.parentNode"
|
:getCalendarContainer="(trigger) => trigger.parentNode"
|
||||||
v-model="queryParams.time"
|
v-model="queryParams.time"
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
size="middle"
|
size="middle"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
:scroll="{x: '100%',y:'calc(100vh - 130px)'}"
|
:scroll="{x: '100%',y:'calc(100vh - 140px)'}"
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
:data-source="dataSource"
|
:data-source="dataSource"
|
||||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :md="6" :sm="10">
|
<a-col :md="6" :sm="10">
|
||||||
<a-form-item :label="$t('Collectlist')">
|
<a-form-item :label="$t('Collectlist')">
|
||||||
<a-select v-model="queryParam.ctype" @change="getonChange">
|
<a-select v-model="queryParam.ctype" @change="getonChange" :getPopupContainer="triggerNode => triggerNode.parentNode">
|
||||||
<a-select-option v-for="d in options" :key="d.value" :value="d.value" >{{ d.label }}</a-select-option>
|
<a-select-option v-for="d in options" :key="d.value" :value="d.value" >{{ d.label }}</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|||||||
Reference in New Issue
Block a user