|
|
@ -128,7 +128,7 @@ public class ToolManageServiceImpl implements IToolManageService { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Boolean uploadToolAndTips(MultipartFile file, MultipartFile tipsFile, String toolName,String moduleName,Long toolManageId) { |
|
|
|
public Boolean uploadToolAndTips(MultipartFile file, MultipartFile tipsFile, String toolName,String moduleName,Long toolManageId,String toolPath,String tipsPath) { |
|
|
|
ToolManage toolManage; |
|
|
|
if(null != toolManageId && toolManageId != 0L){ |
|
|
|
toolManage = baseMapper.selectById(toolManageId); |
|
|
@ -144,20 +144,20 @@ public class ToolManageServiceImpl implements IToolManageService { |
|
|
|
} |
|
|
|
|
|
|
|
try { |
|
|
|
if(FileUploadUtils.checkFileValid(file)){ |
|
|
|
if(file != null && FileUploadUtils.checkFileValid(file)){ |
|
|
|
SysOssVo toolVo = iSysOssService.upload(file); |
|
|
|
toolManage.setToolOssId(toolVo.getOssId()); |
|
|
|
toolManage.setToolPath(toolVo.getOriginalName()); |
|
|
|
}else if(null != toolManageId && toolManageId != 0L){ |
|
|
|
}else if(null != toolManageId && toolManageId != 0L && StrUtil.isEmpty(toolPath)){ |
|
|
|
toolManage.setToolOssId(0L); |
|
|
|
toolManage.setToolPath(""); |
|
|
|
} |
|
|
|
|
|
|
|
if(FileUploadUtils.checkFileValid(tipsFile)){ |
|
|
|
if(tipsFile != null && FileUploadUtils.checkFileValid(tipsFile)){ |
|
|
|
SysOssVo tipsVo = iSysOssService.upload(tipsFile); |
|
|
|
toolManage.setTipsOssId(tipsVo.getOssId()); |
|
|
|
toolManage.setTipsPath(tipsVo.getOriginalName()); |
|
|
|
}else if(null != toolManageId && toolManageId != 0L){ |
|
|
|
}else if(null != toolManageId && toolManageId != 0L && StrUtil.isEmpty(tipsPath) ){ |
|
|
|
toolManage.setTipsOssId(0L); |
|
|
|
toolManage.setTipsPath(""); |
|
|
|
} |
|
|
|