提交 38de2c90 authored 作者: renjianyu's avatar renjianyu

--no commit message

上级 96663c41
......@@ -23,6 +23,7 @@ import com.zrqx.core.exception.BaseException;
import com.zrqx.core.util.page.PageInfo;
import com.zrqx.core.util.page.PageParam;
import com.zrqx.core.util.response.CallBack;
import com.zrqx.resource.bg.service.RelationAuthorService;
import com.zrqx.resource.bg.service.ResourceRelationService;
import com.zrqx.resource.bg.service.articlelibrary.ArticleLibraryDiyTypeService;
import com.zrqx.resource.bg.service.articlelibrary.ArticleLibraryLabelContentDiyTypeService;
......@@ -40,6 +41,7 @@ import com.zrqx.resource.commons.model.articlelibrary.ArticleLibrary;
import com.zrqx.resource.commons.model.articlelibrary.ArticleLibraryDiyType;
import com.zrqx.resource.commons.model.articlelibrary.ArticleLibraryLabelContentDiyType;
import com.zrqx.resource.commons.model.marketing.PromotionContent;
import com.zrqx.resource.commons.model.resourcerelation.RelationAuthor;
import com.zrqx.resource.commons.solr.SolrManage;
import com.zrqx.resource.commons.vo.bg.articlelibrary.ArticleLibraryListVO;
import com.zrqx.resource.commons.vo.bg.articlelibrary.ArticleLibraryOneVO;
......@@ -68,11 +70,7 @@ public class ArticleLibraryController {
@Autowired
private ArticleLibraryLabelContentDiyTypeService alcdService;
@Autowired
private AudioLibraryService audioLibraryService;
@Autowired
private PdfLibraryService pdfLibraryService;
@Autowired
private VideoLibraryService videoLibraryService;
private RelationAuthorService relationAuthorService;
/** 推荐位内容*/
@Autowired
......@@ -272,17 +270,6 @@ public class ArticleLibraryController {
ArticleLibrary entity = service.selectByPrimaryKey(oid);
ArticleLibraryOneVO vo = new ArticleLibraryOneVO();
BeanUtils.copyProperties(entity, vo);
if(StringUtils.isNotBlank(entity.getAuthorId())){
vo.setAuthorNameAndId(entity.getAuthor() + "," + entity.getAuthorId());
}else{
vo.setAuthorNameAndId(entity.getAuthor());
}
if(entity.getRealPrice() != null){
vo.setRealPrice(entity.getRealPrice().toString());
}
if(entity.getPrice() != null){
vo.setPrice(entity.getPrice().toString());
}
//组装自定义分类
Example example = adrService.createExample();
example.createCriteria().andEqualTo("alId", oid);
......@@ -298,6 +285,11 @@ public class ArticleLibraryController {
// 选中的LabelContentDiyTypeId
List<Integer> labelContentDiyTypeIds = alcdList.stream().map(ArticleLibraryLabelContentDiyType :: getLabelContentDiyTypeId).collect(Collectors.toList());
vo.setLabelContentDiyTypeIds(labelContentDiyTypeIds);
// 关联作者集合
example = relationAuthorService.createExample();
example.createCriteria().andEqualTo("resourceId", oid);
List<RelationAuthor> baList = relationAuthorService.selectByExample(example);
vo.setAuthorList(baList);
return CallBack.success(vo);
}
@ApiOperation(value = "分页查询" , notes ="分页查询")
......
......@@ -205,16 +205,7 @@ public class EbookController {
if(book.getPublishTime() != null){
vo.setPublishTime(DateUtils.dateTimeToStr(book.getPublishTime(), DateUtils.DATE_FORMAT_YYYY_MM_DD));
}
/*if(StringUtils.isNotBlank(book.getAuthorId())){
vo.setAuthorNameAndId(book.getAuthor() + "," + book.getAuthorId());
}else{
vo.setAuthorNameAndId(book.getAuthor());
}
if(StringUtils.isNotBlank(book.getTranslatorId())){
vo.setTranslatorNameAndId(book.getTranslator() + "," + book.getTranslatorId());
}else{
vo.setTranslatorNameAndId(book.getTranslator());
}*/
if(StringUtils.isNotBlank(book.getFontCount())){
vo.setFontCount(Integer.parseInt(book.getFontCount()));
}
......
......@@ -3,6 +3,7 @@ package com.zrqx.resource.commons.vo.bg.articlelibrary;
import java.util.List;
import com.zrqx.resource.commons.model.articlelibrary.ArticleLibraryLabelContentDiyType;
import com.zrqx.resource.commons.model.resourcerelation.RelationAuthor;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -55,6 +56,6 @@ public class ArticleLibraryOneVO {
private String pdfName;
@ApiModelProperty("售价选项 0 免费,1收费")
private Integer priceOption;
@ApiModelProperty(value = "作者名称和id(用,隔开)")
private String authorNameAndId;
@ApiModelProperty(value = "作者集合")
private List<RelationAuthor> authorList;
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论