提交 aa4e97fd authored 作者: renjiancai's avatar renjiancai

--no commit message

上级 545213d8
......@@ -11,9 +11,9 @@ import javax.persistence.Table;
import lombok.Data;
@Data
@ApiModel(value="BookLabelDiyType",description="图书与标签关系表")
@Table(name = "res_book_label")
public class BookLabel {
@ApiModel(value="BookLibraryLabel",description="图书与标签关系表")
@Table(name = "res_book_library_label")
public class BookLibraryLabel {
@Id
@GeneratedValue(strategy =GenerationType.IDENTITY, generator = "SELECT REPLACE (UUID(), '-', '')")
@ApiModelProperty("图书与标签内容关系表id")
......
......@@ -35,7 +35,7 @@ import com.zrqx.core.model.resource.audiolibrary.AudioLibraryLabel;
import com.zrqx.core.model.resource.authorLibrary.AuthorLibrary;
import com.zrqx.core.model.resource.authorLibrary.AuthorLibraryDiyType;
import com.zrqx.core.model.resource.authorLibrary.AuthorLibraryLabel;
import com.zrqx.core.model.resource.ebook.BookLabel;
import com.zrqx.core.model.resource.ebook.BookLibraryLabel;
import com.zrqx.core.util.CallBack;
import com.zrqx.core.util.PageInfo;
import com.zrqx.core.util.PageParam;
......
......@@ -50,7 +50,7 @@ import com.zrqx.core.model.resource.ebook.BookDiyType;
import com.zrqx.core.model.resource.ebook.BookGoods;
import com.zrqx.core.model.resource.ebook.BookGoodsAlbum;
import com.zrqx.core.model.resource.ebook.BookIssued;
import com.zrqx.core.model.resource.ebook.BookLabel;
import com.zrqx.core.model.resource.ebook.BookLibraryLabel;
import com.zrqx.core.model.resource.ebook.BookResource;
import com.zrqx.core.model.resource.ebook.Ebook;
import com.zrqx.core.model.resource.imagelibrary.ImageLibrary;
......@@ -187,7 +187,7 @@ public class EbookLibraryController {
List<BookDiyType> dtList = bookTypeService.selectByCriteria();
// 自定义标签
bookLableService.createCriteria().andEqualTo("objectId", oid);
List<BookLabel> listLabel = bookLableService.selectByCriteria();
List<BookLibraryLabel> listLabel = bookLableService.selectByCriteria();
// 商品相册
bookAlbumService.createCriteria().andEqualTo("bookId", oid);
List<BookGoodsAlbum> album = bookAlbumService.selectByCriteria();
......@@ -228,16 +228,16 @@ public class EbookLibraryController {
vo.setLabelList(new ArrayList<LabelAndContentByDataTypeVO>());
vo.setLabelId(new ArrayList<String>());
vo.setLabelContentId(new ArrayList<String>());
List<BookLabel> listTemp = new ArrayList<BookLabel>();
List<BookLibraryLabel> listTemp = new ArrayList<BookLibraryLabel>();
if (listLabel != null && listLabel.size() > 0) {
for (BookLabel label : listLabel) {
for (BookLibraryLabel label : listLabel) {
vo.getLabelContentId().add(label.getLabelContentId());
if (!vo.getLabelId().contains(label.getLabelId())) {
vo.getLabelId().add(label.getLabelId());
listTemp.add(label);
}
}
for (BookLabel booklable : listTemp) {
for (BookLibraryLabel booklable : listTemp) {
List<LabelAndContentByDataTypeVO> voList = labelContentDiyTypeService
.listContent(ResourceTypeEnum.BOOK.getCode(),
booklable.getLabelId(), vo.getLabelContentId());
......
......@@ -31,7 +31,7 @@ import com.zrqx.core.form.resource.bg.pdflibrary.BatchUpdatePdfLibraryForm;
import com.zrqx.core.form.resource.bg.pdflibrary.QueryPdfLibraryForm;
import com.zrqx.core.form.resource.bg.pdflibrary.SavePdfLibraryForm;
import com.zrqx.core.form.resource.bg.pdflibrary.SaveUpdatePdfLibraryForm;
import com.zrqx.core.model.resource.ebook.BookLabel;
import com.zrqx.core.model.resource.ebook.BookLibraryLabel;
import com.zrqx.core.model.resource.pdflibrary.PdfGoods;
import com.zrqx.core.model.resource.pdflibrary.PdfLibrary;
import com.zrqx.core.model.resource.pdflibrary.PdfLibraryDiyType;
......
......@@ -60,7 +60,7 @@ import com.zrqx.core.model.resource.ebook.BookDiyType;
import com.zrqx.core.model.resource.ebook.BookGoods;
import com.zrqx.core.model.resource.ebook.BookGoodsAlbum;
import com.zrqx.core.model.resource.ebook.BookIssued;
import com.zrqx.core.model.resource.ebook.BookLabel;
import com.zrqx.core.model.resource.ebook.BookLibraryLabel;
import com.zrqx.core.model.resource.ebook.Ebook;
import com.zrqx.core.model.resource.imagelibrary.ImageGoods;
import com.zrqx.core.model.resource.imagelibrary.ImageLibrary;
......
package com.zrqx.resource.bg.mapper.ebook;
import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.model.resource.ebook.BookLabel;
import com.zrqx.core.model.resource.ebook.BookLibraryLabel;
/**
* 作者和标签关系
*/
public interface BookLabelMapper extends BaseMapper<BookLabel> {
public interface BookLabelMapper extends BaseMapper<BookLibraryLabel> {
}
......@@ -49,7 +49,7 @@ public interface LabelContentDiyTypeMapper extends BaseMapper<LabelContentDiyTy
*/
@Select("<script>"
+ "select distinct a.id, a.labelId, a.labelContent, a.parentId, a.englishName, a.sort, a.code, a.createTime, a.oldCode "
+ "from res_label_content_diy_type a LEFT JOIN res_${name}_label ia on a.labelId=ia.labelId "
+ "from res_label_content_diy_type a LEFT JOIN res_${name}_library_label ia on a.labelId=ia.labelId "
+ "where a.id in "
+ " <foreach collection=\"ids\" index=\"index\" item=\"id\" open=\"(\" separator=\",\" close=\")\">"
+ "#{id}"
......
......@@ -4,19 +4,19 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.model.resource.ebook.BookLabel;
import com.zrqx.core.model.resource.ebook.BookLibraryLabel;
import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.resource.bg.mapper.ebook.BookLabelMapper;
/**
* 文章库和自定义分类
*/
@Service
public class BookLabelContentDiyTypeSerivceImpl extends BaseServiceImpl<BookLabel,Integer> implements BookLabelContentDiyTypeService {
public class BookLabelContentDiyTypeSerivceImpl extends BaseServiceImpl<BookLibraryLabel,Integer> implements BookLabelContentDiyTypeService {
@Autowired
private BookLabelMapper mapper;
@Override
public BaseMapper<BookLabel> getMapper() {
public BaseMapper<BookLibraryLabel> getMapper() {
return mapper;
}
......
package com.zrqx.resource.bg.service.ebook;
import com.zrqx.core.model.resource.ebook.BookLabel;
import com.zrqx.core.model.resource.ebook.BookLibraryLabel;
import com.zrqx.core.service.BaseService;
/**
* 文章库和标签
*/
public interface BookLabelContentDiyTypeService extends BaseService<BookLabel,Integer>{
public interface BookLabelContentDiyTypeService extends BaseService<BookLibraryLabel,Integer>{
}
......@@ -31,7 +31,7 @@ import com.zrqx.core.model.resource.ebook.BookDiyType;
import com.zrqx.core.model.resource.ebook.BookGoods;
import com.zrqx.core.model.resource.ebook.BookGoodsAlbum;
import com.zrqx.core.model.resource.ebook.BookIssued;
import com.zrqx.core.model.resource.ebook.BookLabel;
import com.zrqx.core.model.resource.ebook.BookLibraryLabel;
import com.zrqx.core.model.resource.ebook.Ebook;
import com.zrqx.core.model.resource.pdflibrary.PdfLibrary;
import com.zrqx.core.model.resource.videolibrary.VideoLibrary;
......@@ -379,14 +379,14 @@ public class EbookServiceImpl extends BaseServiceImpl<Ebook, String> implements
}
ebookDiyTypeMapper.insertUuidList(dtList);
// 删除原有标签关系表中的关系
BookLabel ebldt = new BookLabel();
BookLibraryLabel ebldt = new BookLibraryLabel();
ebldt.setObjectId(book.getId());
ebookLabelDiyTypeMapper.delete(ebldt);
// 添加与标签的关系
List<BookLabel> ldtList = new ArrayList<BookLabel>();
List<BookLibraryLabel> ldtList = new ArrayList<BookLibraryLabel>();
if (form.getLabelId()!=null && form.getLabelId().size() > 0) {
for (int i = 0; i < form.getLabelId().size(); i++) {
BookLabel ldt = new BookLabel();
BookLibraryLabel ldt = new BookLibraryLabel();
ldt.setId(UUIDUtil.getUUID());
ldt.setObjectId(book.getId());
ldt.setLabelContentId(form.getLabelContentId().get(i));
......
......@@ -53,7 +53,7 @@ import com.zrqx.core.model.resource.ebook.Book;
import com.zrqx.core.model.resource.ebook.BookDiyType;
import com.zrqx.core.model.resource.ebook.BookGoods;
import com.zrqx.core.model.resource.ebook.BookGoodsAlbum;
import com.zrqx.core.model.resource.ebook.BookLabel;
import com.zrqx.core.model.resource.ebook.BookLibraryLabel;
import com.zrqx.core.model.resource.ebook.BookResource;
import com.zrqx.core.model.resource.ebook.Ebook;
import com.zrqx.core.model.resource.imagelibrary.ImageGoods;
......@@ -1106,7 +1106,7 @@ public class RecycleBinSerivceImpl extends BaseServiceImpl<RecycleBin,Integer> i
goods.setObjectId(bin.getObjectId());
bookGoodsMapper.delete(goods);
//标签
BookLabel lable=new BookLabel();
BookLibraryLabel lable=new BookLibraryLabel();
lable.setObjectId(bin.getObjectId());
bookLabelContentDiyTypeMapper.delete(lable);
//分类
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论