Toggle navigation
Toggle navigation
This project
Loading...
Sign in
crp
/
crp-operation
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
wanghongbo
2025-08-01 16:20:23 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1b02e171498e38e6f04b7ca9551b760ab882765f
1b02e171
1 parent
2fee3911
垫片校验
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
src/main/java/com/wondertek/service/impl/BackupMaterialServiceImpl.java
src/main/java/com/wondertek/service/impl/BackupMaterialServiceImpl.java
View file @
1b02e17
...
...
@@ -79,9 +79,16 @@ public class BackupMaterialServiceImpl extends ServiceImpl<BackupMaterialMapper,
@Override
public
ResultBean
upload
(
MultipartFile
backupFile
,
BackupUploadVo
backupUploadVo
)
{
//校验
if
(!
"mp4"
.
equalsIgnoreCase
(
backupUploadVo
.
getFileType
())){
// if(!"mp4".equalsIgnoreCase(backupUploadVo.getFileType())){
// throw new ServiceException("仅支持上传mp4格式的垫片文件!");
// }
//校验backupFile后缀名
String
realName
=
backupFile
.
getOriginalFilename
();
String
suffix
=
realName
.
substring
(
realName
.
lastIndexOf
(
"."
)
+
1
);
if
(!
suffix
.
equalsIgnoreCase
(
"mp4"
))
{
throw
new
ServiceException
(
"仅支持上传mp4格式的垫片文件!"
);
}
//对应垫片任务
LambdaQueryWrapper
<
StreamTask
>
backupWrapper
=
new
LambdaQueryWrapper
<>();
backupWrapper
.
eq
(
StreamTask:
:
getRoomId
,
backupUploadVo
.
getRoomId
());
...
...
Please
register
or
login
to post a comment