资源上传的校验优化
This commit is contained in:
parent
506a7a2dc8
commit
312d307772
|
@ -105,6 +105,8 @@ public class SysOssPersonServiceImpl implements ISysOssPersonService {
|
|||
public Boolean insertByBo(SysOssPersonBo bo) {
|
||||
SysOssPerson add = MapstructUtils.convert(bo, SysOssPerson.class);
|
||||
validEntityBeforeSave(add);
|
||||
String path = catalogService.selectCatalogNameById(add.getCatalogId());
|
||||
add.setFilePath(path);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
|
|
|
@ -112,10 +112,10 @@ public class SysOssResourceServiceImpl implements ISysOssResourceService {
|
|||
@Override
|
||||
public Boolean insertByBo(SysOssResourceBo bo) {
|
||||
SysOssResource add = MapstructUtils.convert(bo, SysOssResource.class);
|
||||
validEntityBeforeSave(add);
|
||||
String path = catalogService.selectCatalogNameById(add.getCatalogId());
|
||||
add.setFilePath(path);
|
||||
add.setStatus(-1);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setOssId(add.getOssId());
|
||||
|
|
|
@ -112,10 +112,10 @@ public class SysOssTextbookServiceImpl implements ISysOssTextbookService {
|
|||
@Override
|
||||
public Boolean insertByBo(SysOssTextbookBo bo) {
|
||||
SysOssTextbook add = MapstructUtils.convert(bo, SysOssTextbook.class);
|
||||
validEntityBeforeSave(add);
|
||||
String path = catalogService.selectCatalogNameById(add.getCatalogId());
|
||||
add.setFilePath(path);
|
||||
add.setStatus(-1);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setOssId(add.getOssId());
|
||||
|
|
Loading…
Reference in New Issue