Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
zgzx
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
zgzx
Commits
5fbb176e
提交
5fbb176e
authored
11月 04, 2019
作者:
lizhuo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
419694cf
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
19 行增加
和
3 行删除
+19
-3
WapEbookController.java
...rqx/resource/wap/controller/ebook/WapEbookController.java
+9
-2
WapBookServiceImpl.java
...ava/com/zrqx/resource/wap/service/WapBookServiceImpl.java
+10
-1
没有找到文件。
com.zrqx.resource/src/main/java/com/zrqx/resource/wap/controller/ebook/WapEbookController.java
浏览文件 @
5fbb176e
package
com
.
zrqx
.
resource
.
wap
.
controller
.
ebook
;
import
java.text.ParseException
;
import
java.util.List
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -9,6 +10,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
import
com.zrqx.core.constant.resource.ResourceRequestPath
;
import
com.zrqx.core.enums.AllResourceTypeEnum
;
import
com.zrqx.core.form.resource.bg.QueryResourceRelationForm
;
import
com.zrqx.core.form.resource.fg.articlelibrary.FgQueryArticleLibraryForm
;
import
com.zrqx.core.model.resource.year.YearLibrary
;
...
...
@@ -23,6 +25,7 @@ import com.zrqx.core.vo.resource.fg.ebook.FgEbookVO;
import
com.zrqx.core.vo.resource.fg.ebook.WapIndexEbookListVO
;
import
com.zrqx.resource.bg.service.ResourceRelationService
;
import
com.zrqx.resource.fg.service.articlelibrary.FgArticleLibraryService
;
import
com.zrqx.resource.fg.service.record.FgRecordService
;
import
com.zrqx.resource.wap.service.WapBookService
;
import
com.zrqx.resource.wap.service.WapYearLibraryService
;
...
...
@@ -50,7 +53,8 @@ public class WapEbookController {
private
ResourceRelationService
resourceRelationService
;
@Autowired
private
WapYearLibraryService
yearLibraryService
;
@Autowired
private
FgRecordService
recordService
;
@ApiOperation
(
"首页最新上架"
)
@GetMapping
(
ResourceRequestPath
.
INDEX
)
...
...
@@ -91,12 +95,15 @@ public class WapEbookController {
@ApiOperation
(
"根据id查找电子书"
)
@GetMapping
(
ResourceRequestPath
.
GET
)
public
CallBack
<
FgEbookVO
>
echo
(
QueryResourceRelationForm
entity
)
{
public
CallBack
<
FgEbookVO
>
echo
(
QueryResourceRelationForm
entity
)
throws
ParseException
{
FgEbookVO
vo
=
bookservice
.
ebookOneInfoById
(
entity
.
getId
()).
get
(
0
);
// 保存浏览记录
recordService
.
saveOrUpdateRecord
(
entity
.
getId
(),
AllResourceTypeEnum
.
BOOK
.
getCode
().
toString
());
// 更新浏览量
bookservice
.
updateBrowseNum
(
entity
.
getId
());
List
<
ResourceRelationVo
>
list
=
resourceRelationService
.
FgqueryByIdAndResourceType
(
entity
);
vo
.
setListArticle
(
resourceRelationService
.
queryfgRelationList
(
list
));
return
CallBack
.
success
(
vo
);
}
}
com.zrqx.resource/src/main/java/com/zrqx/resource/wap/service/WapBookServiceImpl.java
浏览文件 @
5fbb176e
...
...
@@ -12,6 +12,7 @@ import com.zrqx.core.exception.BusinessValidateException;
import
com.zrqx.core.form.resource.fg.articlelibrary.FgQueryArticleLibraryForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.resource.ebook.Book
;
import
com.zrqx.core.model.resource.pdffilelibrary.PdfLibrary
;
import
com.zrqx.core.model.resource.year.YearLibrary
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.core.util.datatype.ArrayUtils
;
...
...
@@ -20,6 +21,7 @@ import com.zrqx.core.vo.resource.fg.articlelibrary.FgArticleLibraryListVO;
import
com.zrqx.core.vo.resource.fg.ebook.FgEbookListVO
;
import
com.zrqx.core.vo.resource.fg.ebook.FgEbookVO
;
import
com.zrqx.core.vo.resource.fg.ebook.WapIndexEbookListVO
;
import
com.zrqx.resource.bg.mapper.pdffilelibrary.PdfLibraryMapper
;
import
com.zrqx.resource.fg.mapper.year.FgYearLibraryMapper
;
import
com.zrqx.resource.wap.mapper.WapBookMapper
;
...
...
@@ -35,7 +37,8 @@ public class WapBookServiceImpl extends BaseServiceImpl<Book, String> implements
private
WapBookMapper
bookMapper
;
@Autowired
private
FgYearLibraryMapper
fgYearLibraryMapper
;
@Autowired
private
PdfLibraryMapper
pdfLibraryMapper
;
@Override
public
BaseMapper
<
Book
>
getMapper
()
{
return
bookMapper
;
...
...
@@ -120,6 +123,12 @@ public class WapBookServiceImpl extends BaseServiceImpl<Book, String> implements
for
(
FgEbookVO
vo
:
list
)
{
YearLibrary
library
=
fgYearLibraryMapper
.
selectByPrimaryKey
(
vo
.
getYearId
());
vo
.
setName
(
vo
.
getName
()+
"["
+
library
.
getName
()+
"年第"
+
vo
.
getPeriods
()+
"期]"
);
PdfLibrary
pdfLibrary
=
pdfLibraryMapper
.
selectByPrimaryKey
(
vo
.
getPdf
());
if
(
pdfLibrary
!=
null
)
{
vo
.
setPdf
(
pdfLibrary
.
getPdf
());
}
else
{
vo
.
setPdf
(
null
);
}
}
/*this.regEx(list);*/
return
list
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论