Commit eadae10d authored by 廖旭伟's avatar 廖旭伟

新增素材的bug修改

parent 7ba5cd5e
...@@ -61,4 +61,23 @@ public class PictureMaterialServiceImpl extends AbstractCRUDServiceImpl<PictureM ...@@ -61,4 +61,23 @@ public class PictureMaterialServiceImpl extends AbstractCRUDServiceImpl<PictureM
return dao.selectPictureGroupCount(pictureType); return dao.selectPictureGroupCount(pictureType);
} }
@Override
protected void validData(PictureMaterialEntity entity, Context context) throws AppException {
if(StringUtils.isEmpty(entity.getPicturePath())){
throw new AppException("文件地址不能为空");
}
if(StringUtils.isEmpty(entity.getPictureName())){
throw new AppException("文件名称不能为空");
}
if(entity.getPictureGroupId()==null){
throw new AppException("素材分组不能为空");
}
if(entity.getPictureClassifyId()==null){
throw new AppException("素材分类不能为空");
}
if(StringUtils.isEmpty(entity.getFileName())){
throw new AppException("文件名称不能为空");
}
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment