Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
scsm
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
scsm
Commits
6b32107d
提交
6b32107d
authored
6月 28, 2020
作者:
renjiancai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
9cd162ec
全部展开
显示空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
308 行增加
和
4 行删除
+308
-4
AuthorLibraryController.java
.../bg/controller/authorLibrary/AuthorLibraryController.java
+0
-0
EbookController.java
...om/zrqx/resource/bg/controller/ebook/EbookController.java
+4
-0
AuthorLibraryMapper.java
...resource/bg/mapper/authorLibrary/AuthorLibraryMapper.java
+70
-0
AuthorResourceMapper.java
...esource/bg/mapper/authorLibrary/AuthorResourceMapper.java
+27
-0
ResourceRelationMapper.java
...ource/bg/mapper/authorLibrary/ResourceRelationMapper.java
+1
-1
ResourceRelationServiceImpl.java
...zrqx/resource/bg/service/ResourceRelationServiceImpl.java
+1
-1
AnnexLibrarySerivceImpl.java
...urce/bg/service/annexlibrary/AnnexLibrarySerivceImpl.java
+1
-1
AuthorLibraryService.java
...source/bg/service/authorLibrary/AuthorLibraryService.java
+41
-0
AuthorLibraryServiceImpl.java
...ce/bg/service/authorLibrary/AuthorLibraryServiceImpl.java
+82
-0
AuthorResourceService.java
...ource/bg/service/authorLibrary/AuthorResourceService.java
+27
-0
AuthorResourceServiceImpl.java
...e/bg/service/authorLibrary/AuthorResourceServiceImpl.java
+53
-0
ProjectLibrarySerivceImpl.java
.../bg/service/projectlibrary/ProjectLibrarySerivceImpl.java
+1
-1
没有找到文件。
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/controller/authorLibrary/AuthorLibraryController.java
0 → 100644
浏览文件 @
6b32107d
差异被折叠。
点击展开。
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/controller/ebook/EbookController.java
浏览文件 @
6b32107d
...
...
@@ -185,6 +185,10 @@ public class EbookController {
example
=
new
Example
(
EbookDiyType
.
class
);
example
.
createCriteria
().
andIn
(
"ebookId"
,
ids
);
dtservice
.
deleteByExample
(
example
);
// ----图片封面轮播图
example
=
new
Example
(
EbookImage
.
class
);
example
.
createCriteria
().
andIn
(
"ebookId"
,
ids
);
eBookImageService
.
deleteByExample
(
example
);
//删除资源收藏相关信息
example
=
new
Example
(
MemberCollection
.
class
);
example
.
createCriteria
().
andIn
(
"objectId"
,
ids
);
...
...
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/mapper/authorLibrary/AuthorLibraryMapper.java
0 → 100644
浏览文件 @
6b32107d
package
com
.
zrqx
.
resource
.
bg
.
mapper
.
authorLibrary
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
com.zrqx.core.form.resource.bg.QueryResourceForPoPForm
;
import
com.zrqx.core.form.resource.bg.authorLibrary.QueryAuthorLibraryForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.resource.authorLibrary.AuthorLibrary
;
import
com.zrqx.core.vo.resource.authorlibrary.AuthorLibraryListVO
;
public
interface
AuthorLibraryMapper
extends
BaseMapper
<
AuthorLibrary
>
{
@Select
(
"<script>"
+
"select a.id,a.name,a.institutionName,a.sex,a.education,a.department,a.title,a.post,a.description,a.faceImg,a.status,a.uploadTime "
+
"FROM res_author_library a left join res_author_library_diy_type t "
+
"on a.id = t.authorlibraryid where 1 = 1 "
+
"<if test='form.status != null'> "
+
" AND a.status = #{form.status} "
+
"</if> "
+
"<if test = '"
+
NOTBLANK
+
"(form.name)'> "
+
" AND a.name like concat('%',#{form.name},'%') "
+
"</if> "
+
"<if test = '"
+
NOTBLANK
+
"(form.title)'> "
+
" AND a.title like concat('%',#{form.title},'%') "
+
"</if> "
+
"<if test = '"
+
NOTBLANK
+
"(form.institutionName)'> "
+
" AND a.institutionName like concat('%',#{form.institutionName},'%') "
+
"</if> "
+
"<if test = '"
+
NOTBLANK
+
"(form.diyTypeCode)'> "
+
" AND t.diytypeCode like concat('%',#{form.diyTypeCode},'%') "
+
"</if>"
/*+ "<if test='form.diyTypeId != null and form.diyTypeId.size > 0'>"
+ "and t.diytypeid in "
+ " <foreach collection=\"form.diyTypeId\" index=\"index\" item=\"id\" open=\"(\" separator=\",\" close=\")\">"
+ "#{id}"
+ "</foreach>"
+ "</if>" */
+
"<if test = '"
+
NOTBLANK
+
"(form.beginTime)'> "
+
" AND a.uploadTime >= concat(#{form.beginTime}, ' 00:00:00') "
+
"</if> "
+
"<if test = '"
+
NOTBLANK
+
"(form.endTime)'> "
+
" AND a.uploadTime <= concat(#{form.endTime}, ' 23:59:59')"
+
"</if> "
+
" order by a.uploadTime desc "
+
"</script>"
)
List
<
AuthorLibraryListVO
>
queryAuthorLibraryByConditions
(
@Param
(
"form"
)
QueryAuthorLibraryForm
form
);
@Select
(
"<script>"
+
"select a.id,a.name,a.institutionName,a.faceImg,a.status,a.uploadTime "
+
"FROM res_author_library a left join res_author_library_diy_type t "
+
"on a.id = t.authorlibraryid "
+
" where 1 = 1 and a.status = 1 "
+
"<if test = '"
+
NOTBLANK
+
"(form.title)'> "
+
" AND a.name like concat('%',#{form.title},'%') "
+
"</if> "
+
"<if test = '"
+
NOTBLANK
+
"(form.diyTypeCode)'> "
+
" AND t.diytypeCode like concat('%',#{form.diyTypeCode},'%') "
+
"</if>"
+
"<if test='form.ids != null and form.ids.size > 0'>"
+
"and a.id not in "
+
" <foreach collection=\"form.ids\" index=\"index\" item=\"id\" open=\"(\" separator=\",\" close=\")\">"
+
"#{id}"
+
"</foreach>"
+
"</if>"
+
"</script>"
)
List
<
AuthorLibraryListVO
>
queryByTileAndDiyType
(
@Param
(
"form"
)
QueryResourceForPoPForm
form
);
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/mapper/authorLibrary/AuthorResourceMapper.java
0 → 100644
浏览文件 @
6b32107d
package
com
.
zrqx
.
resource
.
bg
.
mapper
.
authorLibrary
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Select
;
import
com.zrqx.core.form.resource.bg.QueryResourceRelationForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.resource.authorLibrary.AuthorResource
;
import
com.zrqx.core.vo.resource.ResourceRelationVo
;
public
interface
AuthorResourceMapper
extends
BaseMapper
<
AuthorResource
>
{
@Select
(
"<script>"
+
"select id ,resourceId,resourceType,createTime,sort from res_author_resource "
+
"where authorId = #{id} "
+
"<if test='resourceType != null'> and resourceType = #{resourceType}</if>"
+
" order by sort desc , createTime desc "
+
"</script>"
)
List
<
ResourceRelationVo
>
queryByIdAndResourceType
(
QueryResourceRelationForm
entity
);
/**
* 获取关联资源最大排序
* @return
*/
@Select
(
"select MAX(sort) from res_author_resource"
)
Integer
getMax
();
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/mapper/ResourceRelationMapper.java
→
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/mapper/
authorLibrary/
ResourceRelationMapper.java
浏览文件 @
6b32107d
package
com
.
zrqx
.
resource
.
bg
.
mapper
;
package
com
.
zrqx
.
resource
.
bg
.
mapper
.
authorLibrary
;
import
java.util.List
;
...
...
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/ResourceRelationServiceImpl.java
浏览文件 @
6b32107d
...
...
@@ -17,8 +17,8 @@ import com.zrqx.core.model.resource.resourcerelation.ResourceRelation;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.vo.resource.ResourceRelationVo
;
import
com.zrqx.resource.bg.mapper.ResourceRelationMapper
;
import
com.zrqx.resource.bg.mapper.annexlibrary.AnnexLibraryMapper
;
import
com.zrqx.resource.bg.mapper.authorLibrary.ResourceRelationMapper
;
import
com.zrqx.resource.bg.mapper.ebook.EbookMapper
;
import
com.zrqx.resource.bg.mapper.projectlibrary.ProjectLibraryMapper
;
...
...
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/annexlibrary/AnnexLibrarySerivceImpl.java
浏览文件 @
6b32107d
...
...
@@ -33,10 +33,10 @@ import com.zrqx.core.util.page.PageInfo;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.vo.resource.annexlibrary.AnnexLibraryListVO
;
import
com.zrqx.resource.bg.client.order.OrderClient
;
import
com.zrqx.resource.bg.mapper.ResourceRelationMapper
;
import
com.zrqx.resource.bg.mapper.annexlibrary.AnnexLibraryDiyTypeMapper
;
import
com.zrqx.resource.bg.mapper.annexlibrary.AnnexLibraryMapper
;
import
com.zrqx.resource.bg.mapper.annexlibrary.AnnexResourceMapper
;
import
com.zrqx.resource.bg.mapper.authorLibrary.ResourceRelationMapper
;
import
com.zrqx.resource.bg.mapper.marketing.PromotionContentMapper
;
import
com.zrqx.resource.bg.mapper.membercollection.MemberCollectionMapper
;
import
com.zrqx.resource.bg.mapper.recommend.RecommendResourceMapper
;
...
...
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/authorLibrary/AuthorLibraryService.java
0 → 100644
浏览文件 @
6b32107d
package
com
.
zrqx
.
resource
.
bg
.
service
.
authorLibrary
;
import
com.zrqx.core.form.resource.bg.QueryResourceForPoPForm
;
import
com.zrqx.core.form.resource.bg.authorLibrary.QueryAuthorLibraryForm
;
import
com.zrqx.core.form.resource.bg.authorLibrary.SaveUpdateAuthorForm
;
import
com.zrqx.core.model.resource.authorLibrary.AuthorLibrary
;
import
com.zrqx.core.service.BaseService
;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.vo.resource.authorlibrary.AuthorLibraryListVO
;
public
interface
AuthorLibraryService
extends
BaseService
<
AuthorLibrary
,
String
>
{
/**
* 查询作者库列表
* @param entity
* @param pageParam
* @return
* @author yzg
* @date: 2018年7月11日 下午3:10:24
*/
PageInfo
<
AuthorLibraryListVO
>
queryAuthorLibraryList
(
QueryAuthorLibraryForm
entity
,
PageParam
pageParam
);
/**
* 添加或修改作者库
* @param authorLibrary
* @return
* @author yzg
* @date: 2018年7月11日 下午3:10:13
*/
Boolean
saveOrUpdate
(
SaveUpdateAuthorForm
entity
);
/**
* 选择弹窗中的列表
* @param form
* @param pageParam
* @return
* @author ycw
* @date: 2019年1月3日 下午7:12:29
*/
PageInfo
<
AuthorLibraryListVO
>
pageByTitleAndDiyType
(
QueryResourceForPoPForm
form
,
PageParam
pageParam
);
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/authorLibrary/AuthorLibraryServiceImpl.java
0 → 100644
浏览文件 @
6b32107d
package
com
.
zrqx
.
resource
.
bg
.
service
.
authorLibrary
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.github.pagehelper.PageHelper
;
import
com.zrqx.core.enums.AllResourceTypeEnum
;
import
com.zrqx.core.enums.resource.LibraryStatusEnum
;
import
com.zrqx.core.form.resource.bg.QueryResourceForPoPForm
;
import
com.zrqx.core.form.resource.bg.authorLibrary.QueryAuthorLibraryForm
;
import
com.zrqx.core.form.resource.bg.authorLibrary.SaveUpdateAuthorForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.resource.authorLibrary.AuthorLibrary
;
import
com.zrqx.core.model.resource.authorLibrary.AuthorLibraryDiytype
;
import
com.zrqx.core.model.resource.authorLibrary.AuthorLibraryLabelContentDiyType
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.vo.resource.authorlibrary.AuthorLibraryListVO
;
import
com.zrqx.resource.bg.mapper.authorLibrary.AuthorLibraryMapper
;
@Service
public
class
AuthorLibraryServiceImpl
extends
BaseServiceImpl
<
AuthorLibrary
,
String
>
implements
AuthorLibraryService
{
@Autowired
private
AuthorLibraryMapper
authorLibraryMapper
;
@Override
public
BaseMapper
<
AuthorLibrary
>
getMapper
()
{
return
authorLibraryMapper
;
}
/**
* 查询作者列表
*/
@Override
public
PageInfo
<
AuthorLibraryListVO
>
queryAuthorLibraryList
(
QueryAuthorLibraryForm
entity
,
PageParam
pageParam
)
{
PageHelper
.
startPage
(
pageParam
.
getPageNum
(),
pageParam
.
getPageSize
(),
pageParam
.
getOrderBy
());
List
<
AuthorLibraryListVO
>
list
=
authorLibraryMapper
.
queryAuthorLibraryByConditions
(
entity
);
return
new
PageInfo
<
AuthorLibraryListVO
>(
list
);
}
/**
* 添加或修改作者库
*
* @param authorLibrary
* @return
*/
@Override
public
Boolean
saveOrUpdate
(
SaveUpdateAuthorForm
form
)
{
AuthorLibrary
authorLibrary
=
new
AuthorLibrary
();
BeanUtils
.
copyProperties
(
form
,
authorLibrary
);
if
(
authorLibrary
.
getId
()
==
null
)
{
authorLibrary
.
setUploadTime
(
new
Date
());
authorLibrary
.
setStatus
(
LibraryStatusEnum
.
STATUS_0
.
getCode
());
authorLibrary
.
setResourceType
(
AllResourceTypeEnum
.
AUTHOR
.
getCode
());
authorLibrary
.
setBrowseNum
(
50
);
authorLibraryMapper
.
insertSelective
(
authorLibrary
);
}
else
{
authorLibrary
.
setUpdateTime
(
new
Date
());
authorLibraryMapper
.
updateByPrimaryKeySelective
(
authorLibrary
);
}
return
true
;
}
@Override
public
PageInfo
<
AuthorLibraryListVO
>
pageByTitleAndDiyType
(
QueryResourceForPoPForm
form
,
PageParam
pageParam
){
startPage
(
pageParam
);
List
<
AuthorLibraryListVO
>
list
=
authorLibraryMapper
.
queryByTileAndDiyType
(
form
);
if
(!
list
.
isEmpty
()){
for
(
AuthorLibraryListVO
ebookListVO
:
list
){
ebookListVO
.
setStatus_zh
(
LibraryStatusEnum
.
getName
(
Integer
.
parseInt
(
ebookListVO
.
getStatus
())));
}
}
return
new
PageInfo
<
AuthorLibraryListVO
>(
list
);
}
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/authorLibrary/AuthorResourceService.java
0 → 100644
浏览文件 @
6b32107d
package
com
.
zrqx
.
resource
.
bg
.
service
.
authorLibrary
;
import
java.util.List
;
import
com.zrqx.core.form.resource.bg.QueryResourceRelationForm
;
import
com.zrqx.core.model.resource.authorLibrary.AuthorResource
;
import
com.zrqx.core.service.BaseService
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.vo.resource.ResourceRelationVo
;
public
interface
AuthorResourceService
extends
BaseService
<
AuthorResource
,
Integer
>
{
/**
* 获取相关资源列表
* @param entity
* @param pageParam
* @return
* @author yzg
* @date: 2018年7月24日 上午9:09:34
*/
List
<
ResourceRelationVo
>
queryByIdAndResourceType
(
QueryResourceRelationForm
entity
,
PageParam
pageParam
);
/**
* 获取资源最大排序
* @return
*/
Integer
getMaxSort
();
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/authorLibrary/AuthorResourceServiceImpl.java
0 → 100644
浏览文件 @
6b32107d
package
com
.
zrqx
.
resource
.
bg
.
service
.
authorLibrary
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.github.pagehelper.PageHelper
;
import
com.zrqx.core.form.resource.bg.QueryResourceRelationForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.resource.authorLibrary.AuthorResource
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.vo.resource.ResourceRelationVo
;
import
com.zrqx.resource.bg.mapper.authorLibrary.AuthorResourceMapper
;
@Service
public
class
AuthorResourceServiceImpl
extends
BaseServiceImpl
<
AuthorResource
,
Integer
>
implements
AuthorResourceService
{
@Autowired
private
AuthorResourceMapper
authorResourceMapper
;
@Override
public
BaseMapper
<
AuthorResource
>
getMapper
()
{
return
authorResourceMapper
;
}
/**
* 获取相关资源列表
* @see com.zrqx.resource.bg.service.articlelibrary.ArticleResourceService#queryByIdAndResourceType(com.zrqx.core.form.resource.bg.QueryResourceRelationForm, com.zrqx.core.util.page.PageParam)
* @param entity
* @param pageParam
* @return
* @author yzg
* @date: 2018年7月24日 上午9:10:11
*/
@Override
public
List
<
ResourceRelationVo
>
queryByIdAndResourceType
(
QueryResourceRelationForm
entity
,
PageParam
pageParam
)
{
PageHelper
.
startPage
(
pageParam
);
return
authorResourceMapper
.
queryByIdAndResourceType
(
entity
);
}
/**
* 获取资源最大排序
*/
@Override
public
Integer
getMaxSort
()
{
Integer
sort
=
authorResourceMapper
.
getMax
();
if
(
sort
==
null
){
sort
=
1
;
}
else
{
sort
+=
1
;
}
return
sort
;
}
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/projectlibrary/ProjectLibrarySerivceImpl.java
浏览文件 @
6b32107d
...
...
@@ -25,7 +25,7 @@ import com.zrqx.core.util.bean.BeanUtils;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.vo.resource.projectlibrary.ProjectLibraryListVO
;
import
com.zrqx.resource.bg.mapper.ResourceRelationMapper
;
import
com.zrqx.resource.bg.mapper.
authorLibrary.
ResourceRelationMapper
;
import
com.zrqx.resource.bg.mapper.projectlibrary.ProjectLibraryMapper
;
import
com.zrqx.resource.bg.mapper.recommend.RecommendResourceMapper
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论