提交 0a9348e8 authored 作者: renjiancai's avatar renjiancai

--no commit message

上级 4d23ce8a
......@@ -49,9 +49,9 @@ public class SaveUpdateEbookForm {
@ApiModelProperty("数据类型:0 纸质版 1电子版 2纸质版+电子版 3其他")
private Integer dataType;
@ApiModelProperty("所属部门id")
private String departmentId;
private Integer departmentId;
@ApiModelProperty("所属部门")
private Integer department;
private String department;
@ApiModelProperty("审核状态 0:录入中 1:待审核 2:审核中 3:审核通过 4:审核未通过")
private Integer bookStatus;
/**纸质书信息**/
......
......@@ -3,14 +3,12 @@ package com.zrqx.resource.bg.controller.ebooklibrary;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.io.IOException;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -24,10 +22,8 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import tk.mybatis.mapper.entity.Example.Criteria;
import com.zrqx.core.constant.resource.ResourceRequestPath;
import com.zrqx.core.constant.sysuser.SysUserRequestPath;
import com.zrqx.core.enums.ResourceTypeEnum;
......@@ -41,6 +37,7 @@ import com.zrqx.core.form.resource.bg.ebook.SaveDiyTypeForm;
import com.zrqx.core.form.resource.bg.ebook.SaveUpdateEbookForm;
import com.zrqx.core.form.resource.bg.ebook.UpdateEbookForm;
import com.zrqx.core.model.resource.animationlibrary.AnimationLibrary;
import com.zrqx.core.model.resource.articlelibrary.ArticleGoods;
import com.zrqx.core.model.resource.audiolibrary.AudioLibrary;
import com.zrqx.core.model.resource.coursewarelibrary.CoursewareLibrary;
import com.zrqx.core.model.resource.ebook.Book;
......@@ -68,11 +65,11 @@ import com.zrqx.core.vo.resource.ebook.ImportExcelBookVO;
import com.zrqx.core.vo.resource.label.LabelAndContentByDataTypeVO;
import com.zrqx.resource.bg.service.ResourceRelationVoService;
import com.zrqx.resource.bg.service.animationlibrary.AnimationLibraryService;
import com.zrqx.resource.bg.service.articlelibrary.ArticleGoodsService;
import com.zrqx.resource.bg.service.articlelibrary.ArticleLibraryService;
import com.zrqx.resource.bg.service.articlelibrary.ChapterLibraryService;
import com.zrqx.resource.bg.service.audiolibrary.AudioLibraryService;
import com.zrqx.resource.bg.service.coursewarelibrary.CoursewareLibraryService;
import com.zrqx.resource.bg.service.diytype.DiyTypeService;
import com.zrqx.resource.bg.service.ebook.BookGoodsAlbumService;
import com.zrqx.resource.bg.service.ebook.BookGoodsService;
import com.zrqx.resource.bg.service.ebook.BookIssuedService;
......@@ -143,6 +140,8 @@ public class EbookLibraryController {
private BookGoodsService goodsService;
@Autowired
private ClassifyRelationService diyTypeService;
@Autowired
private ArticleGoodsService articleGoodsService;
......@@ -375,8 +374,14 @@ public class EbookLibraryController {
ClassifyRelation edt = new ClassifyRelation();
edt.setObjectId(ev.getEbook().getBookId());
edt.setCode(ev.getCode());
edt.setResourceType(1);
edt.setDtId("0");
bookTypeService.insert(edt);
//商品信息
BookGoods goods=new BookGoods();
goods.setObjectId(ev.getBook().getId());
goods.setDataSources(1);
bookGoodsService.insertSelective(goods);
// 章节
ev.getChapterSet().forEach(chapter -> {
chapter.setBookid(ev.getBook().getId());
......@@ -395,7 +400,13 @@ public class EbookLibraryController {
aldt.setObjectId(article.getId());
aldt.setCode(ev.getCode());
aldt.setDtId("0");
aldt.setResourceType(2);
bookTypeService.insertSelective(aldt);
//商品信息
ArticleGoods agoods=new ArticleGoods();
agoods.setObjectId(article.getId());
agoods.setDataSources(1);
articleGoodsService.insertSelective(agoods);
});
// 图片
......@@ -409,12 +420,13 @@ public class EbookLibraryController {
ildt.setDtId("0");
ildt.setCode(ev.getCode());
ildt.setObjectId(image.getId());
ildt.setResourceType(5);
bookTypeService.insertSelective(ildt);
//商品信息
ImageGoods goods=new ImageGoods();
goods.setObjectId(image.getId());
goods.setDataSources(1);
imageGoodsService.insertSelective(goods);
ImageGoods igoods=new ImageGoods();
igoods.setObjectId(image.getId());
igoods.setDataSources(1);
imageGoodsService.insertSelective(igoods);
});
try {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论