Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
zgzx
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
zgzx
Commits
1ff7c7f8
提交
1ff7c7f8
authored
11月 20, 2020
作者:
renjianyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
75749eab
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
119 行增加
和
32 行删除
+119
-32
ProjectLibraryController.java
...g/controller/projectlibrary/ProjectLibraryController.java
+20
-4
ResourceLibraryController.java
...controller/resourcelibrary/ResourceLibraryController.java
+56
-7
ArticleLibraryMapper.java
...source/bg/mapper/articlelibrary/ArticleLibraryMapper.java
+6
-0
AudioLibraryMapper.java
...x/resource/bg/mapper/audiolibrary/AudioLibraryMapper.java
+6
-6
ProjectLibraryMapper.java
...source/bg/mapper/projectlibrary/ProjectLibraryMapper.java
+2
-2
VideoLibraryMapper.java
...x/resource/bg/mapper/videolibrary/VideoLibraryMapper.java
+26
-11
ProjectLibrarySerivceImpl.java
.../bg/service/projectlibrary/ProjectLibrarySerivceImpl.java
+2
-1
ProjectLibraryService.java
...urce/bg/service/projectlibrary/ProjectLibraryService.java
+1
-1
没有找到文件。
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/controller/projectlibrary/ProjectLibraryController.java
浏览文件 @
1ff7c7f8
...
@@ -19,7 +19,7 @@ import com.zrqx.core.form.resource.bg.projectlibrary.QueryProjectLibraryForm;
...
@@ -19,7 +19,7 @@ import com.zrqx.core.form.resource.bg.projectlibrary.QueryProjectLibraryForm;
import
com.zrqx.core.form.resource.bg.projectlibrary.SaveUpdateProjectLibraryForm
;
import
com.zrqx.core.form.resource.bg.projectlibrary.SaveUpdateProjectLibraryForm
;
import
com.zrqx.core.form.resource.bg.projectlibrary.UpdateTopForm
;
import
com.zrqx.core.form.resource.bg.projectlibrary.UpdateTopForm
;
import
com.zrqx.core.form.resource.bg.recommend.UpdateRecommendResourceForm
;
import
com.zrqx.core.form.resource.bg.recommend.UpdateRecommendResourceForm
;
import
com.zrqx.core.model.resource.rojectLibrary.ProjectLibrary
;
import
com.zrqx.core.model.resource.
p
rojectLibrary.ProjectLibrary
;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.util.response.CallBack
;
import
com.zrqx.core.util.response.CallBack
;
...
@@ -89,13 +89,29 @@ public class ProjectLibraryController {
...
@@ -89,13 +89,29 @@ public class ProjectLibraryController {
return
CallBack
.
success
();
return
CallBack
.
success
();
}
}
@ApiOperation
(
value
=
"
批量 置顶/推荐 "
,
notes
=
"批量 启用/禁用
"
)
@ApiOperation
(
value
=
"
推荐 "
,
notes
=
"推荐
"
)
@PostMapping
(
value
=
"/
batch/
update/topStatus"
)
@PostMapping
(
value
=
"/update/topStatus"
)
public
CallBack
<
Boolean
>
updateTopStatus
(
@RequestBody
UpdateTopForm
form
){
public
CallBack
<
Boolean
>
updateTopStatus
(
@RequestBody
UpdateTopForm
form
){
Example
example
=
service
.
createExample
();
Example
example
=
service
.
createExample
();
example
.
createCriteria
().
andEqualTo
(
"id"
,
form
.
getId
());
example
.
createCriteria
().
andEqualTo
(
"id"
,
form
.
getId
());
ProjectLibrary
entity
=
new
ProjectLibrary
();
ProjectLibrary
entity
=
new
ProjectLibrary
();
entity
.
setTopStatus
(
form
.
getTopStatus
());
entity
.
setTopStatus
(
form
.
getStatus
());
entity
.
setUpdateTime
(
new
Date
());
if
(!
service
.
UpdateByExampleSelective
(
entity
,
example
)){
throw
new
BaseException
(
"操作失败"
);
}
//更新推荐位资源的状态
//recommendResourceManage.updateStatus(form.getIds(), 8, form.getStatus());
return
CallBack
.
success
();
}
@ApiOperation
(
value
=
"推荐 "
,
notes
=
"推荐"
)
@PostMapping
(
value
=
"/update/recommendStatus"
)
public
CallBack
<
Boolean
>
updateRecommendStatus
(
@RequestBody
UpdateTopForm
form
){
Example
example
=
service
.
createExample
();
example
.
createCriteria
().
andEqualTo
(
"id"
,
form
.
getId
());
ProjectLibrary
entity
=
new
ProjectLibrary
();
entity
.
setRecommendStatus
(
form
.
getStatus
());
entity
.
setUpdateTime
(
new
Date
());
entity
.
setUpdateTime
(
new
Date
());
if
(!
service
.
UpdateByExampleSelective
(
entity
,
example
)){
if
(!
service
.
UpdateByExampleSelective
(
entity
,
example
)){
throw
new
BaseException
(
"操作失败"
);
throw
new
BaseException
(
"操作失败"
);
...
...
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/controller/resourcelibrary/ResourceLibraryController.java
浏览文件 @
1ff7c7f8
...
@@ -8,6 +8,7 @@ import java.util.List;
...
@@ -8,6 +8,7 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
@@ -28,8 +29,10 @@ import com.zrqx.core.form.resource.bg.SaveResourceRelationForm;
...
@@ -28,8 +29,10 @@ import com.zrqx.core.form.resource.bg.SaveResourceRelationForm;
import
com.zrqx.core.form.resource.bg.ebook.UpdateEbookRelationForm
;
import
com.zrqx.core.form.resource.bg.ebook.UpdateEbookRelationForm
;
import
com.zrqx.core.model.resource.articlelibrary.ArticleLibraryDiyType
;
import
com.zrqx.core.model.resource.articlelibrary.ArticleLibraryDiyType
;
import
com.zrqx.core.model.resource.audiolibrary.AudioLibrary
;
import
com.zrqx.core.model.resource.audiolibrary.AudioLibrary
;
import
com.zrqx.core.model.resource.projectLibrary.ProjectLibrary
;
import
com.zrqx.core.model.resource.resourcerelation.ResourceRelation
;
import
com.zrqx.core.model.resource.resourcerelation.ResourceRelation
;
import
com.zrqx.core.model.resource.rojectLibrary.ProjectLibrary
;
import
com.zrqx.core.util.bean.BeanUtils
;
import
com.zrqx.core.util.datatype.ArrayUtils
;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.util.response.CallBack
;
import
com.zrqx.core.util.response.CallBack
;
...
@@ -133,19 +136,65 @@ public class ResourceLibraryController {
...
@@ -133,19 +136,65 @@ public class ResourceLibraryController {
@ApiOperation
(
value
=
"选择弹窗中的列表"
,
notes
=
"查询选择弹窗中的列表"
)
@ApiOperation
(
value
=
"选择弹窗中的列表"
,
notes
=
"查询选择弹窗中的列表"
)
@GetMapping
(
value
=
ResourceRequestPath
.
RELATION_RESOURCE
+
ResourceRequestPath
.
POPPAGE
)
@GetMapping
(
value
=
ResourceRequestPath
.
RELATION_RESOURCE
+
ResourceRequestPath
.
POPPAGE
)
public
CallBack
<
PageInfo
<
ResourceRelationListVo
>>
page
(
QueryResourceForPoPForm
form
,
PageParam
pageParam
)
{
public
CallBack
<
PageInfo
<
ResourceRelationListVo
>>
page
(
QueryResourceForPoPForm
form
,
PageParam
pageParam
)
{
if
(
StringUtils
.
isBlank
(
form
.
getId
())
){
throw
new
BaseException
();
}
List
<
String
>
allList
=
new
ArrayList
<>();
//查询当前资源已关联的资源
List
<
QueryResourceForPoPForm
>
ls
=
null
;
//关联资源查询
ResourceRelation
er
=
new
ResourceRelation
();
er
.
setObjectId
(
form
.
getId
());
List
<
ResourceRelation
>
list
=
resourceRelationService
.
select
(
er
);
er
.
setResourceId
(
form
.
getId
());
if
(
form
.
getResourceType
()
!=
0
)
{
er
.
setResourceType
(
form
.
getResourceType
());
}
list
.
add
(
er
);
ls
=
BeanUtils
.
copyList
(
list
,
QueryResourceForPoPForm
.
class
);
if
(
ArrayUtils
.
isNotEmpty
(
ls
)){
Map
<
Integer
,
List
<
String
>>
resultMap
=
ls
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
QueryResourceForPoPForm
::
getResourceType
,
Collectors
.
mapping
(
QueryResourceForPoPForm
::
getResourceId
,
Collectors
.
toList
())));
if
(
resultMap
.
get
(
AllResourceTypeEnum
.
BOOK
.
getCode
())
!=
null
)
{
allList
.
addAll
(
resultMap
.
get
(
AllResourceTypeEnum
.
BOOK
.
getCode
()));
}
if
(
resultMap
.
get
(
AllResourceTypeEnum
.
ARTICLE
.
getCode
())
!=
null
)
{
allList
.
addAll
(
resultMap
.
get
(
AllResourceTypeEnum
.
ARTICLE
.
getCode
()));
}
if
(
resultMap
.
get
(
AllResourceTypeEnum
.
VIDEO
.
getCode
())
!=
null
)
{
allList
.
addAll
(
resultMap
.
get
(
AllResourceTypeEnum
.
VIDEO
.
getCode
()));
}
if
(
resultMap
.
get
(
AllResourceTypeEnum
.
AUDIO
.
getCode
())
!=
null
)
{
allList
.
addAll
(
resultMap
.
get
(
AllResourceTypeEnum
.
AUDIO
.
getCode
()));
}
//projectIdList = resultMap.get(AllResourceTypeEnum.PROJECT.getCode());
}
QueryResourceForPoPForm
f
=
new
QueryResourceForPoPForm
();
BeanUtils
.
copyProperties
(
form
,
f
);
if
(
form
.
getResourceType
().
equals
(
1
))
{
if
(
form
.
getResourceType
().
equals
(
1
))
{
return
CallBack
.
success
(
bookservice
.
pageByTitleAndDiyType
(
form
,
pageParam
));
f
.
setIds
(
allList
);
return
CallBack
.
success
(
bookservice
.
pageByTitleAndDiyType
(
f
,
pageParam
));
}
else
if
(
form
.
getResourceType
().
equals
(
2
)){
}
else
if
(
form
.
getResourceType
().
equals
(
2
)){
return
CallBack
.
success
(
articleLibraryService
.
pageByTitleAndDiyType
(
form
,
pageParam
));
f
.
setIds
(
allList
);
return
CallBack
.
success
(
articleLibraryService
.
pageByTitleAndDiyType
(
f
,
pageParam
));
}
else
if
(
form
.
getResourceType
().
equals
(
3
))
{
}
else
if
(
form
.
getResourceType
().
equals
(
3
))
{
return
CallBack
.
success
(
pdfLibraryService
.
pageByTitleAndDiyType
(
form
,
pageParam
));
f
.
setIds
(
allList
);
return
CallBack
.
success
(
pdfLibraryService
.
pageByTitleAndDiyType
(
f
,
pageParam
));
}
else
if
(
form
.
getResourceType
().
equals
(
5
))
{
}
else
if
(
form
.
getResourceType
().
equals
(
5
))
{
return
CallBack
.
success
(
audioLibraryService
.
pageByTitleAndDiyType
(
form
,
pageParam
));
f
.
setIds
(
allList
);
return
CallBack
.
success
(
videoLibraryService
.
pageByTitleAndDiyType
(
f
,
pageParam
));
}
else
if
(
form
.
getResourceType
().
equals
(
6
))
{
}
else
if
(
form
.
getResourceType
().
equals
(
6
))
{
return
CallBack
.
success
(
videoLibraryService
.
pageByTitleAndDiyType
(
form
,
pageParam
));
f
.
setIds
(
allList
);
return
CallBack
.
success
(
audioLibraryService
.
pageByTitleAndDiyType
(
f
,
pageParam
));
}
else
if
(
form
.
getResourceType
().
equals
(
0
)){
}
else
if
(
form
.
getResourceType
().
equals
(
0
)){
f
.
setIds
(
allList
);
//全部写
//全部写
return
CallBack
.
success
(
videoLibraryService
.
allpageByTitleAndDiyType
(
f
orm
,
pageParam
));
return
CallBack
.
success
(
videoLibraryService
.
allpageByTitleAndDiyType
(
f
,
pageParam
));
}
}
return
CallBack
.
success
();
return
CallBack
.
success
();
}
}
...
...
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/mapper/articlelibrary/ArticleLibraryMapper.java
浏览文件 @
1ff7c7f8
...
@@ -64,6 +64,12 @@ public interface ArticleLibraryMapper extends BaseMapper<ArticleLibrary> {
...
@@ -64,6 +64,12 @@ public interface ArticleLibraryMapper extends BaseMapper<ArticleLibrary> {
+
"<if test = '"
+
NOTBLANK
+
"(form.diyTypeCode)'>"
+
"<if test = '"
+
NOTBLANK
+
"(form.diyTypeCode)'>"
+
"and ad.code like concat(#{form.diyTypeCode},'%') "
+
"and ad.code like concat(#{form.diyTypeCode},'%') "
+
"</if>"
+
"</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>"
)
+
"</script>"
)
List
<
ResourceRelationListVo
>
queryByTileAndDiyType
(
@Param
(
"form"
)
QueryResourceForPoPForm
entity
);
List
<
ResourceRelationListVo
>
queryByTileAndDiyType
(
@Param
(
"form"
)
QueryResourceForPoPForm
entity
);
/**
/**
...
...
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/mapper/audiolibrary/AudioLibraryMapper.java
浏览文件 @
1ff7c7f8
...
@@ -59,12 +59,12 @@ public interface AudioLibraryMapper extends BaseMapper<AudioLibrary> {
...
@@ -59,12 +59,12 @@ public interface AudioLibraryMapper extends BaseMapper<AudioLibrary> {
+
"</if>"
+
"</if>"
//
+ "<if test='form.ids != null and form.ids.size > 0'>"
+
"<if test='form.ids != null and form.ids.size > 0'>"
//
+ "and a.id not in "
+
"and a.id not in "
//
+ " <foreach collection=\"form.ids\" index=\"index\" item=\"id\" open=\"(\" separator=\",\" close=\")\">"
+
" <foreach collection=\"form.ids\" index=\"index\" item=\"id\" open=\"(\" separator=\",\" close=\")\">"
//
+ "#{id}"
+
"#{id}"
//
+ "</foreach>"
+
"</foreach>"
//
+ "</if>"
+
"</if>"
+
"</script>"
)
+
"</script>"
)
List
<
ResourceRelationListVo
>
queryByTileAndDiyType
(
@Param
(
"form"
)
QueryResourceForPoPForm
entity
);
List
<
ResourceRelationListVo
>
queryByTileAndDiyType
(
@Param
(
"form"
)
QueryResourceForPoPForm
entity
);
}
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/mapper/projectlibrary/ProjectLibraryMapper.java
浏览文件 @
1ff7c7f8
...
@@ -9,7 +9,7 @@ import org.apache.ibatis.annotations.Select;
...
@@ -9,7 +9,7 @@ import org.apache.ibatis.annotations.Select;
import
com.zrqx.core.form.resource.bg.QueryResourceForPoPForm
;
import
com.zrqx.core.form.resource.bg.QueryResourceForPoPForm
;
import
com.zrqx.core.form.resource.bg.projectlibrary.QueryProjectLibraryForm
;
import
com.zrqx.core.form.resource.bg.projectlibrary.QueryProjectLibraryForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.resource.rojectLibrary.ProjectLibrary
;
import
com.zrqx.core.model.resource.
p
rojectLibrary.ProjectLibrary
;
import
com.zrqx.core.vo.resource.projectlibrary.ProjectLibraryListVO
;
import
com.zrqx.core.vo.resource.projectlibrary.ProjectLibraryListVO
;
/**
/**
* 视频库
* 视频库
...
@@ -17,7 +17,7 @@ import com.zrqx.core.vo.resource.projectlibrary.ProjectLibraryListVO;
...
@@ -17,7 +17,7 @@ import com.zrqx.core.vo.resource.projectlibrary.ProjectLibraryListVO;
public
interface
ProjectLibraryMapper
extends
BaseMapper
<
ProjectLibrary
>
{
public
interface
ProjectLibraryMapper
extends
BaseMapper
<
ProjectLibrary
>
{
@Select
(
"<script>"
@Select
(
"<script>"
+
"select a.id,a.name,a.uploadTime,a.updateTime,a.status,a.sceneStatus,a.topStatus,a.author,a.cover,a.cover1 "
+
"select a.id,a.name,
recommendStatus,
a.uploadTime,a.updateTime,a.status,a.sceneStatus,a.topStatus,a.author,a.cover,a.cover1 "
+
"from res_Project_Library a "
+
"from res_Project_Library a "
+
"where 1=1 "
+
"where 1=1 "
+
"<if test='"
+
NOTBLANK
+
"(form.nai)'>"
+
"<if test='"
+
NOTBLANK
+
"(form.nai)'>"
...
...
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/mapper/videolibrary/VideoLibraryMapper.java
浏览文件 @
1ff7c7f8
...
@@ -49,7 +49,7 @@ public interface VideoLibraryMapper extends BaseMapper<VideoLibrary> {
...
@@ -49,7 +49,7 @@ public interface VideoLibraryMapper extends BaseMapper<VideoLibrary> {
+
"select DISTINCT a.id,a.name,a.author,a.realprice,a.timeLength,a.size,a.uploadTime,a.status,a.img,a.defaultImg "
+
"select DISTINCT a.id,a.name,a.author,a.realprice,a.timeLength,a.size,a.uploadTime,a.status,a.img,a.defaultImg "
+
"from res_Video_Library a left join res_Video_Library_Diy_Type ad "
+
"from res_Video_Library a left join res_Video_Library_Diy_Type ad "
+
"on a.id = ad.vlid "
+
"on a.id = ad.vlid "
+
"where 1=1 and a.status = 1
and salesType = 1
"
+
"where 1=1 and a.status = 1 "
+
"<if test = '"
+
NOTBLANK
+
"(form.diyTypeCode)'>"
+
"<if test = '"
+
NOTBLANK
+
"(form.diyTypeCode)'>"
+
" and ad.code like concat(#{form.diyTypeCode},'%') "
+
" and ad.code like concat(#{form.diyTypeCode},'%') "
+
"</if>"
+
"</if>"
...
@@ -58,12 +58,12 @@ public interface VideoLibraryMapper extends BaseMapper<VideoLibrary> {
...
@@ -58,12 +58,12 @@ public interface VideoLibraryMapper extends BaseMapper<VideoLibrary> {
+
"</if>"
+
"</if>"
//
+ "<if test='form.ids != null and form.ids.size > 0'>"
+
"<if test='form.ids != null and form.ids.size > 0'>"
//
+ "and a.id not in "
+
"and a.id not in "
//
+ " <foreach collection=\"form.ids\" index=\"index\" item=\"id\" open=\"(\" separator=\",\" close=\")\">"
+
" <foreach collection=\"form.ids\" index=\"index\" item=\"id\" open=\"(\" separator=\",\" close=\")\">"
//
+ "#{id}"
+
"#{id}"
//
+ "</foreach>"
+
"</foreach>"
//
+ "</if>"
+
"</if>"
+
"</script>"
)
+
"</script>"
)
List
<
ResourceRelationListVo
>
queryByTileAndDiyType
(
@Param
(
"form"
)
QueryResourceForPoPForm
entity
);
List
<
ResourceRelationListVo
>
queryByTileAndDiyType
(
@Param
(
"form"
)
QueryResourceForPoPForm
entity
);
...
@@ -73,7 +73,7 @@ public interface VideoLibraryMapper extends BaseMapper<VideoLibrary> {
...
@@ -73,7 +73,7 @@ public interface VideoLibraryMapper extends BaseMapper<VideoLibrary> {
+
"select DISTINCT a.id,a.name,a.author,a.resourceType,a.uploadTime,a.status "
+
"select DISTINCT a.id,a.name,a.author,a.resourceType,a.uploadTime,a.status "
+
"from res_Video_Library a left join res_Video_Library_Diy_Type ad "
+
"from res_Video_Library a left join res_Video_Library_Diy_Type ad "
+
"on a.id = ad.vlid "
+
"on a.id = ad.vlid "
+
"where 1=1 and a.status = 1
and salesType = 1
"
+
"where 1=1 and a.status = 1 "
+
"<if test = '"
+
NOTBLANK
+
"(form.diyTypeCode)'>"
+
"<if test = '"
+
NOTBLANK
+
"(form.diyTypeCode)'>"
+
" and ad.code like concat(#{form.diyTypeCode},'%') "
+
" and ad.code like concat(#{form.diyTypeCode},'%') "
...
@@ -81,6 +81,12 @@ public interface VideoLibraryMapper extends BaseMapper<VideoLibrary> {
...
@@ -81,6 +81,12 @@ public interface VideoLibraryMapper extends BaseMapper<VideoLibrary> {
+
"<if test = '"
+
NOTBLANK
+
"(form.name)'>"
+
"<if test = '"
+
NOTBLANK
+
"(form.name)'>"
+
" and a.name like concat('%',#{form.name},'%') "
+
" and a.name like concat('%',#{form.name},'%') "
+
"</if>"
+
"</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>"
+
" union "
+
" union "
+
"select DISTINCT a.id,a.name,a.author,a.resourceType,a.uploadTime,a.status"
+
"select DISTINCT a.id,a.name,a.author,a.resourceType,a.uploadTime,a.status"
...
@@ -94,6 +100,12 @@ public interface VideoLibraryMapper extends BaseMapper<VideoLibrary> {
...
@@ -94,6 +100,12 @@ public interface VideoLibraryMapper extends BaseMapper<VideoLibrary> {
+
"<if test = '"
+
NOTBLANK
+
"(form.name)'>"
+
"<if test = '"
+
NOTBLANK
+
"(form.name)'>"
+
" and a.title like concat('%',#{form.name},'%') "
+
" and a.title like concat('%',#{form.name},'%') "
+
"</if>"
+
"</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>"
+
" union "
+
" union "
+
"select DISTINCT a.id,a.name,a.author,a.resourceType,DATE_FORMAT(a.uploadTime,'%Y-%m-%d') uploadTime,a.status "
+
"select DISTINCT a.id,a.name,a.author,a.resourceType,DATE_FORMAT(a.uploadTime,'%Y-%m-%d') uploadTime,a.status "
...
@@ -102,12 +114,15 @@ public interface VideoLibraryMapper extends BaseMapper<VideoLibrary> {
...
@@ -102,12 +114,15 @@ public interface VideoLibraryMapper extends BaseMapper<VideoLibrary> {
+
"<if test = '"
+
NOTBLANK
+
"(form.name)'>"
+
"<if test = '"
+
NOTBLANK
+
"(form.name)'>"
+
"and a.name like concat('%',#{form.name},'%') "
+
"and a.name like concat('%',#{form.name},'%') "
+
"</if>"
+
"</if>"
+
"<if test='form.resourceType != null' >"
+
"and a.resourceType = #{form.resourceType} "
+
"</if>"
+
"<if test = '"
+
NOTBLANK
+
"(form.diyTypeCode)'>"
+
"<if test = '"
+
NOTBLANK
+
"(form.diyTypeCode)'>"
+
"and ad.code like concat(#{form.diyTypeCode},'%') "
+
"and ad.code like concat(#{form.diyTypeCode},'%') "
+
"</if>"
+
"</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>"
)
+
"</script>"
)
List
<
ResourceRelationListVo
>
allQueryByTileAndDiyType
(
@Param
(
"form"
)
QueryResourceForPoPForm
entity
);
List
<
ResourceRelationListVo
>
allQueryByTileAndDiyType
(
@Param
(
"form"
)
QueryResourceForPoPForm
entity
);
...
...
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/projectlibrary/ProjectLibrarySerivceImpl.java
浏览文件 @
1ff7c7f8
...
@@ -13,8 +13,8 @@ import com.zrqx.core.form.resource.bg.QueryResourceForPoPForm;
...
@@ -13,8 +13,8 @@ import com.zrqx.core.form.resource.bg.QueryResourceForPoPForm;
import
com.zrqx.core.form.resource.bg.projectlibrary.QueryProjectLibraryForm
;
import
com.zrqx.core.form.resource.bg.projectlibrary.QueryProjectLibraryForm
;
import
com.zrqx.core.form.resource.bg.projectlibrary.SaveUpdateProjectLibraryForm
;
import
com.zrqx.core.form.resource.bg.projectlibrary.SaveUpdateProjectLibraryForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.resource.projectLibrary.ProjectLibrary
;
import
com.zrqx.core.model.resource.resourcerelation.ResourceRelation
;
import
com.zrqx.core.model.resource.resourcerelation.ResourceRelation
;
import
com.zrqx.core.model.resource.rojectLibrary.ProjectLibrary
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.core.util.bean.BeanUtils
;
import
com.zrqx.core.util.bean.BeanUtils
;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageInfo
;
...
@@ -55,6 +55,7 @@ public class ProjectLibrarySerivceImpl extends BaseServiceImpl<ProjectLibrary,St
...
@@ -55,6 +55,7 @@ public class ProjectLibrarySerivceImpl extends BaseServiceImpl<ProjectLibrary,St
//entity.setStatus(ProjectStatusEnum.STATUS_0.getCode());
//entity.setStatus(ProjectStatusEnum.STATUS_0.getCode());
entity
.
setStatus
(
1
);
entity
.
setStatus
(
1
);
entity
.
setTopStatus
(
0
);
entity
.
setTopStatus
(
0
);
entity
.
setRecommendStatus
(
0
);
entity
.
setUploadTime
(
new
Date
());
entity
.
setUploadTime
(
new
Date
());
entity
.
setResourceType
(
AllResourceTypeEnum
.
PROJECT
.
getCode
());
entity
.
setResourceType
(
AllResourceTypeEnum
.
PROJECT
.
getCode
());
entity
.
setBrowseNum
(
50
);
entity
.
setBrowseNum
(
50
);
...
...
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/projectlibrary/ProjectLibraryService.java
浏览文件 @
1ff7c7f8
...
@@ -5,7 +5,7 @@ import java.util.List;
...
@@ -5,7 +5,7 @@ import java.util.List;
import
com.zrqx.core.form.resource.bg.QueryResourceForPoPForm
;
import
com.zrqx.core.form.resource.bg.QueryResourceForPoPForm
;
import
com.zrqx.core.form.resource.bg.projectlibrary.QueryProjectLibraryForm
;
import
com.zrqx.core.form.resource.bg.projectlibrary.QueryProjectLibraryForm
;
import
com.zrqx.core.form.resource.bg.projectlibrary.SaveUpdateProjectLibraryForm
;
import
com.zrqx.core.form.resource.bg.projectlibrary.SaveUpdateProjectLibraryForm
;
import
com.zrqx.core.model.resource.rojectLibrary.ProjectLibrary
;
import
com.zrqx.core.model.resource.
p
rojectLibrary.ProjectLibrary
;
import
com.zrqx.core.service.BaseService
;
import
com.zrqx.core.service.BaseService
;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.util.page.PageParam
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论