|
@@ -22,6 +22,7 @@ import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
@@ -332,4 +333,48 @@ public class ProductServiceImpl implements ProductService {
|
|
|
baikeDao.encyclopediaPv(id);
|
|
|
return JsonModel.success();
|
|
|
}
|
|
|
+ @Override
|
|
|
+ public List<BaikeProductVo> getAuthUserList(String entryName){
|
|
|
+ List<BaikeProductVo> authUserList = baikeDao.getAuthUserList(entryName);
|
|
|
+ return authUserList;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public BaikeProductVo getEncyclopediaDetail(Integer id){
|
|
|
+ //获取词条基本信息
|
|
|
+ BaikeProductVo entryInfo = baikeDao.getEntryInfoById(id);
|
|
|
+ //概述图册
|
|
|
+ List<BaikeImageVo> imageListById = baikeDao.getImageListById(id);
|
|
|
+ entryInfo.setImageList(imageListById);
|
|
|
+ //视频列表
|
|
|
+ List<BaikeVideoVo> videoList = baikeDao.getVideoListById(id);
|
|
|
+ entryInfo.setVideoList(videoList);
|
|
|
+ //信息栏
|
|
|
+ List<BaikeInfoVo> infoList = baikeDao.getInfoListById(id);
|
|
|
+ entryInfo.setInfoList(infoList);
|
|
|
+ //正文
|
|
|
+ List<BaikeTextInfoVo> textInfoListList = baikeDao.getTextInfoListById(id);
|
|
|
+ entryInfo.setTextInfoListList(textInfoListList);
|
|
|
+ //参考资料
|
|
|
+ List<CmBaikeReferenceInfo> referenceList = baikeDao.getReferenceListById(id);
|
|
|
+ if(referenceList!=null&&referenceList.size()>0){
|
|
|
+ for(CmBaikeReferenceInfo reference : referenceList){
|
|
|
+ SimpleDateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ if(null!=reference.getPublishTime()){
|
|
|
+ String publishTime= dateFormat.format(reference.getPublishTime());
|
|
|
+ reference.setPublishTimeStr(publishTime);
|
|
|
+ }
|
|
|
+ if(null!=reference.getAcitationTime()){
|
|
|
+ String acitationTime= dateFormat.format(reference.getAcitationTime());
|
|
|
+ reference.setAcitationTimeStr(acitationTime);
|
|
|
+ }
|
|
|
+ if(null!=reference.getPublicationYear()){
|
|
|
+ String publicationYear= dateFormat.format(reference.getPublicationYear());
|
|
|
+ reference.setPublicationYearStr(publicationYear);
|
|
|
+ }
|
|
|
+ };
|
|
|
+ }
|
|
|
+ entryInfo.setReferenceList(referenceList);
|
|
|
+ return entryInfo;
|
|
|
+ }
|
|
|
}
|