提交 9f7c08bc authored 作者: renjiancai's avatar renjiancai

--no commit message

上级 d6afbfd9
......@@ -26,6 +26,8 @@ public class SaveUpdatePdfLibraryForm {
private String synopsis;
@ApiModelProperty("pdf")
private String pdf;
@ApiModelProperty("pdfName")
private String pdfName;
@ApiModelProperty(value = "自定义分类id")
private List<String> diyTypeId;
@ApiModelProperty(value = "自定义分类code")
......
......@@ -31,6 +31,8 @@ public class PdfLibrary {
private String keywords;
@ApiModelProperty("pdf")
private String pdf;
@ApiModelProperty("pdfName")
private String pdfName;
@ApiModelProperty("简介")
private String synopsis;
@ApiModelProperty("上传时间")
......
......@@ -26,6 +26,8 @@ public class PdfLibraryOneVO {
private String synopsis;
@ApiModelProperty("pdf")
private String pdf;
@ApiModelProperty("pdfName")
private String pdfName;
@ApiModelProperty("图书id")
private String bookId;
@ApiModelProperty("所属图书")
......
......@@ -197,12 +197,14 @@ public class PdfLibrarySerivceImpl extends BaseServiceImpl<PdfLibrary,Integer> i
//循环创建图片对象
List<PdfLibrary> list = new ArrayList<PdfLibrary>();
for (int i = 0; i < form.getToken().size(); i++) {
Integer listName= pdfMapper.isRepeat(form.getNames().get(i));
String name=form.getNames().get(i).substring(0, form.getNames().get(i).indexOf("."));
Integer listName= pdfMapper.isRepeat(name);
if(listName==0){
PdfLibrary obj = new PdfLibrary();
BeanUtils.copyProperties(form, obj);
obj.setId(UUIDUtil.getUUID());
obj.setName(form.getNames().get(i));
obj.setName(name);
obj.setPdfName(form.getNames().get(i));
obj.setPdf(form.getToken().get(i));
obj.setUploadTime(new Date());
obj.setStatus(0);
......@@ -211,7 +213,7 @@ public class PdfLibrarySerivceImpl extends BaseServiceImpl<PdfLibrary,Integer> i
list.add(obj);
pdfMapper.insert(obj);
}else{
pdfService.createCriteria().andEqualTo("name", form.getNames().get(i));
pdfService.createCriteria().andEqualTo("name", name);
PdfLibrary library = pdfService.selectOneByCriteria();
ClassifyRelation obj = new ClassifyRelation();
obj.setId(UUIDUtil.getUUID());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论