Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
rtjl
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
rtjl
Commits
c04aa10f
提交
c04aa10f
authored
12月 16, 2019
作者:
liupengfei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
3f6f75b3
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
131 行增加
和
14 行删除
+131
-14
FgArticleLibraryController.java
...controller/articlelibrary/FgArticleLibraryController.java
+37
-0
FgMemberCollectionController.java
...roller/membercollection/FgMemberCollectionController.java
+17
-0
FgResourceLibraryController.java
...ntroller/resourcelibrary/FgResourceLibraryController.java
+1
-1
FgResourceRelationMapper.java
...com/zrqx/resource/fg/mapper/FgResourceRelationMapper.java
+20
-8
FgArticleLibraryMapper.java
...urce/fg/mapper/articlelibrary/FgArticleLibraryMapper.java
+10
-0
FgResourceRelationServiceImpl.java
...qx/resource/fg/service/FgResourceRelationServiceImpl.java
+10
-5
FgArticleLibrarySerivceImpl.java
...g/service/articlelibrary/FgArticleLibrarySerivceImpl.java
+25
-0
FgArticleLibraryService.java
...ce/fg/service/articlelibrary/FgArticleLibraryService.java
+11
-0
没有找到文件。
app/resource/src/main/java/com/zrqx/resource/fg/controller/articlelibrary/FgArticleLibraryController.java
0 → 100644
浏览文件 @
c04aa10f
package
com
.
zrqx
.
resource
.
fg
.
controller
.
articlelibrary
;
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.zrqx.core.util.bean.BeanUtils
;
import
com.zrqx.core.util.response.CallBack
;
import
com.zrqx.resource.commons.model.articlelibrary.ArticleLibrary
;
import
com.zrqx.resource.commons.vo.fg.articlelibrary.FgArticleLibraryVO
;
import
com.zrqx.resource.fg.service.articlelibrary.FgArticleLibraryService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* 穴位库Controller
*/
@RestController
@RequestMapping
(
"/fg/article-library"
)
@Api
(
description
=
"前台-文章库"
)
public
class
FgArticleLibraryController
{
@Autowired
private
FgArticleLibraryService
service
;
@ApiOperation
(
value
=
"查询"
,
notes
=
"根据ID查询"
)
@GetMapping
(
value
=
"/get/{oid}"
)
public
CallBack
<
FgArticleLibraryVO
>
getById
(
@PathVariable
String
oid
)
{
ArticleLibrary
entity
=
service
.
selectByPrimaryKey
(
oid
);
FgArticleLibraryVO
vo
=
new
FgArticleLibraryVO
();
BeanUtils
.
copyProperties
(
entity
,
vo
);
return
CallBack
.
success
(
vo
);
}
}
app/resource/src/main/java/com/zrqx/resource/fg/controller/membercollection/FgMemberCollectionController.java
浏览文件 @
c04aa10f
...
@@ -15,10 +15,12 @@ import com.zrqx.core.util.page.PageParam;
...
@@ -15,10 +15,12 @@ import com.zrqx.core.util.page.PageParam;
import
com.zrqx.core.util.response.CallBack
;
import
com.zrqx.core.util.response.CallBack
;
import
com.zrqx.resource.commons.form.fg.membercollection.MemberCollectionForm
;
import
com.zrqx.resource.commons.form.fg.membercollection.MemberCollectionForm
;
import
com.zrqx.resource.commons.model.acupointlibrary.AcupointLibrary
;
import
com.zrqx.resource.commons.model.acupointlibrary.AcupointLibrary
;
import
com.zrqx.resource.commons.model.articlelibrary.ArticleLibrary
;
import
com.zrqx.resource.commons.model.meridianlibrary.MeridianLibrary
;
import
com.zrqx.resource.commons.model.meridianlibrary.MeridianLibrary
;
import
com.zrqx.resource.commons.model.videolibrary.VideoLibrary
;
import
com.zrqx.resource.commons.model.videolibrary.VideoLibrary
;
import
com.zrqx.resource.commons.vo.fg.membercollection.FgMemberCollectionVo
;
import
com.zrqx.resource.commons.vo.fg.membercollection.FgMemberCollectionVo
;
import
com.zrqx.resource.fg.service.acupointlibrary.FgAcupointLibraryService
;
import
com.zrqx.resource.fg.service.acupointlibrary.FgAcupointLibraryService
;
import
com.zrqx.resource.fg.service.articlelibrary.FgArticleLibraryService
;
import
com.zrqx.resource.fg.service.membercollection.FgMemberCollectionService
;
import
com.zrqx.resource.fg.service.membercollection.FgMemberCollectionService
;
import
com.zrqx.resource.fg.service.meridianlibrary.FgMeridianLibraryService
;
import
com.zrqx.resource.fg.service.meridianlibrary.FgMeridianLibraryService
;
import
com.zrqx.resource.fg.service.videolibrary.FgVideoLibraryService
;
import
com.zrqx.resource.fg.service.videolibrary.FgVideoLibraryService
;
...
@@ -43,6 +45,9 @@ public class FgMemberCollectionController {
...
@@ -43,6 +45,9 @@ public class FgMemberCollectionController {
@Autowired
@Autowired
private
FgMeridianLibraryService
fgMeridianLibraryService
;
private
FgMeridianLibraryService
fgMeridianLibraryService
;
@Autowired
private
FgArticleLibraryService
fgArticleLibraryService
;
@ApiOperation
(
value
=
"批量添加收藏"
,
notes
=
"返回成功条数"
)
@ApiOperation
(
value
=
"批量添加收藏"
,
notes
=
"返回成功条数"
)
@PostMapping
(
value
=
"/batch/save"
)
@PostMapping
(
value
=
"/batch/save"
)
public
CallBack
<
Integer
>
batchAddMemberCollection
(
@RequestBody
MemberCollectionForm
form
)
{
public
CallBack
<
Integer
>
batchAddMemberCollection
(
@RequestBody
MemberCollectionForm
form
)
{
...
@@ -98,6 +103,18 @@ public class FgMemberCollectionController {
...
@@ -98,6 +103,18 @@ public class FgMemberCollectionController {
}
}
}
}
}
}
if
(
ResourceTypeEnum
.
ARTICLE_LIBRARY
.
getCode
().
equals
(
li
.
getObjectType
())){
if
(
StringUtils
.
isNotBlank
(
li
.
getName
())){
ArticleLibrary
articleLibrary
=
fgArticleLibraryService
.
selectByPrimaryKey
(
li
.
getObjectId
());
if
(
articleLibrary
!=
null
){
li
.
setCover
(
articleLibrary
.
getCover
());
li
.
setIntro
(
removeLabel
(
articleLibrary
.
getText
()));
li
.
setName
(
articleLibrary
.
getName
());
li
.
setObjectId
(
articleLibrary
.
getId
());
li
.
setObjectType
(
ResourceTypeEnum
.
VIDEO_LIBRARY
.
getCode
());
}
}
}
});
});
return
CallBack
.
success
(
voPage
);
return
CallBack
.
success
(
voPage
);
}
}
...
...
app/resource/src/main/java/com/zrqx/resource/fg/controller/resourcelibrary/FgResourceLibraryController.java
浏览文件 @
c04aa10f
...
@@ -30,7 +30,7 @@ public class FgResourceLibraryController {
...
@@ -30,7 +30,7 @@ public class FgResourceLibraryController {
@Autowired
@Autowired
private
FgResourceRelationService
resourceRelationService
;
private
FgResourceRelationService
resourceRelationService
;
@ApiOperation
(
"相关
视频
"
)
@ApiOperation
(
"相关
资源
"
)
@GetMapping
(
"/relation-resource/page"
)
@GetMapping
(
"/relation-resource/page"
)
public
CallBack
<
List
<
FgAboutListVo
>>
queryByRelation
(
FgQueryRelatedForm
form
,
PageParam
pageParam
){
public
CallBack
<
List
<
FgAboutListVo
>>
queryByRelation
(
FgQueryRelatedForm
form
,
PageParam
pageParam
){
if
(
form
==
null
||
StringUtils
.
isBlank
(
form
.
getResourceId
())
||
form
.
getType
()
==
null
)
{
if
(
form
==
null
||
StringUtils
.
isBlank
(
form
.
getResourceId
())
||
form
.
getType
()
==
null
)
{
...
...
app/resource/src/main/java/com/zrqx/resource/fg/mapper/FgResourceRelationMapper.java
浏览文件 @
c04aa10f
...
@@ -3,7 +3,6 @@ package com.zrqx.resource.fg.mapper;
...
@@ -3,7 +3,6 @@ package com.zrqx.resource.fg.mapper;
import
java.util.List
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.annotations.Select
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.mapper.BaseMapper
;
...
@@ -25,18 +24,31 @@ public interface FgResourceRelationMapper extends BaseMapper<ResourceRelation>
...
@@ -25,18 +24,31 @@ public interface FgResourceRelationMapper extends BaseMapper<ResourceRelation>
+
"<if test='type != null'> "
+
"<if test='type != null'> "
+
" and ar.resourceType = #{type} "
+
" and ar.resourceType = #{type} "
+
"</if>"
+
"</if>"
+
"order by ar.isTop desc,ar.sort asc "
+
"</script>"
)
+
"</script>"
)
List
<
FgAboutListVo
>
queryVideoByResourceType
(
FgQueryRelatedForm
form
);
List
<
FgAboutListVo
>
queryVideoByResourceType
(
FgQueryRelatedForm
form
);
/**
*
* @param entity
* @return
*/
@Select
(
"<script>"
@Select
(
"<script>"
+
"select
distinct ar.objectId
"
+
"select
vi.id ,vi.name, vi.resourceType, vi.cover,vi.text as synopsis
"
+
"from res_resource_relation ar "
+
"from res_resource_relation ar "
+
"left join res_course_library co on ar.resourceId = co.id "
+
"left join res_article_library vi on ar.resourceId = vi.id "
+
"where 1 = 1 and co.status = 1 "
+
"where 1 = 1 "
+
"<if test='"
+
NOTBLANK
+
"(videoId)'> "
+
"<if test='"
+
NOTBLANK
+
"(resourceId)'> "
+
" and ar.resourceId = #{videoId} "
+
" and ar.objectId = #{resourceId} "
+
"</if>"
+
"<if test='type != null'> "
+
" and ar.resourceType = #{type} "
+
"</if>"
+
"<if test='resourceType != 1'> "
+
" and vi.status = 1 "
+
"</if>"
+
"</if>"
+
"
and ar.resourceType = 5
"
+
"
order by ar.isTop desc,ar.sort asc
"
+
"</script>"
)
+
"</script>"
)
List
<
String
>
queryCourseListByVideoId
(
@Param
(
"videoId"
)
String
videoId
);
List
<
FgAboutListVo
>
queryArticleByResourceType
(
FgQueryRelatedForm
entity
);
}
}
app/resource/src/main/java/com/zrqx/resource/fg/mapper/articlelibrary/FgArticleLibraryMapper.java
0 → 100644
浏览文件 @
c04aa10f
package
com
.
zrqx
.
resource
.
fg
.
mapper
.
articlelibrary
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.resource.commons.model.articlelibrary.ArticleLibrary
;
/**
* 文章库
*/
public
interface
FgArticleLibraryMapper
extends
BaseMapper
<
ArticleLibrary
>
{
}
app/resource/src/main/java/com/zrqx/resource/fg/service/FgResourceRelationServiceImpl.java
浏览文件 @
c04aa10f
package
com
.
zrqx
.
resource
.
fg
.
service
;
package
com
.
zrqx
.
resource
.
fg
.
service
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.zrqx.core.enums.resource.ResourceTypeEnum
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.util.page.PageParam
;
...
@@ -38,11 +39,15 @@ public class FgResourceRelationServiceImpl extends BaseServiceImpl<ResourceRelat
...
@@ -38,11 +39,15 @@ public class FgResourceRelationServiceImpl extends BaseServiceImpl<ResourceRelat
*/
*/
@Override
@Override
public
List
<
FgAboutListVo
>
queryByIdAndResourceType
(
FgQueryRelatedForm
entity
,
PageParam
pageParam
)
{
public
List
<
FgAboutListVo
>
queryByIdAndResourceType
(
FgQueryRelatedForm
entity
,
PageParam
pageParam
)
{
if
(
pageParam
!=
null
&&
StringUtils
.
isBlank
(
pageParam
.
getOrderBy
()))
{
List
<
FgAboutListVo
>
list
=
new
ArrayList
<
FgAboutListVo
>();
pageParam
.
setOrderBy
(
"sort asc"
);
if
(
ResourceTypeEnum
.
VIDEO_LIBRARY
.
getCode
().
equals
(
entity
.
getType
()))
{
startPage
(
pageParam
);
list
=
mapper
.
queryVideoByResourceType
(
entity
);
}
else
if
(
ResourceTypeEnum
.
ARTICLE_LIBRARY
.
getCode
().
equals
(
entity
.
getType
()))
{
startPage
(
pageParam
);
list
=
mapper
.
queryArticleByResourceType
(
entity
);
}
}
startPage
(
pageParam
);
return
list
;
return
mapper
.
queryVideoByResourceType
(
entity
);
}
}
// 关联资源类型
// 关联资源类型
...
...
app/resource/src/main/java/com/zrqx/resource/fg/service/articlelibrary/FgArticleLibrarySerivceImpl.java
0 → 100644
浏览文件 @
c04aa10f
package
com
.
zrqx
.
resource
.
fg
.
service
.
articlelibrary
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.resource.commons.model.articlelibrary.ArticleLibrary
;
import
com.zrqx.resource.fg.mapper.articlelibrary.FgArticleLibraryMapper
;
/**
* 文章库
*/
@Service
public
class
FgArticleLibrarySerivceImpl
extends
BaseServiceImpl
<
ArticleLibrary
,
String
>
implements
FgArticleLibraryService
{
@Autowired
private
FgArticleLibraryMapper
mapper
;
@Override
public
BaseMapper
<
ArticleLibrary
>
getMapper
()
{
return
mapper
;
}
}
app/resource/src/main/java/com/zrqx/resource/fg/service/articlelibrary/FgArticleLibraryService.java
0 → 100644
浏览文件 @
c04aa10f
package
com
.
zrqx
.
resource
.
fg
.
service
.
articlelibrary
;
import
com.zrqx.core.service.BaseService
;
import
com.zrqx.resource.commons.model.articlelibrary.ArticleLibrary
;
/**
* 文章库
*/
public
interface
FgArticleLibraryService
extends
BaseService
<
ArticleLibrary
,
String
>{
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论