提交 a8b26c7f authored 作者: renjianyu's avatar renjianyu

--no commit message

上级 cca51bbc
......@@ -103,7 +103,7 @@ public class AnnexLibrarySerivceImpl extends BaseServiceImpl<AnnexLibrary,String
entity.setStatus(LibraryStatusEnum.STATUS_0.getCode());
entity.setUploadTime(new Date());
entity.setResourceType(AllResourceTypeEnum.ANNEX.getCode());
entity.setBrowseNum(50);
entity.setBrowseNum(0);
entity.setReadTextPower(1);
entity.setDownloadNum(50);
entity.setSalesNum(0);
......
......@@ -102,7 +102,7 @@ public class ArticleLibrarySerivceImpl extends BaseServiceImpl<ArticleLibrary,St
//添加
entity.setStatus(LibraryStatusEnum.STATUS_0.getCode());
entity.setUploadTime(new Date());
entity.setBrowseNum(50);//浏览数量
entity.setBrowseNum(0);//浏览数量
entity.setReadTextPower(1);
entity.setSalesNum(0);
entity.setGoodsType(GoodsTypeEnum.ARTICLE.getCode());
......
......@@ -118,7 +118,7 @@ public class AudioLibrarySerivceImpl extends BaseServiceImpl<AudioLibrary,String
entity.setUploadTime(new Date());
entity.setUpdateTime(new Date());
entity.setResourceType(AllResourceTypeEnum.AUDIO.getCode());
entity.setBrowseNum(50);
entity.setBrowseNum(0);
entity.setSalesNum(0);
mapper.insert(entity);
// QrCode qrCode = new QrCode();
......@@ -177,7 +177,7 @@ public class AudioLibrarySerivceImpl extends BaseServiceImpl<AudioLibrary,String
form.forEach(f -> {
AudioLibrary entity = new AudioLibrary();
BeanUtils.copyProperties(f, entity);
entity.setBrowseNum(50);
entity.setBrowseNum(0);
entity.setResourceType(AllResourceTypeEnum.AUDIO.getCode());
entity.setPriceOption(PriceOptionEnum.STATUS_0.getCode());
entity.setRealPrice(new BigDecimal(0));
......
......@@ -100,7 +100,7 @@ public class CartoonLibrarySerivceImpl extends BaseServiceImpl<CartoonLibrary,St
entity.setStatus(LibraryStatusEnum.STATUS_0.getCode());
entity.setUploadTime(new Date());
entity.setUpdateTime(new Date());
entity.setBrowseNum(50);
entity.setBrowseNum(0);
entity.setResourceType(AllResourceTypeEnum.CARTOON.getCode());
mapper.insert(entity);
}else{
......
......@@ -87,7 +87,7 @@ public class H5LibrarySerivceImpl extends BaseServiceImpl<H5Library,String> impl
entity.setStatus(LibraryStatusEnum.STATUS_0.getCode());
entity.setUploadTime(new Date());
entity.setUpdateTime(new Date());
entity.setBrowseNum(50);
entity.setBrowseNum(0);
entity.setResourceType(AllResourceTypeEnum.H5.getCode());
mapper.insert(entity);
......
......@@ -101,7 +101,7 @@ public class ImageLibrarySerivceImpl extends BaseServiceImpl<ImageLibrary,String
entity.setStatus(LibraryStatusEnum.STATUS_0.getCode());
entity.setUploadTime(new Date());
entity.setResourceType(AllResourceTypeEnum.IMAGE.getCode());
entity.setBrowseNum(50);
entity.setBrowseNum(0);
entity.setReadTextPower(1);
entity.setDownloadNum(50);
entity.setSalesNum(0);
......
......@@ -94,7 +94,7 @@ public class PaintingLibrarySerivceImpl extends BaseServiceImpl<PaintingLibrary,
entity.setStatus(LibraryStatusEnum.STATUS_0.getCode());
entity.setUploadTime(new Date());
entity.setUpdateTime(new Date());
entity.setBrowseNum(50);
entity.setBrowseNum(0);
entity.setResourceType(AllResourceTypeEnum.PAINTING.getCode());
mapper.insert(entity);
......
......@@ -73,7 +73,7 @@ public class ProjectLibrarySerivceImpl extends BaseServiceImpl<ProjectLibrary,St
//添加专题
entity.setUploadTime(new Date());
entity.setResourceType(AllResourceTypeEnum.PROJECT.getCode());
entity.setBrowseNum(50);
entity.setBrowseNum(0);
if(mapper.insert(entity) == 0){
throw new BaseException("保存失败!");
}
......
......@@ -133,7 +133,7 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,String
entity.setUploadTime(new Date());
entity.setUpdateTime(new Date());
entity.setResourceType(AllResourceTypeEnum.VIDEO.getCode());
entity.setBrowseNum(50);
entity.setBrowseNum(0);
entity.setShares(0);
entity.setSalesNum(0);
entity.setSalesType(SalsesTypeEnum.STATUS_1.getCode());
......@@ -204,7 +204,7 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,String
form.forEach(f -> {
VideoLibrary entity = new VideoLibrary();
BeanUtils.copyProperties(f, entity);
entity.setBrowseNum(50);
entity.setBrowseNum(0);
entity.setShares(0);
entity.setSalesType(SalsesTypeEnum.STATUS_1.getCode());
entity.setResourceType(AllResourceTypeEnum.VIDEO.getCode());
......
......@@ -85,7 +85,7 @@ public class VrLibrarySerivceImpl extends BaseServiceImpl<VrLibrary,String> impl
entity.setStatus(LibraryStatusEnum.STATUS_0.getCode());
entity.setUploadTime(new Date());
entity.setUpdateTime(new Date());
entity.setBrowseNum(50);
entity.setBrowseNum(0);
entity.setResourceType(AllResourceTypeEnum.VR.getCode());
mapper.insert(entity);
......
......@@ -92,4 +92,7 @@ public class Ebook {
private String editRecommendation;
@ApiModelProperty("精彩书摘")
private String digest;
@ApiModelProperty("电子书顺序,用于解放军出版社星火燎原")
private Integer ebookOrderNum;
}
......@@ -1094,6 +1094,7 @@ public class FgResourceLibraryController {
}
fqSq.append(")");
}
System.out.println(fqSq.toString());
sq.set("fq", fqSq.toString());
if(StringUtils.isBlank(form.getContent())){
// 设置查询条件
......@@ -1156,24 +1157,24 @@ public class FgResourceLibraryController {
//分类和标签返显
//this.solrListOfLabelAndDiyType(form, resultPage);
// 查询全部分类
String diyTypeName = null;
if(form.getResourceType() != null){
//判断搜索资源类型,过滤
if(form.getResourceType().equals(AllResourceTypeEnum.BOOK.getCode())){
diyTypeName = "图书分类";
}
if(form.getResourceType().equals(AllResourceTypeEnum.VIDEO.getCode())){
diyTypeName = "视频分类";
}
if(form.getResourceType().equals(AllResourceTypeEnum.AUDIO.getCode())){
diyTypeName = "音频分类";
}
}
List<FgDiyTypeVo> diyTypeList = this.tree(diyTypeName);
if(ArrayUtils.isNotEmpty(diyTypeList)){
diyTypeList = diyTypeList.get(0).getChildren();
}
resultPage.setDiyTypeList(diyTypeList);
// String diyTypeName = null;
// if(form.getResourceType() != null){
// //判断搜索资源类型,过滤
// if(form.getResourceType().equals(AllResourceTypeEnum.BOOK.getCode())){
// diyTypeName = "图书分类";
// }
// if(form.getResourceType().equals(AllResourceTypeEnum.VIDEO.getCode())){
// diyTypeName = "视频分类";
// }
// if(form.getResourceType().equals(AllResourceTypeEnum.AUDIO.getCode())){
// diyTypeName = "音频分类";
// }
// }
// List<FgDiyTypeVo> diyTypeList = this.tree(diyTypeName);
// if(ArrayUtils.isNotEmpty(diyTypeList)){
// diyTypeList = diyTypeList.get(0).getChildren();
// }
//resultPage.setDiyTypeList(diyTypeList);
} catch (Exception e) {
e.printStackTrace();
}
......@@ -1184,7 +1185,10 @@ public class FgResourceLibraryController {
// 遍历数据
for(SolrDocument solrDocument : doclist) {
// 图书
if(solrDocument.get("resourceType").equals(AllResourceTypeEnum.BOOK.getCode())){
/*
if(solrDocument.get("resourceType").equals(AllResourceTypeEnum.BOOK.getCode()
)){
//存储每个高亮处理后的结果
Map<String, Object> resultMap = new HashMap<String, Object>();
FgEbookVO ebookVo = new FgEbookVO();
......@@ -1474,40 +1478,41 @@ public class FgResourceLibraryController {
}
reslist.add(resultMap);
}
// 直播
if(solrDocument.get("resourceType").equals(AllResourceTypeEnum.LIVE.getCode())){
*/
//存储每个高亮处理后的结果
Map<String, Object> resultMap = new HashMap<String, Object>();
FgLiveVO vo = new FgLiveVO();
vo = resourceLibraryService.getInfoBysolrDocument(solrDocument);
resultMap.put("message", vo.getMessage());
resultMap.put("messageCode", vo.getMessageCode());
//FgLiveVO vo = new FgLiveVO();
//vo = resourceLibraryService.getInfoBysolrDocument(solrDocument);
//resultMap.put("message", vo.getMessage());
//resultMap.put("messageCode", vo.getMessageCode());
//查询结果的id,存入map
resultMap.put("id",solrDocument.get("id"));
resultMap.put("status", solrDocument.get("status"));
resultMap.put("liveStatus", solrDocument.get("liveStatus"));
resultMap.put("img", solrDocument.get("img"));;
resultMap.put("price", solrDocument.get("price"));
resultMap.put("realPrice", solrDocument.get("realPrice"));
resultMap.put("priceOption", solrDocument.get("priceOption"));
resultMap.put("liveTime",formatLiveDate((Date)solrDocument.get("liveTime")));
resultMap.put("browseNum",solrDocument.get("browseNum"));
resultMap.put("resourceType",solrDocument.get("resourceType"));
resultMap.put("name", solrDocument.get("name"));
resultMap.put("synopsis", solrDocument.get("synopsis"));
resultMap.put("timeLength", solrDocument.get("timeLength"));;
resultMap.put("ordernum", solrDocument.get("ordernum"));
resultMap.put("ebookOrderNum", solrDocument.get("ebookOrderNum"));
resultMap.put("resourceType", solrDocument.get("resourceType"));
//resultMap.put("liveTime",formatLiveDate((Date)solrDocument.get("liveTime")));
//resultMap.put("browseNum",solrDocument.get("browseNum"));
//resultMap.put("resourceType",solrDocument.get("resourceType"));
resultMap.put("name",solrDocument.get("name"));
resultMap.put("author", solrDocument.get("author"));
resultMap.put("authorId", solrDocument.get("authorId"));
//resultMap.put("name",solrDocument.get("name"));
//resultMap.put("author", solrDocument.get("author"));
//resultMap.put("authorId", solrDocument.get("authorId"));
//将高亮处理的结果存人resultMap
if(highlightMap != null){
if(highlightMap.get(solrDocument.get("id")).get("name") != null){
resultMap.put("name", highlightMap.get(solrDocument.get("id")).get("name").get(0));
}
if(highlightMap.get(solrDocument.get("id")).get("Author") != null){
resultMap.put("author", highlightMap.get(solrDocument.get("id")).get("author").get(0));
}
// if(highlightMap.get(solrDocument.get("id")).get("Author") != null){
// resultMap.put("author", highlightMap.get(solrDocument.get("id")).get("author").get(0));
// }
}
reslist.add(resultMap);
}
}
return reslist;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论