Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
rszt
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
rszt
Commits
b3266fc9
提交
b3266fc9
authored
12月 15, 2020
作者:
renjiancai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
d8e5dbef
隐藏空白字符变更
内嵌
并排
正在显示
20 个修改的文件
包含
118 行增加
和
494 行删除
+118
-494
VideoLibrary.java
...m/zrqx/core/model/resource/videolibrary/VideoLibrary.java
+1
-1
FgArticleLibraryListVO.java
...vo/resource/fg/articlelibrary/FgArticleLibraryListVO.java
+1
-17
FgImageLibraryVO.java
...qx/core/vo/resource/fg/imagelibrary/FgImageLibraryVO.java
+0
-69
FgVideoLibraryListVO.java
...ore/vo/resource/fg/videolibrary/FgVideoLibraryListVO.java
+0
-4
VideoLibraryMapper.java
...x/resource/bg/mapper/videolibrary/VideoLibraryMapper.java
+5
-0
VideoLibrarySerivceImpl.java
...urce/bg/service/videolibrary/VideoLibrarySerivceImpl.java
+6
-0
VideoLibraryService.java
...resource/bg/service/videolibrary/VideoLibraryService.java
+8
-0
FgArticleLibraryController.java
...controller/articlelibrary/FgArticleLibraryController.java
+6
-125
FgDiyTypeController.java
...x/resource/fg/controller/diytype/FgDiyTypeController.java
+8
-10
FgEbookController.java
.../zrqx/resource/fg/controller/ebook/FgEbookController.java
+8
-17
FgEbookMainBodyController.java
...source/fg/controller/ebook/FgEbookMainBodyController.java
+5
-3
FgImageLibraryController.java
.../fg/controller/imagelibrary/FgImageLibraryController.java
+1
-1
FgResourceLibraryController.java
...ntroller/resourcelibrary/FgResourceLibraryController.java
+0
-17
FgVideoLibraryController.java
.../fg/controller/videolibrary/FgVideoLibraryController.java
+34
-0
FgArticleLibraryMapper.java
...urce/fg/mapper/articlelibrary/FgArticleLibraryMapper.java
+2
-94
FgImageLibraryMapper.java
...resource/fg/mapper/imagelibrary/FgImageLibraryMapper.java
+1
-1
FgArticleLibrarySerivceImpl.java
...g/service/articlelibrary/FgArticleLibrarySerivceImpl.java
+2
-87
FgArticleLibraryService.java
...ce/fg/service/articlelibrary/FgArticleLibraryService.java
+4
-26
FgBookService.java
...ava/com/zrqx/resource/fg/service/ebook/FgBookService.java
+13
-11
FgBookServiceImpl.java
...com/zrqx/resource/fg/service/ebook/FgBookServiceImpl.java
+13
-11
没有找到文件。
com.zrqx.core/src/main/java/com/zrqx/core/model/resource/videolibrary/VideoLibrary.java
浏览文件 @
b3266fc9
...
...
@@ -52,7 +52,7 @@ public class VideoLibrary {
private
BigDecimal
price
;
@ApiModelProperty
(
"售价"
)
private
BigDecimal
realPrice
;
@ApiModelProperty
(
"状态:1已上架,
2
已下架"
)
@ApiModelProperty
(
"状态:1已上架,
0
已下架"
)
private
Integer
status
;
@ApiModelProperty
(
"上传时间"
)
private
Date
uploadTime
;
...
...
com.zrqx.core/src/main/java/com/zrqx/core/vo/resource/fg/articlelibrary/FgArticleLibraryListVO.java
浏览文件 @
b3266fc9
...
...
@@ -15,22 +15,6 @@ public class FgArticleLibraryListVO {
private
String
id
;
@ApiModelProperty
(
value
=
"文章标题"
)
private
String
name
;
@ApiModelProperty
(
value
=
"简介"
)
private
String
synopsis
;
@ApiModelProperty
(
"来源"
)
private
String
source
;
@ApiModelProperty
(
"上传时间"
)
private
String
uploadTime
;
@ApiModelProperty
(
value
=
"年份"
)
private
String
year
;
@ApiModelProperty
(
value
=
"年份Id"
)
private
String
yearId
;
@ApiModelProperty
(
value
=
"期数"
)
private
String
periods
;
@ApiModelProperty
(
value
=
"杂志主体"
)
private
String
mainBody
;
@ApiModelProperty
(
"封面"
)
private
String
bookCover
;
@ApiModelProperty
(
"资源类型"
)
private
Integer
resourceType
;
private
String
img
;
}
com.zrqx.core/src/main/java/com/zrqx/core/vo/resource/fg/imagelibrary/FgImageLibraryVO.java
浏览文件 @
b3266fc9
...
...
@@ -2,9 +2,6 @@ package com.zrqx.core.vo.resource.fg.imagelibrary;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.Date
;
import
lombok.Data
;
/**
...
...
@@ -20,73 +17,7 @@ public class FgImageLibraryVO {
private
String
id
;
@ApiModelProperty
(
value
=
"图片名称"
)
private
String
name
;
@ApiModelProperty
(
"作者id"
)
private
String
authorId
;
@ApiModelProperty
(
"作者"
)
private
String
author
;
@ApiModelProperty
(
"来源"
)
private
String
source
;
@ApiModelProperty
(
"关键词"
)
private
String
keywords
;
@ApiModelProperty
(
"定价"
)
private
String
price
;
@ApiModelProperty
(
"售价"
)
private
String
realPrice
;
@ApiModelProperty
(
"简介"
)
private
String
synopsis
;
@ApiModelProperty
(
"正文"
)
private
String
text
;
@ApiModelProperty
(
"image"
)
private
String
image
;
@ApiModelProperty
(
"状态:0已录入,1已上架,2已下架"
)
private
Integer
status
;
@ApiModelProperty
(
"图书id"
)
private
String
bookId
;
@ApiModelProperty
(
"图书名称"
)
private
String
bookName
;
@ApiModelProperty
(
"上传时间"
)
private
Date
uploadTime
;
@ApiModelProperty
(
"更新时间"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"销量"
)
private
Integer
salesNum
;
@ApiModelProperty
(
value
=
"浏览量"
)
private
Integer
browseNum
;
@ApiModelProperty
(
value
=
"下载次数"
)
private
Integer
downloadNum
;
@ApiModelProperty
(
"文件大小"
)
private
String
size
;
@ApiModelProperty
(
"格式"
)
private
String
formats
;
@ApiModelProperty
(
"折扣"
)
private
String
discount
;
@ApiModelProperty
(
"资源类型"
)
private
Integer
resourceType
;
@ApiModelProperty
(
"资源类型名称"
)
private
String
resourceTypeName
;
@ApiModelProperty
(
"全文阅读权限 0 游客可见 1会员可见"
)
private
Integer
readTextPower
;
@ApiModelProperty
(
"0:未收藏;1:已收藏"
)
private
Integer
isCollection
;
@ApiModelProperty
(
"0:未购买;1:已购买"
)
private
Integer
isBuy
;
@ApiModelProperty
(
"0:未登录;1:已登录"
)
private
Integer
isLogin
;
@ApiModelProperty
(
"0:付费;1:免费"
)
private
Integer
isFree
;
@ApiModelProperty
(
"0:不是作者;1:是作者"
)
private
Integer
isAuthor
;
@ApiModelProperty
(
"0:阅读;1:加入购车;2:加入购物车(按钮置灰)"
)
private
Integer
isStatus
;
@ApiModelProperty
(
"提示消息code"
)
private
Integer
messageCode
;
@ApiModelProperty
(
"提示消息"
)
private
String
message
;
@ApiModelProperty
(
"评论数量"
)
private
Integer
commentNum
;
@ApiModelProperty
(
"资源评分"
)
private
Integer
resourceScore
;
}
com.zrqx.core/src/main/java/com/zrqx/core/vo/resource/fg/videolibrary/FgVideoLibraryListVO.java
浏览文件 @
b3266fc9
...
...
@@ -18,12 +18,8 @@ public class FgVideoLibraryListVO {
private
String
cover
;
@ApiModelProperty
(
value
=
"视频名称"
)
private
String
name
;
@ApiModelProperty
(
"播放量"
)
private
Integer
clickNum
;
@ApiModelProperty
(
"时长"
)
private
String
timeLength
;
@ApiModelProperty
(
"资源类型 1图书、2医家、3文章、4图片、5视频、6音频、7附件"
)
private
Integer
resourceType
;
@ApiModelProperty
(
"简介"
)
private
String
synopsis
;
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/mapper/videolibrary/VideoLibraryMapper.java
浏览文件 @
b3266fc9
...
...
@@ -10,6 +10,7 @@ import com.zrqx.core.form.resource.bg.videolibrary.QueryVideoLibraryForm;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.resource.videolibrary.VideoLibrary
;
import
com.zrqx.core.vo.resource.ResourceRelationListVo
;
import
com.zrqx.core.vo.resource.fg.videolibrary.FgVideoLibraryListVO
;
import
com.zrqx.core.vo.resource.videolibrary.VideoLibraryListVO
;
import
com.zrqx.resource.bg.mapper.MapperConstants
;
/**
...
...
@@ -149,5 +150,9 @@ public interface VideoLibraryMapper extends BaseMapper<VideoLibrary> {
*/
@Select
(
"SELECT MAX(sort) FROM res_video_library "
)
Integer
getMaxSort
();
@Select
(
"<script>"
+
"select id,name,cover,synopsis,timeLength from res_Video_Library where 1 = 1 and status=1 ORDER BY sort asc LIMIT 2"
+
"</script>"
)
List
<
FgVideoLibraryListVO
>
list
();
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/videolibrary/VideoLibrarySerivceImpl.java
浏览文件 @
b3266fc9
...
...
@@ -26,6 +26,7 @@ import com.zrqx.core.util.page.PageInfo;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.vo.ImportLabelVo
;
import
com.zrqx.core.vo.resource.ResourceRelationListVo
;
import
com.zrqx.core.vo.resource.fg.videolibrary.FgVideoLibraryListVO
;
import
com.zrqx.core.vo.resource.videolibrary.ExcelVideoImportVo
;
import
com.zrqx.core.vo.resource.videolibrary.VideoLibraryListVO
;
import
com.zrqx.resource.bg.mapper.videolibrary.VideoLibraryMapper
;
...
...
@@ -324,4 +325,9 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,String
return
new
PageInfo
<
ResourceRelationListVo
>(
list
);
}
@Override
public
List
<
FgVideoLibraryListVO
>
list
()
{
List
<
FgVideoLibraryListVO
>
list
=
mapper
.
list
();
return
list
;
}
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/videolibrary/VideoLibraryService.java
浏览文件 @
b3266fc9
...
...
@@ -14,6 +14,7 @@ import com.zrqx.core.util.page.PageInfo;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.vo.ImportLabelVo
;
import
com.zrqx.core.vo.resource.ResourceRelationListVo
;
import
com.zrqx.core.vo.resource.fg.videolibrary.FgVideoLibraryListVO
;
import
com.zrqx.core.vo.resource.videolibrary.VideoLibraryListVO
;
/**
* 视频库
...
...
@@ -111,5 +112,12 @@ public interface VideoLibraryService extends BaseService<VideoLibrary,String>{
* @return
*/
Integer
getMaxSort
();
/**
* 首页-创业大讲堂
* @return
* @author rjc
* @date: 2020年12月15日 下午2:14:37
*/
List
<
FgVideoLibraryListVO
>
list
();
}
com.zrqx.resource/src/main/java/com/zrqx/resource/fg/controller/articlelibrary/FgArticleLibraryController.java
浏览文件 @
b3266fc9
package
com
.
zrqx
.
resource
.
fg
.
controller
.
articlelibrary
;
import
java.text.ParseException
;
import
java.util.List
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.github.pagehelper.PageHelper
;
import
com.zrqx.core.constant.resource.ResourceRequestPath
;
import
com.zrqx.core.enums.AllResourceTypeEnum
;
import
com.zrqx.core.enums.ResponseCodeEnum
;
import
com.zrqx.core.exception.ParameterValidateException
;
import
com.zrqx.core.form.resource.fg.articlelibrary.FgDirectoryForm
;
import
com.zrqx.core.model.resource.articlelibrary.ArticleLibrary
;
import
com.zrqx.core.model.resource.articlelibrary.ChapterLibrary
;
import
com.zrqx.core.util.bean.BeanUtils
;
import
com.zrqx.core.util.response.CallBack
;
import
com.zrqx.core.vo.resource.fg.articlelibrary.FgArticleLibraryOneVO
;
import
com.zrqx.core.vo.resource.fg.marketing.FgPromotionInfoOneVO
;
import
com.zrqx.core.vo.resource.fg.articlelibrary.FgArticleLibraryListVO
;
import
com.zrqx.resource.fg.service.articlelibrary.FgArticleLibraryService
;
import
com.zrqx.resource.fg.service.articlelibrary.FgChapterLibraryService
;
import
com.zrqx.resource.fg.service.record.FgRecordService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
tk.mybatis.mapper.entity.Example
;
/**
...
...
@@ -36,119 +21,15 @@ import tk.mybatis.mapper.entity.Example;
*/
@RestController
@RequestMapping
(
ResourceRequestPath
.
FG
+
ResourceRequestPath
.
ARTICLE_LIBRARY
)
@Api
(
description
=
"前台-
文章库
"
)
@Api
(
description
=
"前台-
在线展板
"
)
public
class
FgArticleLibraryController
{
@Autowired
private
FgArticleLibraryService
service
;
@Autowired
private
FgChapterLibraryService
clservice
;
/** 浏览记录*/
@Autowired
private
FgRecordService
recordService
;
@Autowired
private
FgChapterLibraryService
chapterLibraryService
;
@ApiOperation
(
value
=
"查询"
,
notes
=
"根据ID查询"
)
@GetMapping
(
value
=
ResourceRequestPath
.
GET_OID
)
public
CallBack
<
FgArticleLibraryOneVO
>
getById
(
@PathVariable
String
oid
)
throws
ParseException
{
FgArticleLibraryOneVO
vo
=
service
.
articleOneInfoById
(
oid
,
true
);
// 保存浏览记录
recordService
.
saveOrUpdateRecord
(
oid
,
AllResourceTypeEnum
.
ARTICLE
.
getCode
().
toString
());
// 更新浏览量
service
.
updateBrowseNum
(
oid
);
vo
.
setResourceTypeName
(
AllResourceTypeEnum
.
ARTICLE
.
getName
());
return
CallBack
.
success
(
vo
);
}
@ApiOperation
(
value
=
"目录页查询文章"
,
notes
=
"目录页查询文章"
)
@GetMapping
(
value
=
ResourceRequestPath
.
GET
)
public
CallBack
<
FgArticleLibraryOneVO
>
getByOne
(
FgDirectoryForm
form
)
{
FgArticleLibraryOneVO
articleLibraryOneVO
=
new
FgArticleLibraryOneVO
();
String
id
=
null
;
List
<
ChapterLibrary
>
chapterList
=
this
.
getDirectory
(
form
.
getBookId
());
if
(!
chapterList
.
isEmpty
()){
articleLibraryOneVO
.
setOrderMinNum
(
chapterList
.
get
(
0
).
getOrderNum
());
}
//通过bookID和MarkID查询文章
ArticleLibrary
articleLibrary
=
new
ArticleLibrary
();
if
(
form
.
getOrderNum
()
==
null
){
articleLibrary
.
setBookId
(
form
.
getBookId
());
articleLibrary
.
setMarkid
(
form
.
getMarkId
());
articleLibrary
=
service
.
selectOne
(
articleLibrary
);
BeanUtils
.
copyProperties
(
articleLibrary
,
articleLibraryOneVO
);
ChapterLibrary
directory
=
new
ChapterLibrary
();
directory
.
setBookid
(
form
.
getBookId
());
directory
.
setMarkid
(
form
.
getMarkId
());
ChapterLibrary
directorys
=
chapterLibraryService
.
selectOne
(
directory
);
articleLibraryOneVO
.
setOrderNum
(
directorys
.
getOrderNum
());
id
=
articleLibrary
.
getId
();
//通过bookID和orderNum查询文章
}
else
{
Integer
orderNum
=
form
.
getOrderNum
();
ChapterLibrary
directory
=
new
ChapterLibrary
();
directory
.
setBookid
(
form
.
getBookId
());
directory
.
setOrderNum
(
orderNum
);
ChapterLibrary
directorys
=
chapterLibraryService
.
selectOne
(
directory
);
articleLibrary
.
setBookId
(
directorys
.
getBookid
());
articleLibrary
.
setMarkid
(
directorys
.
getMarkid
());
articleLibrary
=
service
.
selectOne
(
articleLibrary
);
if
(
articleLibrary
==
null
){
articleLibraryOneVO
.
setBookId
(
form
.
getBookId
());
articleLibraryOneVO
.
setOrderNum
(
orderNum
);
return
CallBack
.
success
(
articleLibraryOneVO
);
}
BeanUtils
.
copyProperties
(
articleLibrary
,
articleLibraryOneVO
);
articleLibraryOneVO
.
setOrderNum
(
orderNum
);
id
=
articleLibrary
.
getId
();
}
//判断权限
FgArticleLibraryOneVO
vo
=
service
.
articleOneInfoById
(
id
,
false
);
articleLibraryOneVO
.
setMessageCode
(
vo
.
getMessageCode
());
articleLibraryOneVO
.
setMessage
(
vo
.
getMessage
());
if
(
vo
.
getMessageCode
()
!=
null
){
if
(
StringUtils
.
isNotBlank
(
vo
.
getText
())){
String
text
=
vo
.
getText
().
replaceAll
(
"\\<.*?>"
,
""
);
Integer
totalCount
=
text
.
length
();
Integer
count
=
totalCount
/
2
;
vo
.
setText
(
text
.
substring
(
0
,
count
));
}
else
{
vo
.
setText
(
null
);
}
//articleLibraryOneVO.setVideo(null);
//articleLibraryOneVO.setAudio(null);
//articleLibraryOneVO.setPdf(null);
}
// 保存浏览记录
try
{
recordService
.
saveOrUpdateRecord
(
articleLibraryOneVO
.
getId
(),
articleLibraryOneVO
.
getGoodsType
());
}
catch
(
ParseException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
// 更新浏览量
service
.
updateBrowseNum
(
articleLibraryOneVO
.
getId
());
Integer
orderMaxNum
=
chapterLibraryService
.
selectMaxOrderNum
(
form
.
getBookId
());
articleLibraryOneVO
.
setOrderMaxNum
(
orderMaxNum
);
return
CallBack
.
success
(
articleLibraryOneVO
);
}
/**
* 根据图书id查询目录
* @param form
* @return
* @author ycw
* @date: 2019年1月11日 上午9:30:06
*/
@ApiOperation
(
value
=
"获取文章对应目录"
,
notes
=
"获取文章对应目录"
)
@GetMapping
(
value
=
ResourceRequestPath
.
DIRECTORY
)
public
List
<
ChapterLibrary
>
getDirectory
(
String
bookid
)
{
if
(
StringUtils
.
isBlank
(
bookid
)){
throw
new
ParameterValidateException
(
ResponseCodeEnum
.
MISS_EXCEPTION
.
getCode
(),
"参数不能为空!"
);
}
Example
example
=
clservice
.
createExample
();
example
.
createCriteria
().
andEqualTo
(
"bookid"
,
bookid
);
PageHelper
.
orderBy
(
" orderNum asc"
);
List
<
ChapterLibrary
>
list1
=
clservice
.
selectByExample
(
example
);
return
list1
;
@ApiOperation
(
value
=
"查询精彩瞬间"
,
notes
=
"查询精彩瞬间"
)
@GetMapping
(
value
=
ResourceRequestPath
.
LIST
)
public
CallBack
<
List
<
FgArticleLibraryListVO
>>
List
(){
return
CallBack
.
success
(
service
.
list
());
}
}
com.zrqx.resource/src/main/java/com/zrqx/resource/fg/controller/diytype/FgDiyTypeController.java
浏览文件 @
b3266fc9
/*
package com.zrqx.resource.fg.controller.diytype;
package
com
.
zrqx
.
resource
.
fg
.
controller
.
diytype
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -23,28 +23,28 @@ import com.zrqx.core.util.response.CallBack;
import
com.zrqx.core.vo.resource.fg.diytype.FgDiyTypeVo
;
import
com.zrqx.resource.fg.service.diytype.FgDiyTypeService
;
*/
/**
/**
* 前台-分类-controller
* @author lw
* @date 2018年8月14日下午4:11:33
*/
/*
*/
@RestController
@RequestMapping
(
ResourceRequestPath
.
FG
+
ResourceRequestPath
.
DIYTYPE
)
@Api(description = "前台-
自定义分类
")
@Api
(
description
=
"前台-
赛程回顾
"
)
public
class
FgDiyTypeController
{
*//** 前台-分类-service *//*
/** 前台-分类-service */
@Autowired
private
FgDiyTypeService
service
;
*/
/**
/**
* 通过资源类型查询
* @param form
* @return
* @author ycw
* @date: 2019年1月11日 上午9:30:06
*/
/*
@ApiOperation(value = "
根据数据类型(一级分类名)查询自定义分类tree", notes = "查询列表
")
*/
@ApiOperation
(
value
=
"
首页-赛程回顾"
,
notes
=
"首页-赛程回顾
"
)
@GetMapping
(
value
=
ResourceRequestPath
.
TREE
)
public
CallBack
<
List
<
FgDiyTypeVo
>>
tree
(
String
name
)
{
if
(
StringUtils
.
isBlank
(
name
)){
...
...
@@ -72,4 +72,3 @@ public class FgDiyTypeController {
return
voList
;
}
}
*/
\ No newline at end of file
com.zrqx.resource/src/main/java/com/zrqx/resource/fg/controller/ebook/FgEbookController.java
浏览文件 @
b3266fc9
package
com
.
zrqx
.
resource
.
fg
.
controller
.
ebook
;
/*
package com.zrqx.resource.fg.controller.ebook;
import
java.io.BufferedInputStream
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import java.text.ParseException;
import java.util.List;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import
org.springframework.web.bind.annotation.PostMapping
;
import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.ResponseBody
;
import org.springframework.web.bind.annotation.RestController;
import com.github.pagehelper.PageHelper;
...
...
@@ -30,11 +21,9 @@ import com.zrqx.core.util.bean.Copy;
import com.zrqx.core.util.page.PageInfo;
import com.zrqx.core.util.page.PageParam;
import com.zrqx.core.util.response.CallBack;
import
com.zrqx.core.vo.resource.ResourceRelationVo
;
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.resource.bg.client.FileClient
;
import com.zrqx.resource.bg.service.ResourceRelationService;
import com.zrqx.resource.fg.service.articlelibrary.FgArticleLibraryService;
import com.zrqx.resource.fg.service.articlelibrary.FgChapterLibraryService;
...
...
@@ -46,11 +35,11 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import tk.mybatis.mapper.entity.Example;
/**
*/
/**
* 电子书管理-controller
* @author Conan
* @date 2018年7月13日上午10:02:31
*/
*/
/*
@RestController
@RequestMapping(ResourceRequestPath.FG+ResourceRequestPath.EBOOK)
@Api(description="前台-杂志管理")
...
...
@@ -65,7 +54,7 @@ public class FgEbookController {
private FgArticleLibraryService articleLibraryService;
@Autowired
private ResourceRelationService resourceRelationService;
/** 浏览记录*/
*//** 浏览记录*//*
@Autowired
private FgRecordService recordService;
@Autowired
...
...
@@ -121,13 +110,13 @@ public class FgEbookController {
});
return voList;
}
/**
*/
/**
* 根据图书id查询目录
* @param form
* @return
* @author ycw
* @date: 2019年1月11日 上午9:30:06
*/
*/
/*
public List<ChapterLibrary> getDirectory(String chapterName, String bookId) {
if(StringUtils.isBlank(bookId)){
throw new BaseException("参数不能为空!");
...
...
@@ -199,3 +188,4 @@ public class FgEbookController {
}
}
*/
\ No newline at end of file
com.zrqx.resource/src/main/java/com/zrqx/resource/fg/controller/ebook/FgEbookMainBodyController.java
浏览文件 @
b3266fc9
package
com
.
zrqx
.
resource
.
fg
.
controller
.
ebook
;
/*
package com.zrqx.resource.fg.controller.ebook;
import java.util.List;
...
...
@@ -17,11 +17,11 @@ import com.zrqx.resource.bg.service.ebook.EbookMainBodyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/**
*/
/**
* 电子书管理-controller
* @author Conan
* @date 2018年7月13日上午10:02:31
*/
*/
/*
@RestController
@RequestMapping(ResourceRequestPath.FG+ResourceRequestPath.EBOOKMAIABODY)
@Api(description="前台-杂志主体")
...
...
@@ -46,3 +46,4 @@ public class FgEbookMainBodyController {
return CallBack.success(ebookList);
}
}
*/
\ No newline at end of file
com.zrqx.resource/src/main/java/com/zrqx/resource/fg/controller/imagelibrary/FgImageLibraryController.java
浏览文件 @
b3266fc9
...
...
@@ -27,7 +27,7 @@ public class FgImageLibraryController {
private
FgImageLibraryService
service
;
@ApiOperation
(
value
=
"
分页查询"
,
notes
=
"查询列表
"
)
@ApiOperation
(
value
=
"
查询精彩瞬间"
,
notes
=
"查询精彩瞬间
"
)
@GetMapping
(
value
=
ResourceRequestPath
.
LIST
)
public
CallBack
<
List
<
FgImageLibraryVO
>>
List
(){
return
CallBack
.
success
(
service
.
list
());
...
...
com.zrqx.resource/src/main/java/com/zrqx/resource/fg/controller/resourcelibrary/FgResourceLibraryController.java
浏览文件 @
b3266fc9
...
...
@@ -99,23 +99,6 @@ public class FgResourceLibraryController {
List
<
String
>
result
=
solrList
(
form
);
return
CallBack
.
success
(
result
);
};
@ApiOperation
(
value
=
"分页条件查询资源列表"
,
notes
=
"分页条件查询资源列表"
)
@GetMapping
(
ResourceRequestPath
.
PAGE
)
public
CallBack
<
PageInfo
<?>>
getResourceListByCondition
(
FgQueryLibraryForm
form
,
PageParam
pageParam
)
{
if
(
null
!=
pageParam
&&
StringUtils
.
isBlank
(
pageParam
.
getOrderBy
()))
{
pageParam
.
setOrderBy
(
"uploadTime desc,id desc"
);
}
//1图书、2医家、3文章、4图片、5视频、6音频、7附件
//文章类型
if
(
ArticleTypeEnum
.
getName
(
form
.
getResourceType
().
toString
())
!=
null
){
FgQueryArticleLibraryForm
entity
=
new
FgQueryArticleLibraryForm
();
BeanUtils
.
copyProperties
(
form
,
entity
);
List
<
FgArticleLibraryListVO
>
list
=
articleLibraryService
.
page
(
entity
,
pageParam
);
return
CallBack
.
success
(
new
PageInfo
<
FgArticleLibraryListVO
>(
list
));
}
throw
new
ParameterValidateException
(
"资源类型错误"
);
}
...
...
com.zrqx.resource/src/main/java/com/zrqx/resource/fg/controller/videolibrary/FgVideoLibraryController.java
0 → 100644
浏览文件 @
b3266fc9
package
com
.
zrqx
.
resource
.
fg
.
controller
.
videolibrary
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
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.util.response.CallBack
;
import
com.zrqx.core.vo.resource.fg.videolibrary.FgVideoLibraryListVO
;
import
com.zrqx.resource.bg.service.videolibrary.VideoLibraryService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* 视频库Controller
*/
@RestController
@RequestMapping
(
"/fg/video-library"
)
@Api
(
description
=
"资源管理-创业大讲堂"
)
public
class
FgVideoLibraryController
{
@Autowired
private
VideoLibraryService
service
;
@ApiOperation
(
value
=
"首页-创业大讲堂"
,
notes
=
"首页-创业大讲堂"
)
@GetMapping
(
value
=
ResourceRequestPath
.
LIST
)
public
CallBack
<
List
<
FgVideoLibraryListVO
>>
list
()
{
return
CallBack
.
success
(
service
.
list
());
}
}
com.zrqx.resource/src/main/java/com/zrqx/resource/fg/mapper/articlelibrary/FgArticleLibraryMapper.java
浏览文件 @
b3266fc9
...
...
@@ -2,11 +2,8 @@ package com.zrqx.resource.fg.mapper.articlelibrary;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
com.zrqx.core.form.resource.fg.articlelibrary.FgQueryArticleLibraryForm
;
import
com.zrqx.core.form.resource.fg.articlelibrary.FgQueryRecommedArticleForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.resource.articlelibrary.ArticleLibrary
;
import
com.zrqx.core.vo.resource.fg.articlelibrary.FgArticleLibraryListVO
;
...
...
@@ -14,101 +11,12 @@ import com.zrqx.core.vo.resource.fg.articlelibrary.FgArticleLibraryListVO;
* 文章库
*/
public
interface
FgArticleLibraryMapper
extends
BaseMapper
<
ArticleLibrary
>
{
/**
* 前台文章列表页查询
* @param form
* @return
*/
@Select
(
"<script>"
+
"select distinct a.id,a.name,a.source,a.keywords,a.resourceType,a.synopsis,a.author,DATE_FORMAT(a.uploadTime,'%Y-%m-%d %H:%m') uploadTime"
+
" from res_Article_Library a "
+
"where 1=1 and a.status = 1 "
+
"<if test = 'form.keywords != null' >"
+
"and (a.name like concat('%',#{form.keywords},'%') or a.keywords like concat('%',#{form.keywords},'%') or a.author like concat('%',#{form.keywords},'%') or a.text like concat('%',#{form.keywords},'%'))"
+
"</if>"
+
"</script>"
)
List
<
FgArticleLibraryListVO
>
query
(
@Param
(
"form"
)
FgQueryArticleLibraryForm
form
);
/**
* @param form
* @return
*/
@Select
(
"<script>"
+
"select distinct a.* "
+
"from res_Article_Library a "
+
"where a.status = 1 "
+
"<if test='form.resourceType != null' >"
+
"and a.resourceType = #{form.resourceType}"
+
"</if>"
+
"<if test='form.ids != null and form.ids.size > 0' >"
+
"and id not in "
+
" <foreach collection=\"form.ids\" index=\"index\" item=\"id\" open=\"(\" separator=\",\" close=\")\">"
+
"#{id}"
+
"</foreach>"
+
"</if>"
+
"order by uploadTime desc "
+
"</script>"
)
List
<
FgArticleLibraryListVO
>
queryOtherRecommendArticle
(
@Param
(
"form"
)
FgQueryRecommedArticleForm
form
);
/**
* @param form
* @return
*/
@Select
(
"<script>"
+
"select distinct a.id,a.name,a.keywords,a.synopsis,a.author,a.bookName,a.price,a.realPrice,DATE_FORMAT(a.uploadTime,'%Y-%m-%d') uploadTime,a.img,a.nationsType,a.resourceType,a.browseNum,a.goodsType,a.text "
+
"from res_Article_Library a "
+
"where a.status = 1 "
+
"<if test='ids != null and ids.size > 0' >"
+
"and id not in "
+
" <foreach collection=\"ids\" index=\"index\" item=\"id\" open=\"(\" separator=\",\" close=\")\">"
+
"#{id}"
+
"</foreach>"
+
"</if>"
+
"</script>"
)
List
<
FgArticleLibraryListVO
>
queryOtherRecommendArticleByIds
(
@Param
(
"ids"
)
List
<
String
>
ids
);
/**
* @param form
* @return
*/
@Select
(
"<script>"
+
"select distinct a.* "
+
"from res_Article_Library a "
+
"where a.status = 1 "
+
"<if test='form.resourceType != null' >"
+
"and a.resourceType = #{form.resourceType}"
+
"</if>"
+
"<if test='form.ids != null and form.ids.size > 0' >"
+
"and id in "
+
" <foreach collection=\"form.ids\" index=\"index\" item=\"id\" open=\"(\" separator=\",\" close=\")\">"
+
"#{id}"
+
"</foreach>"
+
"</if>"
+
"<if test='form.ids != null and form.ids.size > 0' >"
+
" ORDER BY FIELD "
+
" <foreach collection=\"form.ids\" index=\"index\" item=\"id\" open=\"(id, \" separator=\",\" close=\")\">"
+
"#{id}"
+
"</foreach>"
+
"</if>"
+
"</script>"
)
List
<
FgArticleLibraryListVO
>
queryRecommendArticle
(
@Param
(
"form"
)
FgQueryRecommedArticleForm
form
);
/**
* @param ids
* @return
*/
@Select
(
"<script>"
+
"select distinct a.id,a.name,a.keywords,a.synopsis,a.author,a.bookName,a.price,a.realPrice,DATE_FORMAT(a.uploadTime,'%Y-%m-%d') uploadTime,a.img,a.nationsType,a.resourceType,a.browseNum,a.goodsType "
+
"from res_Article_Library a "
+
"select distinct a.id,a.name,a.img from res_Article_Library a "
+
"where a.status = 1 "
+
"<if test='ids != null and ids.size > 0' >"
+
"and id in "
+
" <foreach collection=\"ids\" index=\"index\" item=\"id\" open=\"(\" separator=\",\" close=\")\">"
+
"#{id}"
+
"</foreach>"
+
"</if>"
+
"</script>"
)
List
<
FgArticleLibraryListVO
>
queryRecommendArticleByIds
(
@Param
(
"ids"
)
List
<
String
>
ids
);
List
<
FgArticleLibraryListVO
>
list
(
);
...
...
com.zrqx.resource/src/main/java/com/zrqx/resource/fg/mapper/imagelibrary/FgImageLibraryMapper.java
浏览文件 @
b3266fc9
...
...
@@ -19,7 +19,7 @@ public interface FgImageLibraryMapper extends BaseMapper <ImageLibrary>{
* @date: 2019年1月11日 下午3:50:49
*/
@Select
(
"<script>"
+
"selectid,name, image FROM res_Image_Library WHERE status = 1 order by sort asc"
+
"select
id,name, image FROM res_Image_Library WHERE status = 1 order by sort asc"
+
"</script>"
)
List
<
FgImageLibraryVO
>
list
();
...
...
com.zrqx.resource/src/main/java/com/zrqx/resource/fg/service/articlelibrary/FgArticleLibrarySerivceImpl.java
浏览文件 @
b3266fc9
...
...
@@ -2,22 +2,15 @@ package com.zrqx.resource.fg.service.articlelibrary;
import
java.util.List
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
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.articlelibrary.ArticleLibrary
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.core.util.bean.BeanUtils
;
import
com.zrqx.core.util.datatype.ArrayUtils
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.vo.resource.fg.articlelibrary.FgArticleLibraryListVO
;
import
com.zrqx.core.vo.resource.fg.articlelibrary.FgArticleLibraryOneVO
;
import
com.zrqx.resource.fg.mapper.articlelibrary.FgArticleLibraryMapper
;
...
...
@@ -38,88 +31,10 @@ public class FgArticleLibrarySerivceImpl extends BaseServiceImpl<ArticleLibrary,
}
@Override
public
List
<
FgArticleLibraryListVO
>
page
(
FgQueryArticleLibraryForm
form
,
PageParam
pageParam
){
startPage
(
pageParam
);
List
<
FgArticleLibraryListVO
>
list
=
mapper
.
query
(
form
);
regEx
(
list
);
public
List
<
FgArticleLibraryListVO
>
list
()
{
List
<
FgArticleLibraryListVO
>
list
=
mapper
.
list
();
return
list
;
}
@Override
public
FgArticleLibraryOneVO
articleOneInfoById
(
String
oid
,
boolean
isStatus
)
{
ArticleLibrary
entity
=
mapper
.
selectByPrimaryKey
(
oid
);
FgArticleLibraryOneVO
vo
=
new
FgArticleLibraryOneVO
();
if
(
entity
!=
null
)
{
BeanUtils
.
copyProperties
(
entity
,
vo
);
}
return
vo
;
}
/**
* 更新浏览量
* @param oid
* @return
* @author ycw
* @date: 2019年1月30日 下午3:19:54
*/
@Override
public
boolean
updateBrowseNum
(
String
oid
){
ArticleLibrary
article
=
mapper
.
selectByPrimaryKey
(
oid
);
if
(
article
==
null
){
throw
new
BusinessValidateException
(
"此文章不存在"
);
}
if
(
article
.
getBrowseNum
()
==
null
){
article
.
setBrowseNum
(
50
);
}
Integer
num
=
article
.
getBrowseNum
();
num
+=
1
;
article
.
setBrowseNum
(
num
);
mapper
.
updateByPrimaryKeySelective
(
article
);
return
true
;
}
/**
* 去标签
* @param list
* @author ycw
* @date: 2019年4月18日 上午11:57:55
*/
private
void
regEx
(
List
<
FgArticleLibraryListVO
>
list
){
if
(
ArrayUtils
.
isNotEmpty
(
list
)){
list
.
forEach
(
li
->
{
if
(
StringUtils
.
isNotBlank
(
li
.
getSynopsis
())){
li
.
setSynopsis
(
removeLabel
(
li
.
getSynopsis
()));
}
});
}
}
/**
* 去标签
* @param list
* @author ycw
* @date: 2019年4月18日 上午11:57:55
*/
private
String
removeLabel
(
String
text
){
if
(
StringUtils
.
isNotBlank
(
text
)){
//vo.setSummary(vo.getSummary().replaceAll("\\<.*?>", ""));
//定义script的正则表达式{或<script[^>]*?>[\\s\\S]*?<\\/script>
String
regEx_script
=
"<[\\s]*?script[^>]*?>[\\s\\S]*?<[\\s]*?\\/[\\s]*?script[\\s]*?>"
;
//定义style的正则表达式{或<style[^>]*?>[\\s\\S]*?<\\/style>
String
regEx_style
=
"<[\\s]*?style[^>]*?>[\\s\\S]*?<[\\s]*?\\/[\\s]*?style[\\s]*?>"
;
// 定义HTML标签的正则表达式
String
regEx_html
=
"<[^>]+>"
;
// 定义一些特殊字符的正则表达式 如:
String
regEx_special
=
"\\&[a-zA-Z]{1,10};"
;
text
=
text
.
replaceAll
(
regEx_script
,
""
)
.
replaceAll
(
regEx_style
,
""
)
.
replaceAll
(
regEx_html
,
""
)
.
replaceAll
(
regEx_special
,
""
);
return
text
;
}
return
null
;
}
...
...
com.zrqx.resource/src/main/java/com/zrqx/resource/fg/service/articlelibrary/FgArticleLibraryService.java
浏览文件 @
b3266fc9
...
...
@@ -2,40 +2,18 @@ package com.zrqx.resource.fg.service.articlelibrary;
import
java.util.List
;
import
com.zrqx.core.form.resource.fg.articlelibrary.FgQueryArticleLibraryForm
;
import
com.zrqx.core.model.resource.articlelibrary.ArticleLibrary
;
import
com.zrqx.core.service.BaseService
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.vo.resource.fg.articlelibrary.FgArticleLibraryListVO
;
import
com.zrqx.core.vo.resource.fg.articlelibrary.FgArticleLibraryOneVO
;
/**
* 文章库
*/
public
interface
FgArticleLibraryService
extends
BaseService
<
ArticleLibrary
,
String
>{
/**
* 分页查询
* @param form
* @param pageParam
* 精彩瞬间
* @return
* @author
ycw
* @date: 20
19年1月18日 下午1:51:24
* @author
rjc
* @date: 20
20年12月15日 下午1:50:52
*/
List
<
FgArticleLibraryListVO
>
page
(
FgQueryArticleLibraryForm
form
,
PageParam
pageParam
);
/**
* 根据ID查询
* @param oid
* @return
* @author ycw
* @date: 2019年1月18日 下午1:52:41
*/
FgArticleLibraryOneVO
articleOneInfoById
(
String
oid
,
boolean
isStatus
);
/**
* 更新浏览量
* @param oid
* @return
* @author ycw
* @date: 2019年1月30日 下午3:19:54
*/
boolean
updateBrowseNum
(
String
oid
);
List
<
FgArticleLibraryListVO
>
list
();
}
com.zrqx.resource/src/main/java/com/zrqx/resource/fg/service/ebook/FgBookService.java
浏览文件 @
b3266fc9
package
com
.
zrqx
.
resource
.
fg
.
service
.
ebook
;
/*
package com.zrqx.resource.fg.service.ebook;
import java.util.List;
...
...
@@ -10,44 +10,45 @@ 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;
/**
*/
/**
*
* @author ycw
* @date 2019年1月9日下午5:43:52
*/
*/
/*
public interface FgBookService extends BaseService<Book, String> {
/**
*/
/**
* 分页查询杂志
* @param form
* @param pageParam
* @return
* @author rjc
* @date: 2019年9月23日 下午5:15:10
*/
*/
/*
List<FgEbookListVO> page(FgQueryArticleLibraryForm form, PageParam pageParam);
/**
*/
/**
* 带条件搜索杂志
* @param form
* @param pageParam
* @return
* @author rjc
* @date: 2019年9月23日 下午5:22:24
*/
*/
/*
List<FgArticleLibraryListVO> pageBook(FgQueryArticleLibraryForm form, PageParam pageParam);
/**
*/
/**
* 根据id查找电子书
* @param oid
* @return
* @author rjc
* @date: 2019年9月23日 下午5:19:33
*/
*/
/*
List<FgEbookVO> ebookOneInfoById(String oid);
/**
*/
/**
* 更新浏览量
* @param oid
* @return
* @author ycw
* @date: 2019年3月5日 下午12:01:53
*/
*/
/*
boolean updateBrowseNum(String oid);
}
*/
\ No newline at end of file
com.zrqx.resource/src/main/java/com/zrqx/resource/fg/service/ebook/FgBookServiceImpl.java
浏览文件 @
b3266fc9
package
com
.
zrqx
.
resource
.
fg
.
service
.
ebook
;
/*
package com.zrqx.resource.fg.service.ebook;
import java.awt.Color;
import java.util.List;
...
...
@@ -24,11 +24,11 @@ import com.zrqx.resource.bg.service.pdffilelibrary.PdfLibraryService;
import com.zrqx.resource.fg.mapper.ebook.FgBookMapper;
import com.zrqx.resource.fg.mapper.year.FgYearLibraryMapper;
/**
*/
/**
*
* @author ycw
* @date 2019年1月9日下午5:48:23
*/
*/
/*
@Service
public class FgBookServiceImpl extends BaseServiceImpl<Book, String> implements FgBookService {
@Autowired
...
...
@@ -92,13 +92,13 @@ public class FgBookServiceImpl extends BaseServiceImpl<Book, String> implements
}
return list;
}
/**
*/
/**
* 修改浏览量
* @param oid
* @return
* @author ycw
* @date: 2019年1月30日 下午3:59:08
*/
*/
/*
@Override
public boolean updateBrowseNum(String oid){
Book ebook = bookMapper.selectByPrimaryKey(oid);
...
...
@@ -114,12 +114,12 @@ public class FgBookServiceImpl extends BaseServiceImpl<Book, String> implements
bookMapper.updateByPrimaryKeySelective(ebook);
return true;
}
/**
*/
/**
* 去标签
* @param list
* @author ycw
* @date: 2019年4月18日 上午11:57:55
*/
*/
/*
private void regEx1(List<FgArticleLibraryListVO> list){
if(ArrayUtils.isNotEmpty(list)){
list.forEach(li -> {
...
...
@@ -129,12 +129,12 @@ public class FgBookServiceImpl extends BaseServiceImpl<Book, String> implements
});
}
}
/**
*/
/**
* 去标签
* @param list
* @author ycw
* @date: 2019年4月18日 上午11:57:55
*/
*/
/*
private void regEx(List<FgEbookVO> list){
if(ArrayUtils.isNotEmpty(list)){
list.forEach(li -> {
...
...
@@ -144,12 +144,12 @@ public class FgBookServiceImpl extends BaseServiceImpl<Book, String> implements
});
}
}
/**
*/
/**
* 去标签
* @param list
* @author ycw
* @date: 2019年4月18日 上午11:57:55
*/
*/
/*
private String removeLabel(String text){
if(StringUtils.isNotBlank(text)){
//vo.setSummary(vo.getSummary().replaceAll("\\<.*?>", ""));
...
...
@@ -172,3 +172,4 @@ public class FgBookServiceImpl extends BaseServiceImpl<Book, String> implements
return null;
}
}
*/
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论