Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
N
nrgl
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
nrgl
Commits
65b24d59
提交
65b24d59
authored
2月 15, 2019
作者:
renjiancai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
fd13aeac
隐藏空白字符变更
内嵌
并排
正在显示
41 个修改的文件
包含
314 行增加
和
30 行删除
+314
-30
BaseRequestPath.java
...src/main/java/com/zrqx/core/constant/BaseRequestPath.java
+5
-1
ArticleLibraryOneVO.java
.../core/vo/resource/articlelibrary/ArticleLibraryOneVO.java
+44
-15
AnimationLibraryController.java
...ntroller/animationlibrary/AnimationLibraryController.java
+5
-0
ArticleLibraryController.java
...g/controller/articlelibrary/ArticleLibraryController.java
+5
-0
AudioLibraryController.java
...ce/bg/controller/audiolibrary/AudioLibraryController.java
+5
-0
CoursewareLibraryController.java
...roller/coursewarelibrary/CoursewareLibraryController.java
+5
-0
ImageLibraryController.java
...ce/bg/controller/imagelibrary/ImageLibraryController.java
+5
-0
PdfLibraryController.java
...ce/bg/controller/pdffilelibrary/PdfLibraryController.java
+6
-1
PeriodVolumeLibraryController.java
.../controller/periodical/PeriodVolumeLibraryController.java
+6
-1
ResourceRecycleBinController.java
...g/controller/recycleBin/ResourceRecycleBinController.java
+2
-2
VideoLibraryController.java
...ce/bg/controller/videolibrary/VideoLibraryController.java
+5
-0
VideoResourceMapper.java
.../resource/bg/mapper/videolibrary/VideoResourceMapper.java
+1
-1
AnimationLibrarySerivceImpl.java
...service/animationlibrary/AnimationLibrarySerivceImpl.java
+6
-0
AnimationLibraryService.java
.../bg/service/animationlibrary/AnimationLibraryService.java
+1
-0
AnimationResourceService.java
...bg/service/animationlibrary/AnimationResourceService.java
+8
-0
AnimationResourceServiceImpl.java
...ervice/animationlibrary/AnimationResourceServiceImpl.java
+13
-0
ArticleResourceService.java
...rce/bg/service/articlelibrary/ArticleResourceService.java
+2
-0
ArticleResourceServiceImpl.java
...bg/service/articlelibrary/ArticleResourceServiceImpl.java
+15
-0
AudioLibrarySerivceImpl.java
...urce/bg/service/audiolibrary/AudioLibrarySerivceImpl.java
+4
-0
AudioLibraryService.java
...resource/bg/service/audiolibrary/AudioLibraryService.java
+1
-1
AudioResourceService.java
...esource/bg/service/audiolibrary/AudioResourceService.java
+8
-0
AudioResourceServiceImpl.java
...rce/bg/service/audiolibrary/AudioResourceServiceImpl.java
+13
-1
CoursewareResourceService.java
.../service/coursewarelibrary/CoursewareResourceService.java
+8
-0
CoursewareResourceServiceImpl.java
...vice/coursewarelibrary/CoursewareResourceServiceImpl.java
+4
-0
BookResourceService.java
...m/zrqx/resource/bg/service/ebook/BookResourceService.java
+8
-1
BookResourceServiceImpl.java
...qx/resource/bg/service/ebook/BookResourceServiceImpl.java
+14
-1
ImageResourceService.java
...esource/bg/service/imagelibrary/ImageResourceService.java
+8
-1
ImageResourceServiceImpl.java
...rce/bg/service/imagelibrary/ImageResourceServiceImpl.java
+14
-0
PdfLibrarySerivceImpl.java
...urce/bg/service/pdffilelibrary/PdfLibrarySerivceImpl.java
+6
-2
PdfResourceService.java
...esource/bg/service/pdffilelibrary/PdfResourceService.java
+8
-0
PdfResourceServiceImpl.java
...rce/bg/service/pdffilelibrary/PdfResourceServiceImpl.java
+13
-0
PeriodVolumeResourceService.java
...ce/bg/service/periodical/PeriodVolumeResourceService.java
+8
-0
PeriodVolumeResourceServiceImpl.java
...g/service/periodical/PeriodVolumeResourceServiceImpl.java
+13
-0
PeriodVolumeService.java
...x/resource/bg/service/periodical/PeriodVolumeService.java
+2
-0
PeriodVolumeServiceImpl.java
...source/bg/service/periodical/PeriodVolumeServiceImpl.java
+6
-0
ResourceRecycleBinSerivceImpl.java
.../bg/service/recycleBin/ResourceRecycleBinSerivceImpl.java
+1
-1
ResourceRecycleBinService.java
...urce/bg/service/recycleBin/ResourceRecycleBinService.java
+1
-1
VideoLibrarySerivceImpl.java
...urce/bg/service/videolibrary/VideoLibrarySerivceImpl.java
+6
-0
VideoLibraryService.java
...resource/bg/service/videolibrary/VideoLibraryService.java
+1
-0
VideoResourceService.java
...esource/bg/service/videolibrary/VideoResourceService.java
+8
-0
VideoResourceServiceImpl.java
...rce/bg/service/videolibrary/VideoResourceServiceImpl.java
+20
-0
没有找到文件。
com.zrqx.core/src/main/java/com/zrqx/core/constant/BaseRequestPath.java
浏览文件 @
65b24d59
...
...
@@ -70,7 +70,9 @@ public class BaseRequestPath {
public
static
final
String
CONTENT
=
"/content"
;
/** 数据类型 */
public
static
final
String
DATATYPE
=
"/dataType"
;
/** 数据类型 */
public
static
final
String
RELATION
=
"/relation"
;
/**
* 最大排序号
...
...
@@ -87,6 +89,8 @@ public class BaseRequestPath {
public
static
final
String
BATCH_UPDATE
=
BATCH
+
UPDATE
;
/** 批量删除 */
public
static
final
String
BATCH_DELETE
=
BATCH
+
DELETE
;
/** 批量删除资源 */
public
static
final
String
BATCH_RELATION_DELETE
=
BATCH
+
RELATION
+
DELETE
;
/** 批量还原 */
public
static
final
String
BATCH_RESTORE
=
BATCH
+
RESTORE
;
/** 修改指定id对象的属性信息 */
...
...
com.zrqx.core/src/main/java/com/zrqx/core/vo/resource/articlelibrary/ArticleLibraryOneVO.java
浏览文件 @
65b24d59
...
...
@@ -15,34 +15,63 @@ import com.zrqx.core.model.resource.articlelibrary.ArticleLibraryLabelDiyType;
public
class
ArticleLibraryOneVO
{
@ApiModelProperty
(
"文章id,新增时不需要填写"
)
private
String
id
;
@ApiModelProperty
(
value
=
"文章标题"
)
private
String
titl
e
;
@ApiModelProperty
(
value
=
"文章标题"
,
required
=
true
)
private
String
nam
e
;
@ApiModelProperty
(
"作者id"
)
private
Integer
authorId
;
private
String
authorId
;
@ApiModelProperty
(
"作者"
)
private
String
author
;
@ApiModelProperty
(
"所属部门id"
)
private
Integer
departmentId
;
@ApiModelProperty
(
"所属部门"
)
private
String
department
;
@ApiModelProperty
(
"来源"
)
private
String
source
;
@ApiModelProperty
(
"关键词"
)
private
String
keywords
;
@ApiModelProperty
(
"定价"
)
private
BigDecimal
price
;
@ApiModelProperty
(
"简介"
)
private
String
synopsis
;
@ApiModelProperty
(
"正文"
)
private
String
text
;
@ApiModelProperty
(
"pdf"
)
private
String
pdf
;
@ApiModelProperty
(
"封面"
)
private
String
img
;
@ApiModelProperty
(
"状态:0待审核,1审核通过,2审核未通过"
)
private
Integer
status
;
@ApiModelProperty
(
"图书id"
)
private
String
bookId
;
@ApiModelProperty
(
"图书名称"
)
private
String
bookName
;
@ApiModelProperty
(
"文章封面"
)
private
String
cover
;
@ApiModelProperty
(
"音频文件"
)
private
String
audio
;
private
String
audio
File
;
@ApiModelProperty
(
"视频文件"
)
private
String
video
;
@ApiModelProperty
(
"售价"
)
private
BigDecimal
realPrice
;
@ApiModelProperty
(
"全文阅读权限 0 游客可见 1会员可见"
)
private
Integer
readTextPower
;
private
String
videoFile
;
@ApiModelProperty
(
"PDF文件"
)
private
String
pdfFile
;
/**商品信息**/
@ApiModelProperty
(
"商品编号"
)
private
String
goosCode
;
@ApiModelProperty
(
"数据来源 1:本版 2外版"
)
private
Integer
dataSources
;
@ApiModelProperty
(
"销售状态 1:可售 2:不可售"
)
private
Integer
salesStatus
;
@ApiModelProperty
(
"定价"
)
private
BigDecimal
price
;
@ApiModelProperty
(
"售价状态 "
)
private
BigDecimal
sellingPrice
;
@ApiModelProperty
(
"价格状态 1:付费 2:免费"
)
private
Integer
priceType
;
@ApiModelProperty
(
"相关合同"
)
private
String
relatedContracts
;
@ApiModelProperty
(
"合同编号"
)
private
String
contractNumber
;
@ApiModelProperty
(
"合同名称"
)
private
String
contractName
;
@ApiModelProperty
(
"开始日期"
)
private
String
startDate
;
@ApiModelProperty
(
"结束日期"
)
private
String
endDate
;
@ApiModelProperty
(
value
=
"自定义分类"
)
private
List
<
ArticleLibraryDiyType
>
divType
;
...
...
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/controller/animationlibrary/AnimationLibraryController.java
浏览文件 @
65b24d59
...
...
@@ -236,4 +236,9 @@ public class AnimationLibraryController {
});
return
CallBack
.
success
(
resourceService
.
insertUuidList
(
recordList
));
}
@ApiOperation
(
value
=
"批量删除关联资源"
,
notes
=
"批量删除"
)
@PostMapping
(
value
=
ResourceRequestPath
.
BATCH_RELATION_DELETE
)
public
CallBack
<
Boolean
>
deleteByResourceIds
(
@RequestBody
List
<
String
>
ids
)
{
return
CallBack
.
success
(
resourceService
.
batchDeleteResource
(
ids
));
}
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/controller/articlelibrary/ArticleLibraryController.java
浏览文件 @
65b24d59
...
...
@@ -221,4 +221,9 @@ public class ArticleLibraryController {
});
return
CallBack
.
success
(
resourceService
.
insertUuidList
(
recordList
));
}
@ApiOperation
(
value
=
"批量删除关联资源"
,
notes
=
"批量删除"
)
@PostMapping
(
value
=
ResourceRequestPath
.
BATCH_RELATION_DELETE
)
public
CallBack
<
Boolean
>
deleteByResourceIds
(
@RequestBody
List
<
String
>
ids
)
{
return
CallBack
.
success
(
resourceService
.
batchDeleteResource
(
ids
));
}
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/controller/audiolibrary/AudioLibraryController.java
浏览文件 @
65b24d59
...
...
@@ -255,4 +255,9 @@ public class AudioLibraryController {
return
CallBack
.
success
(
resourceService
.
insertUuidList
(
recordList
));
}
@ApiOperation
(
value
=
"批量删除关联资源"
,
notes
=
"批量删除"
)
@PostMapping
(
value
=
ResourceRequestPath
.
BATCH_RELATION_DELETE
)
public
CallBack
<
Boolean
>
deleteByResourceIds
(
@RequestBody
List
<
String
>
ids
)
{
return
CallBack
.
success
(
resourceService
.
batchDeleteResource
(
ids
));
}
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/controller/coursewarelibrary/CoursewareLibraryController.java
浏览文件 @
65b24d59
...
...
@@ -243,4 +243,9 @@ public class CoursewareLibraryController {
});
return
CallBack
.
success
(
resourceService
.
insertUuidList
(
recordList
));
}
@ApiOperation
(
value
=
"批量删除关联资源"
,
notes
=
"批量删除"
)
@PostMapping
(
value
=
ResourceRequestPath
.
BATCH_RELATION_DELETE
)
public
CallBack
<
Boolean
>
deleteByResourceIds
(
@RequestBody
List
<
String
>
ids
)
{
return
CallBack
.
success
(
resourceService
.
batchDeleteResource
(
ids
));
}
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/controller/imagelibrary/ImageLibraryController.java
浏览文件 @
65b24d59
...
...
@@ -256,4 +256,9 @@ public class ImageLibraryController {
});
return
CallBack
.
success
(
resourceService
.
insertUuidList
(
recordList
));
}
@ApiOperation
(
value
=
"批量删除关联资源"
,
notes
=
"批量删除"
)
@PostMapping
(
value
=
ResourceRequestPath
.
BATCH_RELATION_DELETE
)
public
CallBack
<
Boolean
>
deleteByResourceIds
(
@RequestBody
List
<
String
>
ids
)
{
return
CallBack
.
success
(
resourceService
.
batchDeleteResource
(
ids
));
}
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/controller/pdffilelibrary/PdfLibraryController.java
浏览文件 @
65b24d59
...
...
@@ -227,7 +227,7 @@ public class PdfLibraryController {
@ApiOperation
(
value
=
"保存相关资源"
,
notes
=
"保存相关资源"
)
@PostMapping
(
value
=
ResourceRequestPath
.
RELATION_RESOURCE
+
ResourceRequestPath
.
SAVE
)
public
CallBack
<
Boolean
>
saveRelation
(
@RequestBody
SaveResourceRelationForm
entity
){
if
(
entity
.
getId
()!=
null
||
entity
.
getResourceIds
()
==
null
||
entity
.
getResourceType
()
==
null
||
entity
.
getResourceIds
().
length
==
0
){
if
(
entity
.
getId
()!=
null
||
entity
.
get
Id
()!=
""
||
entity
.
get
ResourceIds
()
==
null
||
entity
.
getResourceType
()
==
null
||
entity
.
getResourceIds
().
length
==
0
){
throw
new
BaseException
(
"必须指定id、被关联的resourceId、资源类型"
);
}
List
<
PdfResource
>
recordList
=
new
ArrayList
<
PdfResource
>();
...
...
@@ -242,4 +242,9 @@ public class PdfLibraryController {
});
return
CallBack
.
success
(
resourceService
.
insertUuidList
(
recordList
));
}
@ApiOperation
(
value
=
"批量删除关联资源"
,
notes
=
"批量删除"
)
@PostMapping
(
value
=
ResourceRequestPath
.
BATCH_RELATION_DELETE
)
public
CallBack
<
Boolean
>
deleteByResourceIds
(
@RequestBody
List
<
String
>
ids
)
{
return
CallBack
.
success
(
resourceService
.
batchDeleteResource
(
ids
));
}
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/controller/periodical/PeriodVolumeLibraryController.java
浏览文件 @
65b24d59
...
...
@@ -176,6 +176,11 @@ public class PeriodVolumeLibraryController {
throw
new
BaseException
(
"无法删除该token"
);
}
return
CallBack
.
success
();
}
@ApiOperation
(
value
=
"批量删除关联资源"
,
notes
=
"批量删除"
)
@PostMapping
(
value
=
ResourceRequestPath
.
BATCH_RELATION_DELETE
)
public
CallBack
<
Boolean
>
deleteByResourceIds
(
@RequestBody
List
<
String
>
ids
)
{
return
CallBack
.
success
(
resourceService
.
batchDeleteResource
(
ids
));
}
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/controller/recycleBin/ResourceRecycleBinController.java
浏览文件 @
65b24d59
...
...
@@ -204,14 +204,14 @@ public class ResourceRecycleBinController {
}
@ApiOperation
(
value
=
"批量还原"
,
notes
=
"批量还原"
)
@PostMapping
(
value
=
ResourceRequestPath
.
BATCH_RESTORE
)
public
CallBack
<
Boolean
>
restoreByIds
(
@RequestBody
List
<
Integer
>
ids
)
{
public
CallBack
<
Boolean
>
restoreByIds
(
@RequestBody
List
<
String
>
ids
)
{
return
CallBack
.
success
(
service
.
batchRestore
(
ids
));
}
@ApiOperation
(
value
=
"查询"
,
notes
=
"根据ID查询"
)
@GetMapping
(
value
=
ResourceRequestPath
.
GET_OID
)
public
CallBack
<
ResourceRecycleBinOneVO
>
getById
(
@PathVariable
Integer
oid
)
{
public
CallBack
<
ResourceRecycleBinOneVO
>
getById
(
@PathVariable
String
oid
)
{
Criteria
cr
=
service
.
createCriteria
();
cr
.
andEqualTo
(
"id"
,
oid
);
ResourceRecycleBin
entity
=
service
.
selectOneByCriteria
();
...
...
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/controller/videolibrary/VideoLibraryController.java
浏览文件 @
65b24d59
...
...
@@ -240,4 +240,9 @@ public class VideoLibraryController {
});
return
CallBack
.
success
(
resourceService
.
insertUuidList
(
recordList
));
}
@ApiOperation
(
value
=
"批量删除关联资源"
,
notes
=
"批量删除"
)
@PostMapping
(
value
=
ResourceRequestPath
.
BATCH_RELATION_DELETE
)
public
CallBack
<
Boolean
>
deleteByResourceIds
(
@RequestBody
List
<
String
>
ids
)
{
return
CallBack
.
success
(
resourceService
.
batchDeleteResource
(
ids
));
}
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/mapper/videolibrary/VideoResourceMapper.java
浏览文件 @
65b24d59
...
...
@@ -14,7 +14,7 @@ public interface VideoResourceMapper extends BaseMapper<VideoResource> {
+
"select id ,objectId,name,resourceId,resourceType,createTime from res_video_resource "
+
"where objectId = #{id} "
+
"<if test='resourceType != null'> and resourceType = #{resourceType}</if>"
+
"<if test='name != null'> and name like concat
#{name}
</if>"
+
"<if test='name != null'> and name like concat
('%',#{name},'%')
</if>"
+
"</script>"
)
List
<
ResourceRelationVo
>
queryByIdAndResourceType
(
QueryResourceRelationForm
entity
);
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/animationlibrary/AnimationLibrarySerivceImpl.java
浏览文件 @
65b24d59
...
...
@@ -24,6 +24,8 @@ import com.zrqx.core.model.resource.animationlibrary.AnimationGoods;
import
com.zrqx.core.model.resource.animationlibrary.AnimationLibrary
;
import
com.zrqx.core.model.resource.animationlibrary.AnimationLibraryDiyType
;
import
com.zrqx.core.model.resource.animationlibrary.AnimationLibraryLableDiyType
;
import
com.zrqx.core.model.resource.animationlibrary.AnimationResource
;
import
com.zrqx.core.model.resource.pdffilelibrary.PdfResource
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.core.util.PageInfo
;
import
com.zrqx.core.util.PageParam
;
...
...
@@ -33,6 +35,7 @@ import com.zrqx.resource.bg.mapper.animationlibrary.AnimationGoodsMapper;
import
com.zrqx.resource.bg.mapper.animationlibrary.AnimationLibraryDiyTypeMapper
;
import
com.zrqx.resource.bg.mapper.animationlibrary.AnimationLibraryLableMapper
;
import
com.zrqx.resource.bg.mapper.animationlibrary.AnimationLibraryMapper
;
import
com.zrqx.resource.bg.mapper.animationlibrary.AnimationResourceMapper
;
import
com.zrqx.resource.bg.service.recycleBin.ResourceRecycleBinService
;
/**
...
...
@@ -53,6 +56,8 @@ public class AnimationLibrarySerivceImpl extends BaseServiceImpl<AnimationLibrar
private
AnimationLibraryLableMapper
lableMapper
;
@Autowired
private
ResourceRecycleBinService
binService
;
@Autowired
private
AnimationResourceMapper
animationResourceMapper
;
@Override
public
BaseMapper
<
AnimationLibrary
>
getMapper
()
{
...
...
@@ -273,4 +278,5 @@ public class AnimationLibrarySerivceImpl extends BaseServiceImpl<AnimationLibrar
List
<
AnimationLibraryListVO
>
list
=
mapper
.
queryByTileAndDiyType
(
form
);
return
new
PageInfo
<
AnimationLibraryListVO
>(
list
);
}
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/animationlibrary/AnimationLibraryService.java
浏览文件 @
65b24d59
...
...
@@ -67,4 +67,5 @@ public interface AnimationLibraryService extends BaseService<AnimationLibrary,In
*/
boolean
Update
(
UpdateAnimationLibraryForm
form
);
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/animationlibrary/AnimationResourceService.java
浏览文件 @
65b24d59
...
...
@@ -18,4 +18,12 @@ public interface AnimationResourceService extends BaseService<AnimationResource,
* @date: 2018年7月24日 上午9:09:34
*/
List
<
ResourceRelationVo
>
queryByIdAndResourceType
(
QueryResourceRelationForm
entity
,
PageParam
pageParam
);
/**
* 批量删除相关资源
* @param ids
* @return
* @author rjc
* @date: 2019年2月15日 下午4:57:06
*/
boolean
batchDeleteResource
(
List
<
String
>
ids
);
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/animationlibrary/AnimationResourceServiceImpl.java
浏览文件 @
65b24d59
...
...
@@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
com.github.pagehelper.PageHelper
;
import
com.zrqx.core.exception.BaseException
;
import
com.zrqx.core.form.resource.bg.QueryResourceRelationForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.resource.animationlibrary.AnimationResource
;
...
...
@@ -38,4 +39,16 @@ public class AnimationResourceServiceImpl extends BaseServiceImpl<AnimationResou
// TODO Auto-generated method stub
return
animationResourceMapper
.
queryByIdAndResourceType
(
entity
);
}
@Override
public
boolean
batchDeleteResource
(
List
<
String
>
ids
)
{
if
(
ids
.
size
()
==
0
)
{
throw
new
BaseException
(
"没有选中任何数据,请重新选择"
);
}
createCriteria
().
andIn
(
"id"
,
ids
);
List
<
AnimationResource
>
list
=
animationResourceMapper
.
selectByExample
(
example
);
for
(
AnimationResource
entity
:
list
)
{
animationResourceMapper
.
deleteByPrimaryKey
(
entity
);
}
return
true
;
}
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/articlelibrary/ArticleResourceService.java
浏览文件 @
65b24d59
...
...
@@ -18,4 +18,6 @@ public interface ArticleResourceService extends BaseService<ArticleResource, Int
* @date: 2018年7月24日 上午9:09:34
*/
List
<
ResourceRelationVo
>
queryByIdAndResourceType
(
QueryResourceRelationForm
entity
,
PageParam
pageParam
);
boolean
batchDeleteResource
(
List
<
String
>
ids
);
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/articlelibrary/ArticleResourceServiceImpl.java
浏览文件 @
65b24d59
...
...
@@ -6,8 +6,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
com.github.pagehelper.PageHelper
;
import
com.zrqx.core.exception.BaseException
;
import
com.zrqx.core.form.resource.bg.QueryResourceRelationForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.resource.animationlibrary.AnimationResource
;
import
com.zrqx.core.model.resource.articlelibrary.ArticleResource
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.core.util.PageParam
;
...
...
@@ -40,4 +42,17 @@ public class ArticleResourceServiceImpl extends BaseServiceImpl<ArticleResource,
return
articleResourceMapper
.
queryByIdAndResourceType
(
entity
);
}
@Override
public
boolean
batchDeleteResource
(
List
<
String
>
ids
)
{
if
(
ids
.
size
()
==
0
)
{
throw
new
BaseException
(
"没有选中任何数据,请重新选择"
);
}
createCriteria
().
andIn
(
"id"
,
ids
);
List
<
ArticleResource
>
list
=
articleResourceMapper
.
selectByExample
(
example
);
for
(
ArticleResource
entity
:
list
)
{
articleResourceMapper
.
deleteByPrimaryKey
(
entity
);
}
return
true
;
}
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/audiolibrary/AudioLibrarySerivceImpl.java
浏览文件 @
65b24d59
...
...
@@ -24,6 +24,7 @@ import com.zrqx.core.model.resource.audiolibrary.AudioGoods;
import
com.zrqx.core.model.resource.audiolibrary.AudioLibrary
;
import
com.zrqx.core.model.resource.audiolibrary.AudioLibraryDiyType
;
import
com.zrqx.core.model.resource.audiolibrary.AudioLibraryLableDiyType
;
import
com.zrqx.core.model.resource.audiolibrary.AudioResource
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.core.util.PageInfo
;
import
com.zrqx.core.util.PageParam
;
...
...
@@ -33,6 +34,7 @@ import com.zrqx.resource.bg.mapper.audiolibrary.AudioGoodsMapper;
import
com.zrqx.resource.bg.mapper.audiolibrary.AudioLibraryDiyTypeMapper
;
import
com.zrqx.resource.bg.mapper.audiolibrary.AudioLibraryLableMapper
;
import
com.zrqx.resource.bg.mapper.audiolibrary.AudioLibraryMapper
;
import
com.zrqx.resource.bg.mapper.audiolibrary.AudioResourceMapper
;
import
com.zrqx.resource.bg.service.recycleBin.ResourceRecycleBinService
;
/**
...
...
@@ -53,6 +55,8 @@ public class AudioLibrarySerivceImpl extends BaseServiceImpl<AudioLibrary,Intege
private
AudioLibraryLableMapper
audioLibraryLableMapper
;
@Autowired
private
ResourceRecycleBinService
binService
;
@Autowired
private
AudioResourceMapper
audioResourceMapper
;
@Override
public
BaseMapper
<
AudioLibrary
>
getMapper
()
{
...
...
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/audiolibrary/AudioLibraryService.java
浏览文件 @
65b24d59
...
...
@@ -40,6 +40,7 @@ public interface AudioLibraryService extends BaseService<AudioLibrary,Integer>{
* @date: 2018年11月22日 下午2:39:23
*/
boolean
batchDelete
(
List
<
String
>
ids
);
/**
* 后台分页查询
* @param form
...
...
@@ -66,5 +67,4 @@ public interface AudioLibraryService extends BaseService<AudioLibrary,Integer>{
* @date: 2019年1月4日 下午3:22:14
*/
public
boolean
Update
(
UpdateAudioLibraryForm
form
);
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/audiolibrary/AudioResourceService.java
浏览文件 @
65b24d59
...
...
@@ -18,4 +18,12 @@ public interface AudioResourceService extends BaseService<AudioResource, Integer
* @date: 2018年7月24日 上午9:09:34
*/
List
<
ResourceRelationVo
>
queryByIdAndResourceType
(
QueryResourceRelationForm
entity
,
PageParam
pageParam
);
/**
* 批量删除相关资源
* @param ids
* @return
* @author rjc
* @date: 2019年2月15日 下午4:07:51
*/
boolean
batchDeleteResource
(
List
<
String
>
ids
);
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/audiolibrary/AudioResourceServiceImpl.java
浏览文件 @
65b24d59
...
...
@@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
com.github.pagehelper.PageHelper
;
import
com.zrqx.core.exception.BaseException
;
import
com.zrqx.core.form.resource.bg.QueryResourceRelationForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.resource.audiolibrary.AudioResource
;
...
...
@@ -38,5 +39,16 @@ public class AudioResourceServiceImpl extends BaseServiceImpl<AudioResource, Int
// TODO Auto-generated method stub
return
audioResourceapper
.
queryByIdAndResourceType
(
entity
);
}
@Override
public
boolean
batchDeleteResource
(
List
<
String
>
ids
)
{
if
(
ids
.
size
()
==
0
)
{
throw
new
BaseException
(
"没有选中任何数据,请重新选择"
);
}
createCriteria
().
andIn
(
"id"
,
ids
);
List
<
AudioResource
>
list
=
audioResourceapper
.
selectByExample
(
example
);
for
(
AudioResource
entity
:
list
)
{
audioResourceapper
.
deleteByPrimaryKey
(
entity
);
}
return
true
;
}
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/coursewarelibrary/CoursewareResourceService.java
浏览文件 @
65b24d59
...
...
@@ -18,4 +18,12 @@ public interface CoursewareResourceService extends BaseService<CoursewareResourc
* @date: 2018年7月24日 上午9:09:34
*/
List
<
ResourceRelationVo
>
queryByIdAndResourceType
(
QueryResourceRelationForm
entity
,
PageParam
pageParam
);
/**
* 批量删除相关资源
* @param ids
* @return
* @author rjc
* @date: 2019年2月15日 下午5:20:48
*/
boolean
batchDeleteResource
(
List
<
String
>
ids
);
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/coursewarelibrary/CoursewareResourceServiceImpl.java
浏览文件 @
65b24d59
...
...
@@ -6,8 +6,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
com.github.pagehelper.PageHelper
;
import
com.zrqx.core.exception.BaseException
;
import
com.zrqx.core.form.resource.bg.QueryResourceRelationForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.resource.audiolibrary.AudioResource
;
import
com.zrqx.core.model.resource.coursewarelibrary.CoursewareResource
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.core.util.PageParam
;
...
...
@@ -39,4 +41,6 @@ public class CoursewareResourceServiceImpl extends BaseServiceImpl<CoursewareRes
// TODO Auto-generated method stub
return
coursewareResourceMapper
.
queryByIdAndResourceType
(
entity
);
}
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/ebook/BookResourceService.java
浏览文件 @
65b24d59
...
...
@@ -18,5 +18,12 @@ public interface BookResourceService extends BaseService<BookResource, Integer>
* @date: 2018年7月24日 上午9:09:34
*/
List
<
ResourceRelationVo
>
queryByIdAndResourceType
(
QueryResourceRelationForm
entity
,
PageParam
pageParam
);
/**
* 批量删除相关资源
* @param ids
* @return
* @author rjc
* @date: 2019年2月15日 下午5:20:48
*/
boolean
batchDeleteResource
(
List
<
String
>
ids
);
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/ebook/BookResourceServiceImpl.java
浏览文件 @
65b24d59
...
...
@@ -6,9 +6,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
com.github.pagehelper.PageHelper
;
import
com.zrqx.core.exception.BaseException
;
import
com.zrqx.core.form.resource.bg.QueryResourceRelationForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.resource.articlelibrary.ArticleResource
;
import
com.zrqx.core.model.resource.coursewarelibrary.CoursewareResource
;
import
com.zrqx.core.model.resource.ebook.BookResource
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.core.util.PageParam
;
...
...
@@ -41,5 +43,16 @@ public class BookResourceServiceImpl extends BaseServiceImpl<BookResource, Integ
// TODO Auto-generated method stub
return
bookResourceMapper
.
queryByIdAndResourceType
(
entity
);
}
@Override
public
boolean
batchDeleteResource
(
List
<
String
>
ids
)
{
if
(
ids
.
size
()
==
0
)
{
throw
new
BaseException
(
"没有选中任何数据,请重新选择"
);
}
createCriteria
().
andIn
(
"id"
,
ids
);
List
<
BookResource
>
list
=
bookResourceMapper
.
selectByExample
(
example
);
for
(
BookResource
entity
:
list
)
{
bookResourceMapper
.
deleteByPrimaryKey
(
entity
);
}
return
true
;
}
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/imagelibrary/ImageResourceService.java
浏览文件 @
65b24d59
...
...
@@ -19,5 +19,12 @@ public interface ImageResourceService extends BaseService<ImageResource, Integer
* @date: 2018年7月24日 上午9:09:34
*/
List
<
ResourceRelationVo
>
queryByIdAndResourceType
(
QueryResourceRelationForm
entity
,
PageParam
pageParam
);
/**
* 批量删除相关资源
* @param ids
* @return
* @author rjc
* @date: 2019年2月15日 下午5:20:48
*/
boolean
batchDeleteResource
(
List
<
String
>
ids
);
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/imagelibrary/ImageResourceServiceImpl.java
浏览文件 @
65b24d59
...
...
@@ -6,8 +6,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
com.github.pagehelper.PageHelper
;
import
com.zrqx.core.exception.BaseException
;
import
com.zrqx.core.form.resource.bg.QueryResourceRelationForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.resource.ebook.BookResource
;
import
com.zrqx.core.model.resource.imagelibrary.ImageResource
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.core.util.PageParam
;
...
...
@@ -38,4 +40,16 @@ public class ImageResourceServiceImpl extends BaseServiceImpl<ImageResource, Int
// TODO Auto-generated method stub
return
imageResourceMapper
.
queryByIdAndResourceType
(
entity
);
}
@Override
public
boolean
batchDeleteResource
(
List
<
String
>
ids
)
{
if
(
ids
.
size
()
==
0
)
{
throw
new
BaseException
(
"没有选中任何数据,请重新选择"
);
}
createCriteria
().
andIn
(
"id"
,
ids
);
List
<
ImageResource
>
list
=
imageResourceMapper
.
selectByExample
(
example
);
for
(
ImageResource
entity
:
list
)
{
imageResourceMapper
.
deleteByPrimaryKey
(
entity
);
}
return
true
;
}
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/pdffilelibrary/PdfLibrarySerivceImpl.java
浏览文件 @
65b24d59
...
...
@@ -24,6 +24,8 @@ import com.zrqx.core.model.resource.pdffilelibrary.PdfGoods;
import
com.zrqx.core.model.resource.pdffilelibrary.PdfLibrary
;
import
com.zrqx.core.model.resource.pdffilelibrary.PdfLibraryDiyType
;
import
com.zrqx.core.model.resource.pdffilelibrary.PdfLibraryLableDiyType
;
import
com.zrqx.core.model.resource.pdffilelibrary.PdfResource
;
import
com.zrqx.core.model.resource.periodical.PeriodVolumeResource
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.core.util.PageInfo
;
import
com.zrqx.core.util.PageParam
;
...
...
@@ -33,6 +35,7 @@ import com.zrqx.resource.bg.mapper.pdffilelibrary.PdfGoodsMapper;
import
com.zrqx.resource.bg.mapper.pdffilelibrary.PdfLibraryDiyTypeMapper
;
import
com.zrqx.resource.bg.mapper.pdffilelibrary.PdfLibraryLableMapper
;
import
com.zrqx.resource.bg.mapper.pdffilelibrary.PdfLibraryMapper
;
import
com.zrqx.resource.bg.mapper.pdffilelibrary.PdfResourceMapper
;
import
com.zrqx.resource.bg.service.recycleBin.ResourceRecycleBinService
;
/**
...
...
@@ -53,6 +56,9 @@ public class PdfLibrarySerivceImpl extends BaseServiceImpl<PdfLibrary,Integer> i
private
PdfLibraryLableMapper
pdfLibraryLableMapper
;
@Autowired
private
ResourceRecycleBinService
binService
;
@Autowired
private
PdfResourceMapper
pdfResourceMapper
;
@Override
public
BaseMapper
<
PdfLibrary
>
getMapper
()
{
...
...
@@ -267,6 +273,4 @@ public class PdfLibrarySerivceImpl extends BaseServiceImpl<PdfLibrary,Integer> i
List
<
PdfLibraryListVO
>
list
=
mapper
.
queryByTileAndDiyType
(
form
);
return
new
PageInfo
<
PdfLibraryListVO
>(
list
);
}
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/pdffilelibrary/PdfResourceService.java
浏览文件 @
65b24d59
...
...
@@ -18,4 +18,12 @@ public interface PdfResourceService extends BaseService<PdfResource, Integer> {
* @date: 2018年7月24日 上午9:09:34
*/
List
<
ResourceRelationVo
>
queryByIdAndResourceType
(
QueryResourceRelationForm
entity
,
PageParam
pageParam
);
/**
* 批量删除相关资源
* @param ids
* @return
* @author rjc
* @date: 2019年2月15日 下午4:22:22
*/
boolean
batchDeleteResource
(
List
<
String
>
ids
);
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/pdffilelibrary/PdfResourceServiceImpl.java
浏览文件 @
65b24d59
...
...
@@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
com.github.pagehelper.PageHelper
;
import
com.zrqx.core.exception.BaseException
;
import
com.zrqx.core.form.resource.bg.QueryResourceRelationForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.resource.pdffilelibrary.PdfResource
;
...
...
@@ -38,4 +39,16 @@ public class PdfResourceServiceImpl extends BaseServiceImpl<PdfResource, Integer
// TODO Auto-generated method stub
return
pdfResourceMapper
.
queryByIdAndResourceType
(
entity
);
}
@Override
public
boolean
batchDeleteResource
(
List
<
String
>
ids
)
{
if
(
ids
.
size
()
==
0
)
{
throw
new
BaseException
(
"没有选中任何数据,请重新选择"
);
}
createCriteria
().
andIn
(
"id"
,
ids
);
List
<
PdfResource
>
list
=
pdfResourceMapper
.
selectByExample
(
example
);
for
(
PdfResource
entity
:
list
)
{
pdfResourceMapper
.
deleteByPrimaryKey
(
entity
);
}
return
true
;
}
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/periodical/PeriodVolumeResourceService.java
浏览文件 @
65b24d59
...
...
@@ -18,4 +18,12 @@ public interface PeriodVolumeResourceService extends BaseService<PeriodVolumeRes
* @date: 2018年7月24日 上午9:09:34
*/
List
<
ResourceRelationVo
>
queryByIdAndResourceType
(
QueryResourceRelationForm
entity
,
PageParam
pageParam
);
/**
* 批量删除相关资源
* @param ids
* @return
* @author rjc
* @date: 2019年2月15日 下午4:07:51
*/
boolean
batchDeleteResource
(
List
<
String
>
ids
);
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/periodical/PeriodVolumeResourceServiceImpl.java
浏览文件 @
65b24d59
...
...
@@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
com.github.pagehelper.PageHelper
;
import
com.zrqx.core.exception.BaseException
;
import
com.zrqx.core.form.resource.bg.QueryResourceRelationForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.resource.periodical.PeriodVolumeResource
;
...
...
@@ -38,4 +39,16 @@ public class PeriodVolumeResourceServiceImpl extends BaseServiceImpl<PeriodVolum
// TODO Auto-generated method stub
return
resourceMapper
.
queryByIdAndResourceType
(
entity
);
}
@Override
public
boolean
batchDeleteResource
(
List
<
String
>
ids
)
{
if
(
ids
.
size
()
==
0
)
{
throw
new
BaseException
(
"没有选中任何数据,请重新选择"
);
}
createCriteria
().
andIn
(
"id"
,
ids
);
List
<
PeriodVolumeResource
>
list
=
resourceMapper
.
selectByExample
(
example
);
for
(
PeriodVolumeResource
entity
:
list
)
{
resourceMapper
.
deleteByPrimaryKey
(
entity
);
}
return
true
;
}
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/periodical/PeriodVolumeService.java
浏览文件 @
65b24d59
...
...
@@ -42,5 +42,7 @@ public interface PeriodVolumeService extends BaseService<PeriodVolume, Integer>
*/
PageInfo
<
PeriodVolumeListVO
>
pageByTitleAndDiyType
(
QueryResourceForPoPForm
form
,
PageParam
pageParam
);
boolean
batchDelete
(
List
<
String
>
ids
);
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/periodical/PeriodVolumeServiceImpl.java
浏览文件 @
65b24d59
...
...
@@ -14,15 +14,21 @@ import com.zrqx.core.form.resource.bg.periodical.QueryPeriodVolumeForm;
import
com.zrqx.core.form.resource.bg.periodical.SaveUpdatePeriodVolumeForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.resource.periodical.PeriodVolume
;
import
com.zrqx.core.model.resource.periodical.PeriodVolumeResource
;
import
com.zrqx.core.model.resource.videolibrary.VideoResource
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.core.util.PageInfo
;
import
com.zrqx.core.util.PageParam
;
import
com.zrqx.core.vo.resource.periodicel.PeriodVolumeListVO
;
import
com.zrqx.resource.bg.mapper.periodical.PeriodVolumeMapper
;
import
com.zrqx.resource.bg.mapper.periodical.PeriodVolumeResourceMapper
;
@Service
public
class
PeriodVolumeServiceImpl
extends
BaseServiceImpl
<
PeriodVolume
,
Integer
>
implements
PeriodVolumeService
{
@Autowired
private
PeriodVolumeMapper
periodVolumeMapper
;
@Autowired
private
PeriodVolumeResourceMapper
periodVolumeResourceMapper
;
@Override
public
BaseMapper
<
PeriodVolume
>
getMapper
()
{
...
...
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/recycleBin/ResourceRecycleBinSerivceImpl.java
浏览文件 @
65b24d59
...
...
@@ -590,7 +590,7 @@ public class ResourceRecycleBinSerivceImpl extends BaseServiceImpl<ResourceRecyc
return
new
PageInfo
<
ResourceRecycleBinListVO
>(
list
);
}
@Override
public
boolean
batchRestore
(
List
<
Integer
>
ids
)
{
public
boolean
batchRestore
(
List
<
String
>
ids
)
{
if
(
ids
.
size
()
==
0
)
{
throw
new
BaseException
(
"没有选中任何数据,请重新选择"
);
}
...
...
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/recycleBin/ResourceRecycleBinService.java
浏览文件 @
65b24d59
...
...
@@ -44,7 +44,7 @@ public interface ResourceRecycleBinService extends BaseService<ResourceRecycleBi
* @date: 2019年1月16日 下午2:50:21
*/
public
boolean
batchDeleteAll
();
public
boolean
batchRestore
(
List
<
Integer
>
ids
);
public
boolean
batchRestore
(
List
<
String
>
ids
);
public
boolean
deleteResource
(
ResourceRecycleBin
bin
,
String
type
);
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/videolibrary/VideoLibrarySerivceImpl.java
浏览文件 @
65b24d59
...
...
@@ -21,10 +21,12 @@ import com.zrqx.core.form.resource.bg.videolibrary.SaveUpdateVideoLibraryForm;
import
com.zrqx.core.form.resource.bg.videolibrary.SaveVideoLibraryForm
;
import
com.zrqx.core.form.resource.bg.videolibrary.UpdateVideoLibraryForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.resource.audiolibrary.AudioResource
;
import
com.zrqx.core.model.resource.videolibrary.VideoGoods
;
import
com.zrqx.core.model.resource.videolibrary.VideoLibrary
;
import
com.zrqx.core.model.resource.videolibrary.VideoLibraryDiyType
;
import
com.zrqx.core.model.resource.videolibrary.VideoLibraryLableDiyType
;
import
com.zrqx.core.model.resource.videolibrary.VideoResource
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.core.util.PageInfo
;
import
com.zrqx.core.util.PageParam
;
...
...
@@ -34,6 +36,7 @@ import com.zrqx.resource.bg.mapper.videolibrary.VideoGoodsMapper;
import
com.zrqx.resource.bg.mapper.videolibrary.VideoLibraryDiyTypeMapper
;
import
com.zrqx.resource.bg.mapper.videolibrary.VideoLibraryLableMapper
;
import
com.zrqx.resource.bg.mapper.videolibrary.VideoLibraryMapper
;
import
com.zrqx.resource.bg.mapper.videolibrary.VideoResourceMapper
;
import
com.zrqx.resource.bg.service.recycleBin.ResourceRecycleBinService
;
/**
...
...
@@ -54,6 +57,8 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,Intege
private
ResourceRecycleBinService
binService
;
@Autowired
private
VideoGoodsService
videoGoodsService
;
@Autowired
private
VideoResourceMapper
videoResourceMapper
;
@Override
public
BaseMapper
<
VideoLibrary
>
getMapper
()
{
...
...
@@ -240,6 +245,7 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,Intege
}
return
true
;
}
/**
* 后台分页查询
* @param form
...
...
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/videolibrary/VideoLibraryService.java
浏览文件 @
65b24d59
...
...
@@ -66,5 +66,6 @@ public interface VideoLibraryService extends BaseService<VideoLibrary,Integer>{
* @date: 2019年1月3日 下午2:26:13
*/
boolean
Update
(
UpdateVideoLibraryForm
form
);
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/videolibrary/VideoResourceService.java
浏览文件 @
65b24d59
...
...
@@ -18,4 +18,12 @@ public interface VideoResourceService extends BaseService<VideoResource, Integer
* @date: 2018年7月24日 上午9:09:34
*/
List
<
ResourceRelationVo
>
queryByIdAndResourceType
(
QueryResourceRelationForm
entity
,
PageParam
pageParam
);
/**
* 批量删除相关资源
* @param ids
* @return
* @author rjc
* @date: 2019年2月15日 下午4:16:02
*/
boolean
batchDeleteResource
(
List
<
String
>
ids
);
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/videolibrary/VideoResourceServiceImpl.java
浏览文件 @
65b24d59
...
...
@@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
com.github.pagehelper.PageHelper
;
import
com.zrqx.core.exception.BaseException
;
import
com.zrqx.core.form.resource.bg.QueryResourceRelationForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.resource.videolibrary.VideoResource
;
...
...
@@ -38,4 +39,23 @@ public class VideoResourceServiceImpl extends BaseServiceImpl<VideoResource, Int
// TODO Auto-generated method stub
return
videoResourceMapper
.
queryByIdAndResourceType
(
entity
);
}
/**
* 批量删除相关资源
* @param ids
* @return
* @author rjc
* @date: 2019年2月15日 下午4:15:00
*/
@Override
public
boolean
batchDeleteResource
(
List
<
String
>
ids
)
{
if
(
ids
.
size
()
==
0
)
{
throw
new
BaseException
(
"没有选中任何数据,请重新选择"
);
}
createCriteria
().
andIn
(
"id"
,
ids
);
List
<
VideoResource
>
list
=
videoResourceMapper
.
selectByExample
(
example
);
for
(
VideoResource
entity
:
list
)
{
videoResourceMapper
.
deleteByPrimaryKey
(
entity
);
}
return
true
;
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论