提交 66dab8d2 authored 作者: renjiancai's avatar renjiancai

--no commit message

上级 c295aa2d
...@@ -20,8 +20,12 @@ public class SaveAnimationLibraryForm { ...@@ -20,8 +20,12 @@ public class SaveAnimationLibraryForm {
private BigDecimal price; private BigDecimal price;
@ApiModelProperty("简介") @ApiModelProperty("简介")
private String synopsis; private String synopsis;
@ApiModelProperty("animation") @ApiModelProperty("时长")
private List<String> animation; private List<String> timeLength;
@ApiModelProperty("文件大小")
private List<String> size;
@ApiModelProperty("names")
private List<String> names;
@ApiModelProperty(value = "自定义分类id") @ApiModelProperty(value = "自定义分类id")
private String divTypeId; private String divTypeId;
@ApiModelProperty(value = "自定义分类code") @ApiModelProperty(value = "自定义分类code")
......
...@@ -20,8 +20,12 @@ public class SaveAudioLibraryForm { ...@@ -20,8 +20,12 @@ public class SaveAudioLibraryForm {
private BigDecimal price; private BigDecimal price;
@ApiModelProperty("简介") @ApiModelProperty("简介")
private String synopsis; private String synopsis;
@ApiModelProperty("videos") @ApiModelProperty("names")
private List<String> videos; private List<String> names;
@ApiModelProperty("时长")
private List<String> timeLength;
@ApiModelProperty("文件大小")
private List<String> size;
@ApiModelProperty(value = "自定义分类id") @ApiModelProperty(value = "自定义分类id")
private String divTypeId; private String divTypeId;
@ApiModelProperty(value = "自定义分类code") @ApiModelProperty(value = "自定义分类code")
......
...@@ -18,8 +18,8 @@ public class SaveCoursewareLibraryForm { ...@@ -18,8 +18,8 @@ public class SaveCoursewareLibraryForm {
private String keywords; private String keywords;
@ApiModelProperty("定价") @ApiModelProperty("定价")
private BigDecimal price; private BigDecimal price;
@ApiModelProperty("coursewares") @ApiModelProperty("names")
private List<String> coursewares; private List<String> names;
@ApiModelProperty(value = "自定义分类id") @ApiModelProperty(value = "自定义分类id")
private String divTypeId; private String divTypeId;
@ApiModelProperty(value = "自定义分类code") @ApiModelProperty(value = "自定义分类code")
......
...@@ -20,8 +20,8 @@ public class SavePdfLibraryForm { ...@@ -20,8 +20,8 @@ public class SavePdfLibraryForm {
private BigDecimal price; private BigDecimal price;
@ApiModelProperty("简介") @ApiModelProperty("简介")
private String synopsis; private String synopsis;
@ApiModelProperty("pdfs") @ApiModelProperty("names")
private List<String> pdfs; private List<String> names;
@ApiModelProperty(value = "自定义分类id") @ApiModelProperty(value = "自定义分类id")
private String divTypeId; private String divTypeId;
@ApiModelProperty(value = "自定义分类code") @ApiModelProperty(value = "自定义分类code")
......
...@@ -21,8 +21,12 @@ public class SaveVideoLibraryForm { ...@@ -21,8 +21,12 @@ public class SaveVideoLibraryForm {
private BigDecimal price; private BigDecimal price;
@ApiModelProperty("简介") @ApiModelProperty("简介")
private String synopsis; private String synopsis;
@ApiModelProperty("videos") @ApiModelProperty("names")
private List<String> videos; private List<String> names;
@ApiModelProperty("时长")
private List<String> timeLength;
@ApiModelProperty("文件大小")
private List<String> size;
@ApiModelProperty(value = "自定义分类id") @ApiModelProperty(value = "自定义分类id")
private String divTypeId; private String divTypeId;
@ApiModelProperty(value = "自定义分类code") @ApiModelProperty(value = "自定义分类code")
......
...@@ -25,6 +25,7 @@ import com.zrqx.core.model.resource.animationlibrary.AnimationLibrary; ...@@ -25,6 +25,7 @@ import com.zrqx.core.model.resource.animationlibrary.AnimationLibrary;
import com.zrqx.core.model.resource.animationlibrary.AnimationLibraryDiyType; import com.zrqx.core.model.resource.animationlibrary.AnimationLibraryDiyType;
import com.zrqx.core.model.resource.animationlibrary.AnimationLibraryLableDiyType; import com.zrqx.core.model.resource.animationlibrary.AnimationLibraryLableDiyType;
import com.zrqx.core.model.resource.animationlibrary.AnimationResource; import com.zrqx.core.model.resource.animationlibrary.AnimationResource;
import com.zrqx.core.model.resource.audiolibrary.AudioGoods;
import com.zrqx.core.model.resource.pdffilelibrary.PdfResource; import com.zrqx.core.model.resource.pdffilelibrary.PdfResource;
import com.zrqx.core.service.BaseServiceImpl; import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.core.util.PageInfo; import com.zrqx.core.util.PageInfo;
...@@ -186,7 +187,7 @@ public class AnimationLibrarySerivceImpl extends BaseServiceImpl<AnimationLibrar ...@@ -186,7 +187,7 @@ public class AnimationLibrarySerivceImpl extends BaseServiceImpl<AnimationLibrar
if(form.getDivTypeId() == null || form.getDivTypeCode() == null){ if(form.getDivTypeId() == null || form.getDivTypeCode() == null){
throw new BaseException("请选择自定义分类"); throw new BaseException("请选择自定义分类");
} }
if(form.getToken().size() != form.getAnimation().size()){ if(form.getToken().size() != form.getNames().size()){
throw new BaseException("视频数量错误"); throw new BaseException("视频数量错误");
} }
//循环创建图片对象 //循环创建图片对象
...@@ -195,14 +196,16 @@ public class AnimationLibrarySerivceImpl extends BaseServiceImpl<AnimationLibrar ...@@ -195,14 +196,16 @@ public class AnimationLibrarySerivceImpl extends BaseServiceImpl<AnimationLibrar
AnimationLibrary obj = new AnimationLibrary(); AnimationLibrary obj = new AnimationLibrary();
BeanUtils.copyProperties(form, obj); BeanUtils.copyProperties(form, obj);
obj.setId(UUIDUtil.getUUID()); obj.setId(UUIDUtil.getUUID());
obj.setName(form.getToken().get(i)); obj.setName(form.getNames().get(i));
obj.setAnimation(form.getAnimation().get(i)); obj.setAnimation(form.getToken().get(i));
obj.setUploadTime(new Date()); obj.setUploadTime(new Date());
obj.setStatus(0); obj.setStatus(0);
obj.setTimeLength(form.getTimeLength().get(i));
obj.setSize(form.getSize().get(i));
list.add(obj); list.add(obj);
} }
//批量插入图片 //批量插入图片
mapper.insertList(list); mapper.insertUuidList(list);
//循环添加当前对象与自定义分类的关系 //循环添加当前对象与自定义分类的关系
list.parallelStream().forEach(entity ->{ list.parallelStream().forEach(entity ->{
AnimationLibraryDiyType obj = new AnimationLibraryDiyType(); AnimationLibraryDiyType obj = new AnimationLibraryDiyType();
...@@ -210,7 +213,12 @@ public class AnimationLibrarySerivceImpl extends BaseServiceImpl<AnimationLibrar ...@@ -210,7 +213,12 @@ public class AnimationLibrarySerivceImpl extends BaseServiceImpl<AnimationLibrar
obj.setObjectId(entity.getId()); obj.setObjectId(entity.getId());
obj.setDtId(form.getDivTypeId()); obj.setDtId(form.getDivTypeId());
obj.setCode(form.getDivTypeCode()); obj.setCode(form.getDivTypeCode());
vdrMapper.insert(obj); vdrMapper.insertSelective(obj);
AnimationGoods goods=new AnimationGoods();
goods.setId(UUIDUtil.getUUID());
goods.setObjectId(entity.getId());
goods.setPrice(form.getPrice());
goodsMapper.insertSelective(goods);
}); });
return true; return true;
} }
......
...@@ -25,6 +25,7 @@ import com.zrqx.core.model.resource.audiolibrary.AudioLibrary; ...@@ -25,6 +25,7 @@ import com.zrqx.core.model.resource.audiolibrary.AudioLibrary;
import com.zrqx.core.model.resource.audiolibrary.AudioLibraryDiyType; import com.zrqx.core.model.resource.audiolibrary.AudioLibraryDiyType;
import com.zrqx.core.model.resource.audiolibrary.AudioLibraryLableDiyType; import com.zrqx.core.model.resource.audiolibrary.AudioLibraryLableDiyType;
import com.zrqx.core.model.resource.audiolibrary.AudioResource; import com.zrqx.core.model.resource.audiolibrary.AudioResource;
import com.zrqx.core.model.resource.coursewarelibrary.CoursewareGoods;
import com.zrqx.core.service.BaseServiceImpl; import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.core.util.PageInfo; import com.zrqx.core.util.PageInfo;
import com.zrqx.core.util.PageParam; import com.zrqx.core.util.PageParam;
...@@ -166,7 +167,7 @@ public class AudioLibrarySerivceImpl extends BaseServiceImpl<AudioLibrary,Intege ...@@ -166,7 +167,7 @@ public class AudioLibrarySerivceImpl extends BaseServiceImpl<AudioLibrary,Intege
if(form.getDivTypeId() == null || form.getDivTypeCode() == null){ if(form.getDivTypeId() == null || form.getDivTypeCode() == null){
throw new BaseException("请选择自定义分类"); throw new BaseException("请选择自定义分类");
} }
if(form.getToken().size() != form.getVideos().size()){ if(form.getToken().size() != form.getNames().size()){
throw new BaseException("音频数量错误"); throw new BaseException("音频数量错误");
} }
//循环创建图片对象 //循环创建图片对象
...@@ -175,14 +176,16 @@ public class AudioLibrarySerivceImpl extends BaseServiceImpl<AudioLibrary,Intege ...@@ -175,14 +176,16 @@ public class AudioLibrarySerivceImpl extends BaseServiceImpl<AudioLibrary,Intege
AudioLibrary obj = new AudioLibrary(); AudioLibrary obj = new AudioLibrary();
BeanUtils.copyProperties(form, obj); BeanUtils.copyProperties(form, obj);
obj.setId(UUIDUtil.getUUID()); obj.setId(UUIDUtil.getUUID());
obj.setName(form.getToken().get(i)); obj.setName(form.getNames().get(i));
obj.setAudio(form.getVideos().get(i)); obj.setAudio(form.getToken().get(i));
obj.setUploadTime(new Date()); obj.setUploadTime(new Date());
obj.setStatus(0); obj.setStatus(0);
obj.setSize(form.getSize().get(i));
obj.setTimeLength(form.getTimeLength().get(i));
list.add(obj); list.add(obj);
} }
//批量插入图片 //批量插入图片
mapper.insertList(list); mapper.insertUuidList(list);
//循环添加当前对象与自定义分类的关系 //循环添加当前对象与自定义分类的关系
list.parallelStream().forEach(entity ->{ list.parallelStream().forEach(entity ->{
AudioLibraryDiyType obj = new AudioLibraryDiyType(); AudioLibraryDiyType obj = new AudioLibraryDiyType();
...@@ -190,7 +193,12 @@ public class AudioLibrarySerivceImpl extends BaseServiceImpl<AudioLibrary,Intege ...@@ -190,7 +193,12 @@ public class AudioLibrarySerivceImpl extends BaseServiceImpl<AudioLibrary,Intege
obj.setObjectId(entity.getId()); obj.setObjectId(entity.getId());
obj.setDtId(form.getDivTypeId()); obj.setDtId(form.getDivTypeId());
obj.setCode(form.getDivTypeCode()); obj.setCode(form.getDivTypeCode());
adrMapper.insert(obj); adrMapper.insertSelective(obj);
AudioGoods goods=new AudioGoods();
goods.setId(UUIDUtil.getUUID());
goods.setObjectId(entity.getId());
goods.setPrice(form.getPrice());
audioGoodsMapper.insertSelective(goods);
}); });
return true; return true;
} }
......
...@@ -24,6 +24,7 @@ import com.zrqx.core.model.resource.coursewarelibrary.CoursewareGoods; ...@@ -24,6 +24,7 @@ import com.zrqx.core.model.resource.coursewarelibrary.CoursewareGoods;
import com.zrqx.core.model.resource.coursewarelibrary.CoursewareLibrary; import com.zrqx.core.model.resource.coursewarelibrary.CoursewareLibrary;
import com.zrqx.core.model.resource.coursewarelibrary.CoursewareLibraryDiyType; import com.zrqx.core.model.resource.coursewarelibrary.CoursewareLibraryDiyType;
import com.zrqx.core.model.resource.coursewarelibrary.CoursewareLibraryLableDiyType; import com.zrqx.core.model.resource.coursewarelibrary.CoursewareLibraryLableDiyType;
import com.zrqx.core.model.resource.imagelibrary.ImageGoods;
import com.zrqx.core.service.BaseServiceImpl; import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.core.util.PageInfo; import com.zrqx.core.util.PageInfo;
import com.zrqx.core.util.PageParam; import com.zrqx.core.util.PageParam;
...@@ -164,7 +165,7 @@ public class CoursewareLibrarySerivceImpl extends BaseServiceImpl<CoursewareLibr ...@@ -164,7 +165,7 @@ public class CoursewareLibrarySerivceImpl extends BaseServiceImpl<CoursewareLibr
if(form.getDivTypeId() == null || form.getDivTypeCode() == null){ if(form.getDivTypeId() == null || form.getDivTypeCode() == null){
throw new BaseException("请选择自定义分类"); throw new BaseException("请选择自定义分类");
} }
if(form.getToken().size() != form.getCoursewares().size()){ if(form.getToken().size() != form.getNames().size()){
throw new BaseException("视频数量错误"); throw new BaseException("视频数量错误");
} }
//循环创建图片对象 //循环创建图片对象
...@@ -173,14 +174,14 @@ public class CoursewareLibrarySerivceImpl extends BaseServiceImpl<CoursewareLibr ...@@ -173,14 +174,14 @@ public class CoursewareLibrarySerivceImpl extends BaseServiceImpl<CoursewareLibr
CoursewareLibrary obj = new CoursewareLibrary(); CoursewareLibrary obj = new CoursewareLibrary();
BeanUtils.copyProperties(form, obj); BeanUtils.copyProperties(form, obj);
obj.setId(UUIDUtil.getUUID()); obj.setId(UUIDUtil.getUUID());
obj.setName(form.getToken().get(i)); obj.setName(form.getNames().get(i));
obj.setCourseware(form.getCoursewares().get(i)); obj.setCourseware(form.getToken().get(i));
obj.setUploadTime(new Date()); obj.setUploadTime(new Date());
obj.setStatus(0); obj.setStatus(0);
list.add(obj); list.add(obj);
} }
//批量插入图片 //批量插入图片
mapper.insertList(list); mapper.insertUuidList(list);
//循环添加当前对象与自定义分类的关系 //循环添加当前对象与自定义分类的关系
list.parallelStream().forEach(entity ->{ list.parallelStream().forEach(entity ->{
CoursewareLibraryDiyType obj = new CoursewareLibraryDiyType(); CoursewareLibraryDiyType obj = new CoursewareLibraryDiyType();
...@@ -188,7 +189,12 @@ public class CoursewareLibrarySerivceImpl extends BaseServiceImpl<CoursewareLibr ...@@ -188,7 +189,12 @@ public class CoursewareLibrarySerivceImpl extends BaseServiceImpl<CoursewareLibr
obj.setObjectId(entity.getId()); obj.setObjectId(entity.getId());
obj.setDtId(form.getDivTypeId()); obj.setDtId(form.getDivTypeId());
obj.setCode(form.getDivTypeCode()); obj.setCode(form.getDivTypeCode());
cdrMapper.insert(obj); cdrMapper.insertSelective(obj);
CoursewareGoods goods=new CoursewareGoods();
goods.setId(UUIDUtil.getUUID());
goods.setObjectId(entity.getId());
goods.setPrice(form.getPrice());
goodsMapper.insertSelective(goods);
}); });
return true; return true;
} }
......
...@@ -26,6 +26,7 @@ import com.zrqx.core.model.resource.imagelibrary.ImageGoods; ...@@ -26,6 +26,7 @@ import com.zrqx.core.model.resource.imagelibrary.ImageGoods;
import com.zrqx.core.model.resource.imagelibrary.ImageLibrary; import com.zrqx.core.model.resource.imagelibrary.ImageLibrary;
import com.zrqx.core.model.resource.imagelibrary.ImageLibraryDiyType; import com.zrqx.core.model.resource.imagelibrary.ImageLibraryDiyType;
import com.zrqx.core.model.resource.imagelibrary.ImageLibraryLableDiyType; import com.zrqx.core.model.resource.imagelibrary.ImageLibraryLableDiyType;
import com.zrqx.core.model.resource.videolibrary.VideoGoods;
import com.zrqx.core.service.BaseServiceImpl; import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.core.util.PageInfo; import com.zrqx.core.util.PageInfo;
import com.zrqx.core.util.PageParam; import com.zrqx.core.util.PageParam;
...@@ -139,7 +140,7 @@ public class ImageLibrarySerivceImpl extends BaseServiceImpl<ImageLibrary,Intege ...@@ -139,7 +140,7 @@ public class ImageLibrarySerivceImpl extends BaseServiceImpl<ImageLibrary,Intege
if(form.getDivTypeId() == null || form.getDivTypeCode() == null){ if(form.getDivTypeId() == null || form.getDivTypeCode() == null){
throw new BaseException("请选择自定义分类"); throw new BaseException("请选择自定义分类");
} }
if(form.getToken().size() != form.getImage().size()){ if(form.getToken().size() != form.getNames().size()){
throw new BaseException("图片数量错误"); throw new BaseException("图片数量错误");
} }
//循环创建图片对象 //循环创建图片对象
...@@ -148,15 +149,15 @@ public class ImageLibrarySerivceImpl extends BaseServiceImpl<ImageLibrary,Intege ...@@ -148,15 +149,15 @@ public class ImageLibrarySerivceImpl extends BaseServiceImpl<ImageLibrary,Intege
ImageLibrary obj = new ImageLibrary(); ImageLibrary obj = new ImageLibrary();
BeanUtils.copyProperties(form, obj); BeanUtils.copyProperties(form, obj);
obj.setId(UUIDUtil.getUUID()); obj.setId(UUIDUtil.getUUID());
obj.setName(form.getToken().get(i)); obj.setName(form.getNames().get(i));
obj.setImage(form.getImage().get(i)); obj.setImage(form.getToken().get(i));
obj.setUploadTime(new Date()); obj.setUploadTime(new Date());
obj.setStatus(0); obj.setStatus(0);
obj.setIsDelete(0); obj.setIsDelete(0);
list.add(obj); list.add(obj);
} }
//批量插入图片 //批量插入图片
mapper.insertList(list); mapper.insertUuidList(list);
//循环添加当前对象与自定义分类的关系 //循环添加当前对象与自定义分类的关系
list.parallelStream().forEach(entity ->{ list.parallelStream().forEach(entity ->{
ImageLibraryDiyType obj = new ImageLibraryDiyType(); ImageLibraryDiyType obj = new ImageLibraryDiyType();
...@@ -164,7 +165,12 @@ public class ImageLibrarySerivceImpl extends BaseServiceImpl<ImageLibrary,Intege ...@@ -164,7 +165,12 @@ public class ImageLibrarySerivceImpl extends BaseServiceImpl<ImageLibrary,Intege
obj.setObjectId(entity.getId()); obj.setObjectId(entity.getId());
obj.setDtId(form.getDivTypeId()); obj.setDtId(form.getDivTypeId());
obj.setCode(form.getDivTypeCode()); obj.setCode(form.getDivTypeCode());
idrMapper.insert(obj); idrMapper.insertSelective(obj);
ImageGoods goods=new ImageGoods();
goods.setId(UUIDUtil.getUUID());
goods.setObjectId(entity.getId());
goods.setPrice(form.getPrice());
imageGoodsMapper.insertSelective(goods);
}); });
//循环添加当前对象与标签的关系 //循环添加当前对象与标签的关系
if(form.getDivLableId()!=null && !"".equals(form.getDivLableId())){ if(form.getDivLableId()!=null && !"".equals(form.getDivLableId())){
......
...@@ -188,7 +188,7 @@ public class PdfLibrarySerivceImpl extends BaseServiceImpl<PdfLibrary,Integer> i ...@@ -188,7 +188,7 @@ public class PdfLibrarySerivceImpl extends BaseServiceImpl<PdfLibrary,Integer> i
if(form.getDivTypeId() == null || form.getDivTypeCode() == null){ if(form.getDivTypeId() == null || form.getDivTypeCode() == null){
throw new BaseException("请选择自定义分类"); throw new BaseException("请选择自定义分类");
} }
if(form.getToken().size() != form.getPdfs().size()){ if(form.getToken().size() != form.getNames().size()){
throw new BaseException("视频数量错误"); throw new BaseException("视频数量错误");
} }
//循环创建图片对象 //循环创建图片对象
...@@ -197,8 +197,8 @@ public class PdfLibrarySerivceImpl extends BaseServiceImpl<PdfLibrary,Integer> i ...@@ -197,8 +197,8 @@ public class PdfLibrarySerivceImpl extends BaseServiceImpl<PdfLibrary,Integer> i
PdfLibrary obj = new PdfLibrary(); PdfLibrary obj = new PdfLibrary();
BeanUtils.copyProperties(form, obj); BeanUtils.copyProperties(form, obj);
obj.setId(UUIDUtil.getUUID()); obj.setId(UUIDUtil.getUUID());
obj.setName(form.getToken().get(i)); obj.setName(form.getNames().get(i));
obj.setPdf(form.getPdfs().get(i)); obj.setPdf(form.getToken().get(i));
obj.setUploadTime(new Date()); obj.setUploadTime(new Date());
obj.setStatus(0); obj.setStatus(0);
list.add(obj); list.add(obj);
...@@ -212,7 +212,7 @@ public class PdfLibrarySerivceImpl extends BaseServiceImpl<PdfLibrary,Integer> i ...@@ -212,7 +212,7 @@ public class PdfLibrarySerivceImpl extends BaseServiceImpl<PdfLibrary,Integer> i
obj.setObjectId(entity.getId()); obj.setObjectId(entity.getId());
obj.setDtId(form.getDivTypeId()); obj.setDtId(form.getDivTypeId());
obj.setCode(form.getDivTypeCode()); obj.setCode(form.getDivTypeCode());
pdrMapper.insert(obj); pdrMapper.insertSelective(obj);
PdfGoods goods=new PdfGoods(); PdfGoods goods=new PdfGoods();
goods.setId(UUIDUtil.getUUID()); goods.setId(UUIDUtil.getUUID());
goods.setObjectId(entity.getId()); goods.setObjectId(entity.getId());
......
...@@ -22,6 +22,7 @@ import com.zrqx.core.form.resource.bg.videolibrary.SaveVideoLibraryForm; ...@@ -22,6 +22,7 @@ import com.zrqx.core.form.resource.bg.videolibrary.SaveVideoLibraryForm;
import com.zrqx.core.form.resource.bg.videolibrary.UpdateVideoLibraryForm; import com.zrqx.core.form.resource.bg.videolibrary.UpdateVideoLibraryForm;
import com.zrqx.core.mapper.BaseMapper; import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.model.resource.audiolibrary.AudioResource; import com.zrqx.core.model.resource.audiolibrary.AudioResource;
import com.zrqx.core.model.resource.pdffilelibrary.PdfGoods;
import com.zrqx.core.model.resource.videolibrary.VideoGoods; import com.zrqx.core.model.resource.videolibrary.VideoGoods;
import com.zrqx.core.model.resource.videolibrary.VideoLibrary; import com.zrqx.core.model.resource.videolibrary.VideoLibrary;
import com.zrqx.core.model.resource.videolibrary.VideoLibraryDiyType; import com.zrqx.core.model.resource.videolibrary.VideoLibraryDiyType;
...@@ -186,7 +187,7 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,Intege ...@@ -186,7 +187,7 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,Intege
if(form.getDivTypeId() == null || form.getDivTypeCode() == null){ if(form.getDivTypeId() == null || form.getDivTypeCode() == null){
throw new BaseException("请选择自定义分类"); throw new BaseException("请选择自定义分类");
} }
if(form.getToken().size() != form.getVideos().size()){ if(form.getToken().size() != form.getNames().size()){
throw new BaseException("视频数量错误"); throw new BaseException("视频数量错误");
} }
//循环创建图片对象 //循环创建图片对象
...@@ -195,14 +196,16 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,Intege ...@@ -195,14 +196,16 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,Intege
VideoLibrary obj = new VideoLibrary(); VideoLibrary obj = new VideoLibrary();
BeanUtils.copyProperties(form, obj); BeanUtils.copyProperties(form, obj);
obj.setId(UUIDUtil.getUUID()); obj.setId(UUIDUtil.getUUID());
obj.setName(form.getToken().get(i)); obj.setName(form.getNames().get(i));
obj.setVideo(form.getVideos().get(i)); obj.setVideo(form.getToken().get(i));
obj.setUploadTime(new Date()); obj.setUploadTime(new Date());
obj.setStatus(0); obj.setStatus(0);
obj.setSize(form.getSize().get(i));
obj.setTimeLength(form.getTimeLength().get(i));
list.add(obj); list.add(obj);
} }
//批量插入图片 //批量插入图片
mapper.insertList(list); mapper.insertUuidList(list);
//循环添加当前对象与自定义分类的关系 //循环添加当前对象与自定义分类的关系
list.parallelStream().forEach(entity ->{ list.parallelStream().forEach(entity ->{
VideoLibraryDiyType obj = new VideoLibraryDiyType(); VideoLibraryDiyType obj = new VideoLibraryDiyType();
...@@ -210,7 +213,12 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,Intege ...@@ -210,7 +213,12 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,Intege
obj.setObjectId(entity.getId()); obj.setObjectId(entity.getId());
obj.setDtId(form.getDivTypeId()); obj.setDtId(form.getDivTypeId());
obj.setCode(form.getDivTypeCode()); obj.setCode(form.getDivTypeCode());
vdrMapper.insert(obj); vdrMapper.insertSelective(obj);
VideoGoods goods=new VideoGoods();
goods.setId(UUIDUtil.getUUID());
goods.setObjectId(entity.getId());
goods.setPrice(form.getPrice());
videoGoodsMapper.insertSelective(goods);
}); });
return true; return true;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论