Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
H
hxkf
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
hxkf
Commits
eb364cf0
提交
eb364cf0
authored
4月 22, 2020
作者:
liupengfei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
553440c9
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
28 个修改的文件
包含
462 行增加
和
511 行删除
+462
-511
CourseLibraryController.java
.../bg/controller/courselibrary/CourseLibraryController.java
+109
-65
VideoLibraryController.java
...ce/bg/controller/videolibrary/VideoLibraryController.java
+32
-91
CourseLibraryMapper.java
...resource/bg/mapper/courselibrary/CourseLibraryMapper.java
+29
-1
VideoLibraryMapper.java
...x/resource/bg/mapper/videolibrary/VideoLibraryMapper.java
+2
-8
CourseLibrarySerivceImpl.java
...ce/bg/service/courselibrary/CourseLibrarySerivceImpl.java
+45
-23
CourseLibraryService.java
...source/bg/service/courselibrary/CourseLibraryService.java
+16
-1
VideoLibrarySerivceImpl.java
...urce/bg/service/videolibrary/VideoLibrarySerivceImpl.java
+34
-44
VideoLibraryService.java
...resource/bg/service/videolibrary/VideoLibraryService.java
+1
-1
BatchUpdateCourseLibraryForm.java
...s/form/bg/courselibrary/BatchUpdateCourseLibraryForm.java
+2
-0
QueryCourseAndVideoForm.java
...ommons/form/bg/courselibrary/QueryCourseAndVideoForm.java
+13
-0
QueryCourseLibraryForm.java
...commons/form/bg/courselibrary/QueryCourseLibraryForm.java
+0
-2
SaveUpdateCourseLibraryForm.java
...ns/form/bg/courselibrary/SaveUpdateCourseLibraryForm.java
+10
-20
BatchUpdateVideoLibraryForm.java
...ons/form/bg/videolibrary/BatchUpdateVideoLibraryForm.java
+7
-2
QueryVideoLibraryForm.java
...e/commons/form/bg/videolibrary/QueryVideoLibraryForm.java
+0
-4
SaveUpdateVideoLibraryForm.java
...mons/form/bg/videolibrary/SaveUpdateVideoLibraryForm.java
+25
-27
SaveVideoLibraryForm.java
...ce/commons/form/bg/videolibrary/SaveVideoLibraryForm.java
+7
-31
CourseLibrary.java
...x/resource/commons/model/courcelibrary/CourseLibrary.java
+12
-16
VideoLibrary.java
...rqx/resource/commons/model/videolibrary/VideoLibrary.java
+34
-42
CourseLibraryListVO.java
...urce/commons/vo/bg/courselibrary/CourseLibraryListVO.java
+6
-24
CourseLibraryVO.java
...resource/commons/vo/bg/courselibrary/CourseLibraryVO.java
+22
-30
VideoLibraryListVO.java
...source/commons/vo/bg/videolibrary/VideoLibraryListVO.java
+13
-13
VideoLibraryOneVO.java
...esource/commons/vo/bg/videolibrary/VideoLibraryOneVO.java
+28
-29
FgResourceLibraryController.java
...ntroller/resourcelibrary/FgResourceLibraryController.java
+6
-6
FgVideoLibraryController.java
.../fg/controller/videolibrary/FgVideoLibraryController.java
+0
-20
FgResourceManageImpl.java
...ource/fg/manage/resourcelibrary/FgResourceManageImpl.java
+1
-1
FgResourceRelationServiceImpl.java
...qx/resource/fg/service/FgResourceRelationServiceImpl.java
+2
-2
FgCourseLibrarySerivceImpl.java
.../fg/service/courselibrary/FgCourseLibrarySerivceImpl.java
+4
-4
FgRecordServiceImpl.java
.../zrqx/resource/fg/service/record/FgRecordServiceImpl.java
+2
-4
没有找到文件。
app/resource/src/main/java/com/zrqx/resource/bg/controller/courselibrary/CourseLibraryController.java
浏览文件 @
eb364cf0
差异被折叠。
点击展开。
app/resource/src/main/java/com/zrqx/resource/bg/controller/videolibrary/VideoLibraryController.java
浏览文件 @
eb364cf0
package
com
.
zrqx
.
resource
.
bg
.
controller
.
videolibrary
;
package
com
.
zrqx
.
resource
.
bg
.
controller
.
videolibrary
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
...
@@ -17,26 +17,21 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -17,26 +17,21 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.zrqx.core.enums.resource.LibraryStatusEnum
;
import
com.zrqx.core.enums.resource.LibraryStatusEnum
;
import
com.zrqx.core.enums.resource.PriceOptionEnum
;
import
com.zrqx.core.exception.BaseException
;
import
com.zrqx.core.exception.BaseException
;
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
;
import
com.zrqx.resource.bg.service.ResourceRelationService
;
import
com.zrqx.resource.bg.service.marketing.PromotionContentService
;
import
com.zrqx.resource.bg.service.recommend.RecommendResourceService
;
import
com.zrqx.resource.bg.service.recommend.RecommendResourceService
;
import
com.zrqx.resource.bg.service.videolibrary.VideoLibraryDiyTypeService
;
import
com.zrqx.resource.bg.service.videolibrary.VideoLibraryDiyTypeService
;
import
com.zrqx.resource.bg.service.videolibrary.VideoLibraryLabelContentDiyTypeService
;
import
com.zrqx.resource.bg.service.videolibrary.VideoLibraryService
;
import
com.zrqx.resource.bg.service.videolibrary.VideoLibraryService
;
import
com.zrqx.resource.commons.form.bg.QueryResourceForPoPForm
;
import
com.zrqx.resource.commons.form.bg.recommend.UpdateRecommendResourceForm
;
import
com.zrqx.resource.commons.form.bg.recommend.UpdateRecommendResourceForm
;
import
com.zrqx.resource.commons.form.bg.videolibrary.BatchUpdateVideoLibraryForm
;
import
com.zrqx.resource.commons.form.bg.videolibrary.BatchUpdateVideoLibraryForm
;
import
com.zrqx.resource.commons.form.bg.videolibrary.QueryVideoLibraryForm
;
import
com.zrqx.resource.commons.form.bg.videolibrary.QueryVideoLibraryForm
;
import
com.zrqx.resource.commons.form.bg.videolibrary.SaveUpdateVideoLibraryForm
;
import
com.zrqx.resource.commons.form.bg.videolibrary.SaveUpdateVideoLibraryForm
;
import
com.zrqx.resource.commons.form.bg.videolibrary.SaveVideoLibraryForm
;
import
com.zrqx.resource.commons.form.bg.videolibrary.SaveVideoLibraryForm
;
import
com.zrqx.resource.commons.model.marketing.PromotionContent
;
import
com.zrqx.resource.commons.model.videolibrary.VideoLibrary
;
import
com.zrqx.resource.commons.model.videolibrary.VideoLibrary
;
import
com.zrqx.resource.commons.model.videolibrary.VideoLibraryDiyType
;
import
com.zrqx.resource.commons.model.videolibrary.VideoLibraryDiyType
;
import
com.zrqx.resource.commons.model.videolibrary.VideoLibraryLabelContentDiyType
;
import
com.zrqx.resource.commons.vo.bg.videolibrary.VideoLibraryListVO
;
import
com.zrqx.resource.commons.vo.bg.videolibrary.VideoLibraryListVO
;
import
com.zrqx.resource.commons.vo.bg.videolibrary.VideoLibraryOneVO
;
import
com.zrqx.resource.commons.vo.bg.videolibrary.VideoLibraryOneVO
;
...
@@ -56,58 +51,40 @@ public class VideoLibraryController {
...
@@ -56,58 +51,40 @@ public class VideoLibraryController {
private
VideoLibraryService
service
;
private
VideoLibraryService
service
;
@Autowired
@Autowired
private
VideoLibraryDiyTypeService
vdrService
;
private
VideoLibraryDiyTypeService
vdrService
;
@Autowired
private
ResourceRelationService
resourceRelationService
;
/** 推荐位内容*/
/** 推荐位内容*/
@Autowired
@Autowired
private
RecommendResourceService
recommendResourceService
;
private
RecommendResourceService
recommendResourceService
;
/** 促销内容*/
@ApiOperation
(
value
=
"新增/修改 视频资源"
,
notes
=
"新增/修改 视频资源"
)
@Autowired
private
PromotionContentService
promotionContentService
;
@Autowired
private
VideoLibraryLabelContentDiyTypeService
alcdService
;
@ApiOperation
(
value
=
"新增"
,
notes
=
"新增一个"
)
@PostMapping
(
value
=
"/save"
)
@PostMapping
(
value
=
"/save"
)
public
CallBack
<
Boolean
>
save
(
@RequestBody
SaveUpdateVideoLibraryForm
form
){
public
CallBack
<
Boolean
>
save
(
@RequestBody
SaveUpdateVideoLibraryForm
form
){
if
(!
service
.
saveOrUpdate
(
form
)){
if
(!
service
.
saveOrUpdate
(
form
)){
throw
new
BaseException
(
"操作失败"
);
throw
new
BaseException
(
"操作失败"
);
}
}
if
(
StringUtils
.
isNotBlank
(
form
.
getId
()))
{
VideoLibrary
entity
=
service
.
selectByPrimaryKey
(
form
.
getId
());
//推荐位内容修改
UpdateRecommendResourceForm
res
=
new
UpdateRecommendResourceForm
();
res
.
setResId
(
form
.
getId
());
res
.
setResType
(
entity
.
getResourceType
());
res
.
setResImg
(
form
.
getImg
());
res
.
setResName
(
form
.
getName
());
recommendResourceService
.
updateResourceContent
(
res
);
}
return
CallBack
.
success
();
return
CallBack
.
success
();
}
}
@ApiOperation
(
value
=
"导入视频"
,
notes
=
"导入视频"
)
@ApiOperation
(
value
=
"导入视频"
,
notes
=
"导入视频"
)
@PostMapping
(
value
=
"/import"
)
@PostMapping
(
value
=
"/import"
)
public
CallBack
<
Boolean
>
save
(
@RequestBody
SaveVideoLibraryForm
form
){
public
CallBack
<
Boolean
>
save
(
@RequestBody
List
<
SaveVideoLibraryForm
>
form
){
if
(!
service
.
batchInsert
(
form
)){
if
(!
service
.
batchInsert
(
form
)){
throw
new
BaseException
(
"操作失败"
);
throw
new
BaseException
(
"操作失败"
);
}
}
return
CallBack
.
success
();
return
CallBack
.
success
();
}
}
@ApiOperation
(
value
=
"更新"
,
notes
=
"根据ID更新"
)
@PostMapping
(
value
=
"/update"
)
public
CallBack
<
Boolean
>
update
(
@RequestBody
SaveUpdateVideoLibraryForm
form
){
if
(!
service
.
saveOrUpdate
(
form
)){
throw
new
BaseException
(
"操作失败"
);
}
VideoLibrary
entity
=
service
.
selectByPrimaryKey
(
form
.
getId
());
//促销活动内容修改
PromotionContent
con
=
new
PromotionContent
();
con
.
setResourceId
(
form
.
getId
());
con
.
setResourceType
(
entity
.
getResourceType
());
con
.
setName
(
form
.
getName
());
promotionContentService
.
updateContent
(
con
);
//推荐位内容修改
UpdateRecommendResourceForm
res
=
new
UpdateRecommendResourceForm
();
res
.
setResId
(
form
.
getId
());
res
.
setResType
(
entity
.
getResourceType
());
res
.
setResImg
(
form
.
getCover
());
res
.
setResName
(
form
.
getName
());
recommendResourceService
.
updateResourceContent
(
res
);
return
CallBack
.
success
();
}
@ApiOperation
(
value
=
"批量修改分类"
,
notes
=
"批量修改分类"
)
@ApiOperation
(
value
=
"批量修改分类"
,
notes
=
"批量修改分类"
)
@PostMapping
(
value
=
"/batch/update/diytype"
)
@PostMapping
(
value
=
"/batch/update/diytype"
)
...
@@ -129,13 +106,19 @@ public class VideoLibraryController {
...
@@ -129,13 +106,19 @@ public class VideoLibraryController {
return
CallBack
.
success
();
return
CallBack
.
success
();
}
}
@ApiOperation
(
value
=
"批量修改
价格"
,
notes
=
"批量修改价格
"
)
@ApiOperation
(
value
=
"批量修改
销售设置"
,
notes
=
"批量修改销售设置
"
)
@PostMapping
(
value
=
"/batch/update/price"
)
@PostMapping
(
value
=
"/batch/update/price"
)
public
CallBack
<
Boolean
>
updatePrice
(
@RequestBody
BatchUpdateVideoLibraryForm
form
){
public
CallBack
<
Boolean
>
updatePrice
(
@RequestBody
BatchUpdateVideoLibraryForm
form
){
Example
example
=
service
.
createExample
();
Example
example
=
service
.
createExample
();
example
.
createCriteria
().
andIn
(
"id"
,
form
.
getIds
());
example
.
createCriteria
().
andIn
(
"id"
,
form
.
getIds
());
VideoLibrary
entity
=
new
VideoLibrary
();
VideoLibrary
entity
=
new
VideoLibrary
();
if
(
PriceOptionEnum
.
STATUS_0
.
getCode
().
equals
(
form
.
getPriceOption
()))
{
form
.
setRealPrice
(
new
BigDecimal
(
0
));
}
entity
.
setRealPrice
(
form
.
getRealPrice
());
entity
.
setRealPrice
(
form
.
getRealPrice
());
entity
.
setPrice
(
form
.
getPrice
());
entity
.
setPriceOption
(
form
.
getPriceOption
());
entity
.
setSalesType
(
form
.
getSaleType
());
entity
.
setUpdateTime
(
new
Date
());
entity
.
setUpdateTime
(
new
Date
());
if
(!
service
.
UpdateByExampleSelective
(
entity
,
example
)){
if
(!
service
.
UpdateByExampleSelective
(
entity
,
example
)){
throw
new
BaseException
(
"操作失败"
);
throw
new
BaseException
(
"操作失败"
);
...
@@ -143,37 +126,20 @@ public class VideoLibraryController {
...
@@ -143,37 +126,20 @@ public class VideoLibraryController {
return
CallBack
.
success
();
return
CallBack
.
success
();
}
}
@ApiOperation
(
value
=
"批量审核"
,
notes
=
"批量审核"
)
@PostMapping
(
value
=
"/batch/update/status"
)
public
CallBack
<
Boolean
>
updateArray
(
@RequestBody
List
<
String
>
ids
)
{
Example
example
=
service
.
createExample
();
example
.
createCriteria
().
andIn
(
"id"
,
ids
);
VideoLibrary
entity
=
new
VideoLibrary
();
entity
.
setUpdateTime
(
new
Date
());
entity
.
setStatus
(
LibraryStatusEnum
.
STATUS_1
.
getCode
());
if
(!
service
.
UpdateByExampleSelective
(
entity
,
example
))
{
throw
new
BaseException
(
"操作失败"
);
}
return
CallBack
.
success
();
}
@ApiOperation
(
value
=
"批量 上架/下架"
,
notes
=
"批量 上架/下架"
)
@ApiOperation
(
value
=
"批量 上架/下架"
,
notes
=
"批量 上架/下架"
)
@PostMapping
(
value
=
"/batch/update/updown"
)
@PostMapping
(
value
=
"/batch/update/updown"
)
public
CallBack
<
Boolean
>
updateShowState
(
@RequestBody
BatchUpdateVideoLibraryForm
form
){
public
CallBack
<
Boolean
>
updateShowState
(
@RequestBody
BatchUpdateVideoLibraryForm
form
){
Example
example
=
service
.
createExample
();
Example
example
=
service
.
createExample
();
example
.
createCriteria
().
andIn
(
"id"
,
form
.
getIds
());
example
.
createCriteria
().
andIn
(
"id"
,
form
.
getIds
());
List
<
VideoLibrary
>
list
=
service
.
selectByExample
(
example
);
List
<
VideoLibrary
>
list
=
service
.
selectByExample
(
example
);
for
(
VideoLibrary
entity
:
list
)
{
list
.
forEach
(
f
->
{
if
(
entity
.
getStatus
()
==
LibraryStatusEnum
.
STATUS_0
.
getCode
()){
f
.
setStatus
(
form
.
getStatus
());
throw
new
BaseException
(
"待审核状态的文章不能直接操作上架状态需通过批量审核操作上架"
);
f
.
setUpdateTime
(
new
Date
());
if
(
LibraryStatusEnum
.
STATUS_2
.
getCode
().
equals
(
form
.
getStatus
()))
{
f
.
setCourseId
(
null
);
}
}
}
service
.
updateByPrimaryKey
(
f
);
VideoLibrary
entity
=
new
VideoLibrary
();
});
entity
.
setStatus
(
form
.
getStatus
());
entity
.
setUpdateTime
(
new
Date
());
if
(!
service
.
UpdateByExampleSelective
(
entity
,
example
)){
throw
new
BaseException
(
"操作失败"
);
}
return
CallBack
.
success
();
return
CallBack
.
success
();
}
}
...
@@ -189,6 +155,7 @@ public class VideoLibraryController {
...
@@ -189,6 +155,7 @@ public class VideoLibraryController {
}
}
return
CallBack
.
success
(
true
);
return
CallBack
.
success
(
true
);
}
}
@ApiOperation
(
value
=
"批量删除"
,
notes
=
"批量删除"
)
@ApiOperation
(
value
=
"批量删除"
,
notes
=
"批量删除"
)
@PostMapping
(
value
=
"/batch/delete"
)
@PostMapping
(
value
=
"/batch/delete"
)
public
CallBack
<
Boolean
>
deleteByIds
(
@RequestBody
List
<
String
>
ids
)
{
public
CallBack
<
Boolean
>
deleteByIds
(
@RequestBody
List
<
String
>
ids
)
{
...
@@ -217,14 +184,6 @@ public class VideoLibraryController {
...
@@ -217,14 +184,6 @@ public class VideoLibraryController {
List
<
VideoLibraryDiyType
>
list
=
vdrService
.
selectByExample
(
example
);
List
<
VideoLibraryDiyType
>
list
=
vdrService
.
selectByExample
(
example
);
//组装自定义分类
//组装自定义分类
vo
.
setDiyType
(
list
);
vo
.
setDiyType
(
list
);
//组装标签分类
example
=
alcdService
.
createExample
();
example
.
createCriteria
().
andEqualTo
(
"videoId"
,
oid
);
List
<
VideoLibraryLabelContentDiyType
>
vlcdList
=
alcdService
.
selectByExample
(
example
);
vo
.
setLabel
(
vlcdList
);
// 选中的LabelContentDiyTypeId
List
<
Integer
>
labelContentDiyTypeIds
=
vlcdList
.
stream
().
map
(
VideoLibraryLabelContentDiyType
::
getLabelContentDiyTypeId
).
collect
(
Collectors
.
toList
());
vo
.
setLabelContentDiyTypeIds
(
labelContentDiyTypeIds
);
return
CallBack
.
success
(
vo
);
return
CallBack
.
success
(
vo
);
}
}
...
@@ -233,23 +192,5 @@ public class VideoLibraryController {
...
@@ -233,23 +192,5 @@ public class VideoLibraryController {
public
CallBack
<
PageInfo
<
VideoLibraryListVO
>>
page
(
QueryVideoLibraryForm
form
,
PageParam
pageParam
){
public
CallBack
<
PageInfo
<
VideoLibraryListVO
>>
page
(
QueryVideoLibraryForm
form
,
PageParam
pageParam
){
return
CallBack
.
success
(
service
.
page
(
form
,
pageParam
));
return
CallBack
.
success
(
service
.
page
(
form
,
pageParam
));
}
}
@ApiOperation
(
value
=
"选择弹窗中的列表"
,
notes
=
"查询选择弹窗中的列表"
)
@GetMapping
(
value
=
"/relation-resource/pop-page"
)
public
CallBack
<
PageInfo
<
VideoLibraryListVO
>>
page
(
QueryResourceForPoPForm
form
,
PageParam
pageParam
){
return
CallBack
.
success
(
service
.
pageByTitleAndDiyType
(
form
,
pageParam
));
}
@ApiOperation
(
value
=
"批量修改阅读权限"
,
notes
=
"批量修改阅读权限"
)
@PostMapping
(
value
=
"/batch/update/read"
)
public
CallBack
<
Boolean
>
updateReadTextPower
(
@RequestBody
BatchUpdateVideoLibraryForm
form
)
{
Example
example
=
service
.
createExample
();
example
.
createCriteria
().
andIn
(
"id"
,
form
.
getIds
());
VideoLibrary
entity
=
new
VideoLibrary
();
entity
.
setReadTextPower
(
form
.
getReadTextPower
());
if
(!
service
.
UpdateByExampleSelective
(
entity
,
example
))
{
throw
new
BaseException
(
"操作失败"
);
}
return
CallBack
.
success
();
}
}
}
app/resource/src/main/java/com/zrqx/resource/bg/mapper/courselibrary/CourseLibraryMapper.java
浏览文件 @
eb364cf0
...
@@ -8,16 +8,18 @@ import org.apache.ibatis.annotations.Select;
...
@@ -8,16 +8,18 @@ import org.apache.ibatis.annotations.Select;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.resource.commons.form.bg.QueryResourceForPoPForm
;
import
com.zrqx.resource.commons.form.bg.QueryResourceForPoPForm
;
import
com.zrqx.resource.commons.form.bg.courselibrary.QueryCourseAndVideoForm
;
import
com.zrqx.resource.commons.form.bg.courselibrary.QueryCourseLibraryForm
;
import
com.zrqx.resource.commons.form.bg.courselibrary.QueryCourseLibraryForm
;
import
com.zrqx.resource.commons.model.courcelibrary.CourseLibrary
;
import
com.zrqx.resource.commons.model.courcelibrary.CourseLibrary
;
import
com.zrqx.resource.commons.vo.bg.courselibrary.CourseLibraryListVO
;
import
com.zrqx.resource.commons.vo.bg.courselibrary.CourseLibraryListVO
;
import
com.zrqx.resource.commons.vo.bg.videolibrary.VideoLibraryListVO
;
/**
/**
* 课程库
* 课程库
*/
*/
public
interface
CourseLibraryMapper
extends
BaseMapper
<
CourseLibrary
>
{
public
interface
CourseLibraryMapper
extends
BaseMapper
<
CourseLibrary
>
{
@Select
(
"<script>"
@Select
(
"<script>"
+
"select a.id,a.name,a.author,a.
source,a.cover,a.realPrice,DATE_FORMAT(a.authorizationTime,'%Y-%m-%d %H:%i:%s') authorizationTime, DATE_FORMAT(a.uploadTime,'%Y-%m-%d %H:%i:%s
') uploadTime,a.status,a.resourceType "
+
"select a.id,a.name,a.author,a.
img,a.realPrice, DATE_FORMAT(a.uploadTime,'%Y-%m-%d %H:%i
') uploadTime,a.status,a.resourceType "
+
"from res_Course_Library a left join res_Course_Library_Diy_Type ad "
+
"from res_Course_Library a left join res_Course_Library_Diy_Type ad "
+
"on a.id = ad.CourseLibraryId "
+
"on a.id = ad.CourseLibraryId "
+
"where 1=1 "
+
"where 1=1 "
...
@@ -54,4 +56,30 @@ public interface CourseLibraryMapper extends BaseMapper<CourseLibrary> {
...
@@ -54,4 +56,30 @@ public interface CourseLibraryMapper extends BaseMapper<CourseLibrary> {
+
"</if>"
+
"</if>"
+
"</script>"
)
+
"</script>"
)
List
<
CourseLibraryListVO
>
queryByTileAndDiyType
(
@Param
(
"form"
)
QueryResourceForPoPForm
form
);
List
<
CourseLibraryListVO
>
queryByTileAndDiyType
(
@Param
(
"form"
)
QueryResourceForPoPForm
form
);
/**
* 根据课程id查询关联视频
* @param courseId
* @return
*/
@Select
(
"<script>"
+
"select id,name,timeLength,sort,status from res_video_library "
+
" where 1 = 1 and status = 1 and courseId = #{courseId}"
+
" order by sort asc,uploadTime desc "
+
"</script>"
)
List
<
VideoLibraryListVO
>
videoRelationPage
(
@Param
(
"courseId"
)
String
courseId
);
/**
* 查询未关联视频列表
* @param form
* @return
*/
@Select
(
"<script>"
+
" select id,name,author,DATE_FORMAT(uploadTime,'%Y-%m-%d %H:%i') uploadTime,status from res_video_library "
+
" where 1 = 1 and status = 1 and courseId is null and salesType = 2 "
+
" like(name,form.name) "
+
" like(author,form.author) "
+
" order by uploadTime desc "
+
"</script>"
)
List
<
VideoLibraryListVO
>
popPage
(
@Param
(
"form"
)
QueryCourseAndVideoForm
form
);
}
}
app/resource/src/main/java/com/zrqx/resource/bg/mapper/videolibrary/VideoLibraryMapper.java
浏览文件 @
eb364cf0
...
@@ -16,12 +16,10 @@ import com.zrqx.resource.commons.vo.bg.videolibrary.VideoLibraryListVO;
...
@@ -16,12 +16,10 @@ import com.zrqx.resource.commons.vo.bg.videolibrary.VideoLibraryListVO;
*/
*/
public
interface
VideoLibraryMapper
extends
BaseMapper
<
VideoLibrary
>
{
public
interface
VideoLibraryMapper
extends
BaseMapper
<
VideoLibrary
>
{
@Select
(
"<script>"
@Select
(
"<script>"
+
"select a.id,a.name,a.
source,a.bookName,a.realprice,a.timeLength,a.size,a.uploadTime,a.status
"
+
"select a.id,a.name,a.
realprice, DATE_FORMAT(a.uploadTime,'%Y-%m-%d %H:%i') uploadTime,a.status,a.img,a.defaultImg,a.author
"
+
"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 "
+
"where 1=1 "
+
" eq(a.nationsType,form.nationsType) "
+
" like(ad.code,form.diyTypeCode) "
+
" like(ad.code,form.diyTypeCode) "
/*+ "<if test='form.diyTypeId != null and form.diyTypeId.size > 0'>"
/*+ "<if test='form.diyTypeId != null and form.diyTypeId.size > 0'>"
...
@@ -32,7 +30,6 @@ public interface VideoLibraryMapper extends BaseMapper<VideoLibrary> {
...
@@ -32,7 +30,6 @@ public interface VideoLibraryMapper extends BaseMapper<VideoLibrary> {
+ "</if>" */
+ "</if>" */
+
" like(a.name,form.name) "
+
" like(a.name,form.name) "
+
" like(a.bookName,form.bookName) "
+
" eq(a.status,form.status) "
+
" eq(a.status,form.status) "
//+ "<if test = '" + NOTBLANK + "(form.beginTime)'>"
//+ "<if test = '" + NOTBLANK + "(form.beginTime)'>"
...
@@ -47,15 +44,12 @@ public interface VideoLibraryMapper extends BaseMapper<VideoLibrary> {
...
@@ -47,15 +44,12 @@ public interface VideoLibraryMapper extends BaseMapper<VideoLibrary> {
List
<
VideoLibraryListVO
>
query
(
@Param
(
"form"
)
QueryVideoLibraryForm
form
);
List
<
VideoLibraryListVO
>
query
(
@Param
(
"form"
)
QueryVideoLibraryForm
form
);
@Select
(
"<script>"
@Select
(
"<script>"
+
"select a.id,a.name,a.source,a.author,a.bookName,a.price,a.timeLength,a.size,a.uploadTime,a.status,a.
cover
"
+
"select a.id,a.name,a.source,a.author,a.bookName,a.price,a.timeLength,a.size,a.uploadTime,a.status,a.
img,a.defautImg
"
+
"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 "
+
"where 1=1 and a.status = 1 "
+
" eq(a.nationsType,form.nationsType) "
+
" like(ad.code,form.diyTypeCode) "
+
" like(ad.code,form.diyTypeCode) "
+
" like(a.name,form.name) "
+
" like(a.name,form.name) "
+
"<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=\")\">"
...
...
app/resource/src/main/java/com/zrqx/resource/bg/service/courselibrary/CourseLibrarySerivceImpl.java
浏览文件 @
eb364cf0
...
@@ -3,7 +3,6 @@ package com.zrqx.resource.bg.service.courselibrary;
...
@@ -3,7 +3,6 @@ package com.zrqx.resource.bg.service.courselibrary;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -27,7 +26,9 @@ import com.zrqx.resource.bg.mapper.membercollection.MemberCollectionMapper;
...
@@ -27,7 +26,9 @@ import com.zrqx.resource.bg.mapper.membercollection.MemberCollectionMapper;
import
com.zrqx.resource.bg.mapper.recommend.RecommendResourceMapper
;
import
com.zrqx.resource.bg.mapper.recommend.RecommendResourceMapper
;
import
com.zrqx.resource.bg.mapper.record.RecordMapper
;
import
com.zrqx.resource.bg.mapper.record.RecordMapper
;
import
com.zrqx.resource.bg.mapper.shoppingcart.ShoppingCartMapper
;
import
com.zrqx.resource.bg.mapper.shoppingcart.ShoppingCartMapper
;
import
com.zrqx.resource.bg.mapper.videolibrary.VideoLibraryMapper
;
import
com.zrqx.resource.commons.form.bg.QueryResourceForPoPForm
;
import
com.zrqx.resource.commons.form.bg.QueryResourceForPoPForm
;
import
com.zrqx.resource.commons.form.bg.courselibrary.QueryCourseAndVideoForm
;
import
com.zrqx.resource.commons.form.bg.courselibrary.QueryCourseLibraryForm
;
import
com.zrqx.resource.commons.form.bg.courselibrary.QueryCourseLibraryForm
;
import
com.zrqx.resource.commons.form.bg.courselibrary.SaveUpdateCourseLibraryForm
;
import
com.zrqx.resource.commons.form.bg.courselibrary.SaveUpdateCourseLibraryForm
;
import
com.zrqx.resource.commons.model.courcelibrary.CourseLibrary
;
import
com.zrqx.resource.commons.model.courcelibrary.CourseLibrary
;
...
@@ -37,7 +38,9 @@ import com.zrqx.resource.commons.model.membercollection.MemberCollection;
...
@@ -37,7 +38,9 @@ import com.zrqx.resource.commons.model.membercollection.MemberCollection;
import
com.zrqx.resource.commons.model.record.Record
;
import
com.zrqx.resource.commons.model.record.Record
;
import
com.zrqx.resource.commons.model.resourcerelation.ResourceRelation
;
import
com.zrqx.resource.commons.model.resourcerelation.ResourceRelation
;
import
com.zrqx.resource.commons.model.shoppingcart.ShoppingCart
;
import
com.zrqx.resource.commons.model.shoppingcart.ShoppingCart
;
import
com.zrqx.resource.commons.model.videolibrary.VideoLibrary
;
import
com.zrqx.resource.commons.vo.bg.courselibrary.CourseLibraryListVO
;
import
com.zrqx.resource.commons.vo.bg.courselibrary.CourseLibraryListVO
;
import
com.zrqx.resource.commons.vo.bg.videolibrary.VideoLibraryListVO
;
import
tk.mybatis.mapper.entity.Example
;
import
tk.mybatis.mapper.entity.Example
;
...
@@ -52,7 +55,7 @@ public class CourseLibrarySerivceImpl extends BaseServiceImpl<CourseLibrary,Stri
...
@@ -52,7 +55,7 @@ public class CourseLibrarySerivceImpl extends BaseServiceImpl<CourseLibrary,Stri
@Autowired
@Autowired
private
CourseLibraryDiyTypeMapper
courseLibraryDiyTypeMapper
;
private
CourseLibraryDiyTypeMapper
courseLibraryDiyTypeMapper
;
@Autowired
@Autowired
private
CourseLibraryLabelContentDiyTypeMapper
courseLibraryLabelContentDiyType
Mapper
;
private
VideoLibraryMapper
video
Mapper
;
@Autowired
@Autowired
private
RecommendResourceMapper
recommendResourceMapper
;
private
RecommendResourceMapper
recommendResourceMapper
;
@Autowired
@Autowired
...
@@ -89,10 +92,11 @@ public class CourseLibrarySerivceImpl extends BaseServiceImpl<CourseLibrary,Stri
...
@@ -89,10 +92,11 @@ public class CourseLibrarySerivceImpl extends BaseServiceImpl<CourseLibrary,Stri
}
}
if
(
entity
.
getId
()
==
null
){
if
(
entity
.
getId
()
==
null
){
//添加
//添加
entity
.
setStatus
(
LibraryStatusEnum
.
STATUS_
0
.
getCode
());
entity
.
setStatus
(
LibraryStatusEnum
.
STATUS_
2
.
getCode
());
entity
.
setUploadTime
(
new
Date
());
entity
.
setUploadTime
(
new
Date
());
entity
.
setResourceType
(
AllResourceTypeEnum
.
COURSE
.
getCode
());
entity
.
setResourceType
(
AllResourceTypeEnum
.
COURSE
.
getCode
());
entity
.
setBrowseNum
(
50
);
entity
.
setBrowseNum
(
0
);
entity
.
setSalesNum
(
0
);
mapper
.
insert
(
entity
);
mapper
.
insert
(
entity
);
}
else
{
}
else
{
//修改
//修改
...
@@ -102,23 +106,12 @@ public class CourseLibrarySerivceImpl extends BaseServiceImpl<CourseLibrary,Stri
...
@@ -102,23 +106,12 @@ public class CourseLibrarySerivceImpl extends BaseServiceImpl<CourseLibrary,Stri
CourseLibraryDiyType
old
=
new
CourseLibraryDiyType
();
CourseLibraryDiyType
old
=
new
CourseLibraryDiyType
();
old
.
setCourseLibraryId
(
entity
.
getId
());
old
.
setCourseLibraryId
(
entity
.
getId
());
courseLibraryDiyTypeMapper
.
delete
(
old
);
courseLibraryDiyTypeMapper
.
delete
(
old
);
CourseLibraryLabelContentDiyType
alcdy
=
new
CourseLibraryLabelContentDiyType
();
alcdy
.
setCourseLibraryId
(
entity
.
getId
());
courseLibraryLabelContentDiyTypeMapper
.
delete
(
alcdy
);
}
}
//添加当前对象与自定义分类的关系
//添加当前对象与自定义分类的关系
if
(
form
.
getDiyType
()
!=
null
&&
form
.
getDiyType
().
size
()
>
0
){
if
(
form
.
getDiyType
()
!=
null
&&
form
.
getDiyType
().
size
()
>
0
){
List
<
CourseLibraryDiyType
>
list
=
form
.
getDiyType
();
List
<
CourseLibraryDiyType
>
list
=
form
.
getDiyType
();
list
.
forEach
(
li
->
li
.
setCourseLibraryId
(
entity
.
getId
()));
list
.
forEach
(
li
->
li
.
setCourseLibraryId
(
entity
.
getId
()));
courseLibraryDiyTypeMapper
.
insertList
(
list
);
courseLibraryDiyTypeMapper
.
insertList
(
list
);
}
//添加与标签的关系
if
(
form
.
getLabel
()
!=
null
&&
form
.
getLabel
().
size
()
>
0
){
List
<
CourseLibraryLabelContentDiyType
>
aldcdList
=
form
.
getLabel
().
stream
().
filter
(
f
->
f
.
getLabelId
()
!=
null
).
collect
(
Collectors
.
toList
());
aldcdList
.
stream
().
forEach
(
li
->
li
.
setCourseLibraryId
(
entity
.
getId
()));
if
(!
aldcdList
.
isEmpty
()){
courseLibraryLabelContentDiyTypeMapper
.
insertList
(
aldcdList
);
}
}
}
return
true
;
return
true
;
}
}
...
@@ -148,9 +141,6 @@ public class CourseLibrarySerivceImpl extends BaseServiceImpl<CourseLibrary,Stri
...
@@ -148,9 +141,6 @@ public class CourseLibrarySerivceImpl extends BaseServiceImpl<CourseLibrary,Stri
example
=
new
Example
(
CourseLibraryDiyType
.
class
);
example
=
new
Example
(
CourseLibraryDiyType
.
class
);
example
.
createCriteria
().
andIn
(
"courseLibraryId"
,
ids
);
example
.
createCriteria
().
andIn
(
"courseLibraryId"
,
ids
);
courseLibraryDiyTypeMapper
.
deleteByExample
(
example
);
courseLibraryDiyTypeMapper
.
deleteByExample
(
example
);
example
=
new
Example
(
CourseLibraryLabelContentDiyType
.
class
);
example
.
createCriteria
().
andIn
(
"courseLibraryId"
,
ids
);
courseLibraryLabelContentDiyTypeMapper
.
deleteByExample
(
example
);
//这里需要级联删除其他接口关联资源
//这里需要级联删除其他接口关联资源
//----推荐位内容
//----推荐位内容
recommendResourceMapper
.
delectByResourceIds
(
ids
,
AllResourceTypeEnum
.
COURSE
.
getCode
());
recommendResourceMapper
.
delectByResourceIds
(
ids
,
AllResourceTypeEnum
.
COURSE
.
getCode
());
...
@@ -183,13 +173,15 @@ public class CourseLibrarySerivceImpl extends BaseServiceImpl<CourseLibrary,Stri
...
@@ -183,13 +173,15 @@ public class CourseLibrarySerivceImpl extends BaseServiceImpl<CourseLibrary,Stri
PageParam
pageParam
)
{
PageParam
pageParam
)
{
startPage
(
pageParam
);
startPage
(
pageParam
);
List
<
CourseLibraryListVO
>
list
=
mapper
.
query
(
form
);
List
<
CourseLibraryListVO
>
list
=
mapper
.
query
(
form
);
ResourceRelation
resourceRelation
=
new
ResourceRelation
();
VideoLibrary
videoLibrary
=
new
VideoLibrary
();
list
.
forEach
(
f
->
{
list
.
forEach
(
f
->
{
f
.
setStatus_zh
(
LibraryStatusEnum
.
getName
(
f
.
getStatus
()));
videoLibrary
.
setCourseId
(
f
.
getId
());
// 视频数量
videoLibrary
.
setStatus
(
LibraryStatusEnum
.
STATUS_1
.
getCode
());
resourceRelation
.
setObjectId
(
f
.
getId
());
int
videoNum
=
videoMapper
.
selectCount
(
videoLibrary
);
int
videoNum
=
resourceRelationMapper
.
selectCount
(
resourceRelation
);
f
.
setVideoNum
(
videoNum
);
f
.
setVideoNum
(
videoNum
);
if
(
f
.
getStatus
()
!=
null
)
{
f
.
setStatus_zh
(
LibraryStatusEnum
.
getName
(
f
.
getStatus
()));
}
});
});
return
new
PageInfo
<
CourseLibraryListVO
>(
list
);
return
new
PageInfo
<
CourseLibraryListVO
>(
list
);
}
}
...
@@ -209,4 +201,34 @@ public class CourseLibrarySerivceImpl extends BaseServiceImpl<CourseLibrary,Stri
...
@@ -209,4 +201,34 @@ public class CourseLibrarySerivceImpl extends BaseServiceImpl<CourseLibrary,Stri
return
new
PageInfo
<
CourseLibraryListVO
>(
list
);
return
new
PageInfo
<
CourseLibraryListVO
>(
list
);
}
}
/**
* 根据课程id查询视频资源
*/
@Override
public
PageInfo
<
VideoLibraryListVO
>
videoRelationPage
(
String
courseId
,
PageParam
pageParam
)
{
startPage
(
pageParam
);
List
<
VideoLibraryListVO
>
list
=
mapper
.
videoRelationPage
(
courseId
);
list
.
forEach
(
f
->
{
if
(
f
.
getStatus
()
!=
null
)
{
f
.
setStatus_zh
(
LibraryStatusEnum
.
getName
(
f
.
getStatus
()));
}
});
return
new
PageInfo
<
VideoLibraryListVO
>(
list
);
}
/**
* 查询未关联视频资源
*/
@Override
public
PageInfo
<
VideoLibraryListVO
>
popPage
(
QueryCourseAndVideoForm
form
,
PageParam
pageParam
)
{
startPage
(
pageParam
);
List
<
VideoLibraryListVO
>
list
=
mapper
.
popPage
(
form
);
list
.
forEach
(
f
->
{
if
(
f
.
getStatus
()
!=
null
)
{
f
.
setStatus_zh
(
LibraryStatusEnum
.
getName
(
f
.
getStatus
()));
}
});
return
new
PageInfo
<
VideoLibraryListVO
>(
list
);
}
}
}
app/resource/src/main/java/com/zrqx/resource/bg/service/courselibrary/CourseLibraryService.java
浏览文件 @
eb364cf0
...
@@ -6,10 +6,12 @@ import com.zrqx.core.service.BaseService;
...
@@ -6,10 +6,12 @@ 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
;
import
com.zrqx.resource.commons.form.bg.QueryResourceForPoPForm
;
import
com.zrqx.resource.commons.form.bg.QueryResourceForPoPForm
;
import
com.zrqx.resource.commons.form.bg.courselibrary.QueryCourseAndVideoForm
;
import
com.zrqx.resource.commons.form.bg.courselibrary.QueryCourseLibraryForm
;
import
com.zrqx.resource.commons.form.bg.courselibrary.QueryCourseLibraryForm
;
import
com.zrqx.resource.commons.form.bg.courselibrary.SaveUpdateCourseLibraryForm
;
import
com.zrqx.resource.commons.form.bg.courselibrary.SaveUpdateCourseLibraryForm
;
import
com.zrqx.resource.commons.model.courcelibrary.CourseLibrary
;
import
com.zrqx.resource.commons.model.courcelibrary.CourseLibrary
;
import
com.zrqx.resource.commons.vo.bg.courselibrary.CourseLibraryListVO
;
import
com.zrqx.resource.commons.vo.bg.courselibrary.CourseLibraryListVO
;
import
com.zrqx.resource.commons.vo.bg.videolibrary.VideoLibraryListVO
;
/**
/**
* 专题库
* 专题库
*/
*/
...
@@ -47,5 +49,18 @@ public interface CourseLibraryService extends BaseService<CourseLibrary,String>{
...
@@ -47,5 +49,18 @@ public interface CourseLibraryService extends BaseService<CourseLibrary,String>{
* @author ycw
* @author ycw
* @date: 2019年1月3日 下午7:12:29
* @date: 2019年1月3日 下午7:12:29
*/
*/
PageInfo
<
CourseLibraryListVO
>
pageByTitleAndDiyType
(
QueryResourceForPoPForm
form
,
PageParam
pageParam
);
PageInfo
<
CourseLibraryListVO
>
pageByTitleAndDiyType
(
QueryResourceForPoPForm
form
,
PageParam
pageParam
);
/**
* 相关视频资源
* @param courseId
* @param pageParam
* @return
*/
PageInfo
<
VideoLibraryListVO
>
videoRelationPage
(
String
courseId
,
PageParam
pageParam
);
/**
* 关联视频弹窗列表
*/
PageInfo
<
VideoLibraryListVO
>
popPage
(
QueryCourseAndVideoForm
form
,
PageParam
pageParam
);
}
}
app/resource/src/main/java/com/zrqx/resource/bg/service/videolibrary/VideoLibrarySerivceImpl.java
浏览文件 @
eb364cf0
...
@@ -3,7 +3,6 @@ package com.zrqx.resource.bg.service.videolibrary;
...
@@ -3,7 +3,6 @@ package com.zrqx.resource.bg.service.videolibrary;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -11,8 +10,11 @@ import org.springframework.stereotype.Service;
...
@@ -11,8 +10,11 @@ import org.springframework.stereotype.Service;
import
com.zrqx.core.client.order.bg.OrderClient
;
import
com.zrqx.core.client.order.bg.OrderClient
;
import
com.zrqx.core.enums.AllResourceTypeEnum
;
import
com.zrqx.core.enums.AllResourceTypeEnum
;
import
com.zrqx.core.enums.SaleResourceTypeEnum
;
import
com.zrqx.core.enums.StatusEnum
;
import
com.zrqx.core.enums.resource.LibraryStatusEnum
;
import
com.zrqx.core.enums.resource.LibraryStatusEnum
;
import
com.zrqx.core.enums.resource.PriceOptionEnum
;
import
com.zrqx.core.enums.resource.PriceOptionEnum
;
import
com.zrqx.core.enums.resource.SalsesTypeEnum
;
import
com.zrqx.core.exception.BaseException
;
import
com.zrqx.core.exception.BaseException
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.core.service.BaseServiceImpl
;
...
@@ -91,17 +93,19 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,String
...
@@ -91,17 +93,19 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,String
}
}
}
}
BeanUtils
.
copyProperties
(
form
,
entity
);
BeanUtils
.
copyProperties
(
form
,
entity
);
if
(
StringUtils
.
isNotBlank
(
entity
.
getDefaultImg
()))
{
String
defaultImg
=
entity
.
getDefaultImg
()
+
"/"
+
entity
.
getVideo
()
+
"/1.jpg"
;
entity
.
setDefaultImg
(
defaultImg
);
}
if
(
PriceOptionEnum
.
STATUS_0
.
getCode
()
==
form
.
getPriceOption
()){
if
(
PriceOptionEnum
.
STATUS_0
.
getCode
()
==
form
.
getPriceOption
()){
entity
.
setRealPrice
(
new
BigDecimal
(
0
));
entity
.
setRealPrice
(
new
BigDecimal
(
0
));
}
}
if
(
entity
.
getId
()
==
null
){
if
(
entity
.
getId
()
==
null
){
//添加
//添加
entity
.
setStatus
(
LibraryStatusEnum
.
STATUS_
0
.
getCode
());
entity
.
setStatus
(
LibraryStatusEnum
.
STATUS_
2
.
getCode
());
entity
.
setUploadTime
(
new
Date
());
entity
.
setUploadTime
(
new
Date
());
entity
.
setResourceType
(
AllResourceTypeEnum
.
VIDEO
.
getCode
());
entity
.
setResourceType
(
AllResourceTypeEnum
.
VIDEO
.
getCode
());
entity
.
setBrowseNum
(
50
);
entity
.
setBrowseNum
(
0
);
entity
.
setReadTextPower
(
1
);
entity
.
setClickNum
(
50
);
entity
.
setSalesNum
(
0
);
entity
.
setSalesNum
(
0
);
mapper
.
insert
(
entity
);
mapper
.
insert
(
entity
);
}
else
{
}
else
{
...
@@ -126,14 +130,6 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,String
...
@@ -126,14 +130,6 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,String
List
<
VideoLibraryDiyType
>
list
=
form
.
getDiyType
();
List
<
VideoLibraryDiyType
>
list
=
form
.
getDiyType
();
list
.
forEach
(
li
->
li
.
setVlId
(
entity
.
getId
()));
list
.
forEach
(
li
->
li
.
setVlId
(
entity
.
getId
()));
vdrMapper
.
insertList
(
list
);
vdrMapper
.
insertList
(
list
);
}
//添加与标签的关系
if
(
form
.
getLabel
()
!=
null
&&
form
.
getLabel
().
size
()
>
0
){
List
<
VideoLibraryLabelContentDiyType
>
aldcdList
=
form
.
getLabel
().
stream
().
filter
(
f
->
f
.
getLabelId
()
!=
null
).
collect
(
Collectors
.
toList
());
aldcdList
.
stream
().
forEach
(
li
->
li
.
setVideoId
(
entity
.
getId
()));
if
(!
aldcdList
.
isEmpty
()){
alcdMapper
.
insertList
(
aldcdList
);
}
}
}
return
true
;
return
true
;
}
}
...
@@ -145,38 +141,27 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,String
...
@@ -145,38 +141,27 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,String
* @date: 2018年11月22日 下午2:39:13
* @date: 2018年11月22日 下午2:39:13
*/
*/
@Override
@Override
public
boolean
batchInsert
(
SaveVideoLibraryForm
form
)
{
public
boolean
batchInsert
(
List
<
SaveVideoLibraryForm
>
form
)
{
if
(
form
.
getNames
().
size
()
!=
form
.
getVideo
().
size
())
{
if
(
form
.
isEmpty
())
{
throw
new
BaseException
(
"
视频数量错误
"
);
throw
new
BaseException
(
"
请选择视频文件!
"
);
}
}
//循环创建视频对象
form
.
forEach
(
f
->
{
for
(
int
i
=
0
;
i
<
form
.
getNames
().
size
();
i
++)
{
VideoLibrary
videoLibrary
=
new
VideoLibrary
();
VideoLibrary
obj
=
new
VideoLibrary
();
BeanUtils
.
copyProperties
(
f
,
videoLibrary
);
BeanUtils
.
copyProperties
(
form
,
obj
);
videoLibrary
.
setBrowseNum
(
0
);
obj
.
setName
(
form
.
getNames
().
get
(
i
));
videoLibrary
.
setSalesType
(
SalsesTypeEnum
.
STATUS_1
.
getCode
());
obj
.
setVideo
(
form
.
getVideo
().
get
(
i
));
videoLibrary
.
setResourceType
(
AllResourceTypeEnum
.
VIDEO
.
getCode
());
obj
.
setVideoName
(
form
.
getVideoName
().
get
(
i
));
videoLibrary
.
setPriceOption
(
PriceOptionEnum
.
STATUS_0
.
getCode
());
obj
.
setSize
(
form
.
getSize
().
get
(
i
));
videoLibrary
.
setRealPrice
(
new
BigDecimal
(
0
));
obj
.
setFormats
(
form
.
getFormats
().
get
(
i
));
videoLibrary
.
setSalesNum
(
0
);
obj
.
setTimeLength
(
form
.
getTimeLength
().
get
(
i
));
videoLibrary
.
setStatus
(
LibraryStatusEnum
.
STATUS_2
.
getCode
());
obj
.
setUploadTime
(
new
Date
());
videoLibrary
.
setUploadTime
(
new
Date
());
obj
.
setStatus
(
LibraryStatusEnum
.
STATUS_0
.
getCode
());
if
(
StringUtils
.
isNotBlank
(
f
.
getDefaultImg
()))
{
obj
.
setResourceType
(
AllResourceTypeEnum
.
VIDEO
.
getCode
());
String
defaultImg
=
f
.
getDefaultImg
()
+
"/"
+
videoLibrary
.
getVideo
()
+
"/1.jpg"
;
obj
.
setBrowseNum
(
50
);
videoLibrary
.
setDefaultImg
(
defaultImg
);
obj
.
setReadTextPower
(
1
);
obj
.
setClickNum
(
50
);
obj
.
setSalesNum
(
0
);
obj
.
setVideoName
(
form
.
getNames
().
get
(
i
));
mapper
.
insert
(
obj
);
if
(
form
.
getDiyType
()
!=
null
){
VideoLibraryDiyType
videoLibraryDiyType
=
new
VideoLibraryDiyType
();
videoLibraryDiyType
.
setCode
(
form
.
getDiyType
().
getCode
());
videoLibraryDiyType
.
setDtId
(
form
.
getDiyType
().
getDtId
());
videoLibraryDiyType
.
setVlId
(
obj
.
getId
());
vdrMapper
.
insert
(
videoLibraryDiyType
);
}
}
}
mapper
.
insert
(
videoLibrary
);
});
return
true
;
return
true
;
}
}
/**
/**
...
@@ -246,6 +231,11 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,String
...
@@ -246,6 +231,11 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,String
//暂不用自定义分类id 做in查询
//暂不用自定义分类id 做in查询
form
.
setDiyTypeId
(
null
);
form
.
setDiyTypeId
(
null
);
List
<
VideoLibraryListVO
>
list
=
mapper
.
query
(
form
);
List
<
VideoLibraryListVO
>
list
=
mapper
.
query
(
form
);
list
.
forEach
(
f
->
{
if
(
f
.
getStatus
()
!=
null
)
{
f
.
setStatus_zh
(
LibraryStatusEnum
.
getName
(
f
.
getStatus
()));
}
});
return
new
PageInfo
<
VideoLibraryListVO
>(
list
);
return
new
PageInfo
<
VideoLibraryListVO
>(
list
);
}
}
/**
/**
...
@@ -265,7 +255,7 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,String
...
@@ -265,7 +255,7 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,String
List
<
VideoLibraryListVO
>
list
=
mapper
.
queryByTileAndDiyType
(
form
);
List
<
VideoLibraryListVO
>
list
=
mapper
.
queryByTileAndDiyType
(
form
);
if
(!
list
.
isEmpty
()){
if
(!
list
.
isEmpty
()){
for
(
VideoLibraryListVO
ebookListVO
:
list
){
for
(
VideoLibraryListVO
ebookListVO
:
list
){
ebookListVO
.
setStatus_zh
(
LibraryStatusEnum
.
getName
(
Integer
.
parseInt
(
ebookListVO
.
getStatus
()
)));
ebookListVO
.
setStatus_zh
(
LibraryStatusEnum
.
getName
(
ebookListVO
.
getStatus
(
)));
}
}
}
}
return
new
PageInfo
<
VideoLibraryListVO
>(
list
);
return
new
PageInfo
<
VideoLibraryListVO
>(
list
);
...
...
app/resource/src/main/java/com/zrqx/resource/bg/service/videolibrary/VideoLibraryService.java
浏览文件 @
eb364cf0
...
@@ -30,7 +30,7 @@ public interface VideoLibraryService extends BaseService<VideoLibrary,String>{
...
@@ -30,7 +30,7 @@ public interface VideoLibraryService extends BaseService<VideoLibrary,String>{
* @author yzg
* @author yzg
* @date: 2018年11月22日 下午2:39:13
* @date: 2018年11月22日 下午2:39:13
*/
*/
boolean
batchInsert
(
SaveVideoLibraryForm
form
);
boolean
batchInsert
(
List
<
SaveVideoLibraryForm
>
form
);
/**
/**
* 批量删除
* 批量删除
* @param ids
* @param ids
...
...
app/resource/src/main/java/com/zrqx/resource/commons/form/bg/courselibrary/BatchUpdateCourseLibraryForm.java
浏览文件 @
eb364cf0
...
@@ -21,4 +21,6 @@ public class BatchUpdateCourseLibraryForm {
...
@@ -21,4 +21,6 @@ public class BatchUpdateCourseLibraryForm {
private
BigDecimal
price
;
private
BigDecimal
price
;
@ApiModelProperty
(
"售价"
)
@ApiModelProperty
(
"售价"
)
private
BigDecimal
realPrice
;
private
BigDecimal
realPrice
;
@ApiModelProperty
(
"售价选项 0 免费,1收费"
)
private
Integer
priceOption
;
}
}
app/resource/src/main/java/com/zrqx/resource/commons/form/bg/courselibrary/QueryCourseAndVideoForm.java
0 → 100644
浏览文件 @
eb364cf0
package
com
.
zrqx
.
resource
.
commons
.
form
.
bg
.
courselibrary
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
@ApiModel
(
value
=
"QueryCourseAndVideoForm"
,
description
=
"课程库"
)
public
class
QueryCourseAndVideoForm
{
@ApiModelProperty
(
value
=
"资源名称"
)
private
String
name
;
@ApiModelProperty
(
"作者"
)
private
String
author
;
}
app/resource/src/main/java/com/zrqx/resource/commons/form/bg/courselibrary/QueryCourseLibraryForm.java
浏览文件 @
eb364cf0
...
@@ -11,8 +11,6 @@ import lombok.Data;
...
@@ -11,8 +11,6 @@ import lombok.Data;
public
class
QueryCourseLibraryForm
{
public
class
QueryCourseLibraryForm
{
@ApiModelProperty
(
value
=
"资源名称"
)
@ApiModelProperty
(
value
=
"资源名称"
)
private
String
name
;
private
String
name
;
@ApiModelProperty
(
"来源"
)
private
String
source
;
@ApiModelProperty
(
"状态:0待审核,1已上架,2已下架"
)
@ApiModelProperty
(
"状态:0待审核,1已上架,2已下架"
)
private
String
status
;
private
String
status
;
@ApiModelProperty
(
value
=
"上传时间-开始"
)
@ApiModelProperty
(
value
=
"上传时间-开始"
)
...
...
app/resource/src/main/java/com/zrqx/resource/commons/form/bg/courselibrary/SaveUpdateCourseLibraryForm.java
浏览文件 @
eb364cf0
...
@@ -5,7 +5,6 @@ import java.util.Date;
...
@@ -5,7 +5,6 @@ import java.util.Date;
import
java.util.List
;
import
java.util.List
;
import
com.zrqx.resource.commons.model.courcelibrary.CourseLibraryDiyType
;
import
com.zrqx.resource.commons.model.courcelibrary.CourseLibraryDiyType
;
import
com.zrqx.resource.commons.model.courcelibrary.CourseLibraryLabelContentDiyType
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -23,36 +22,27 @@ public class SaveUpdateCourseLibraryForm {
...
@@ -23,36 +22,27 @@ public class SaveUpdateCourseLibraryForm {
private
String
authorId
;
private
String
authorId
;
@ApiModelProperty
(
value
=
"讲师名称和id(用,隔开)"
)
@ApiModelProperty
(
value
=
"讲师名称和id(用,隔开)"
)
private
String
authorNameAndId
;
private
String
authorNameAndId
;
@ApiModelProperty
(
"来源"
)
@ApiModelProperty
(
"总期数"
)
private
String
source
;
private
Integer
totalPeriods
;
@ApiModelProperty
(
"广告语"
)
private
String
adSlogan
;
@ApiModelProperty
(
value
=
"分类"
)
private
List
<
CourseLibraryDiyType
>
diyType
;
@ApiModelProperty
(
"封面"
)
@ApiModelProperty
(
"封面"
)
private
String
cover
;
private
String
img
;
@ApiModelProperty
(
"简介"
)
@ApiModelProperty
(
"简介"
)
private
String
synopsis
;
private
String
synopsis
;
@ApiModelProperty
(
"定价 元"
)
@ApiModelProperty
(
"定价 元"
)
private
BigDecimal
price
;
private
BigDecimal
price
;
@ApiModelProperty
(
"售价 元"
)
@ApiModelProperty
(
"售价 元"
)
private
BigDecimal
realPrice
;
private
BigDecimal
realPrice
;
@ApiModelProperty
(
"
关键词
"
)
@ApiModelProperty
(
"
售价选项 0 免费,1收费
"
)
private
String
keywords
;
private
Integer
priceOption
;
@ApiModelProperty
(
"状态:0待审核,1已上架,2已下架"
)
@ApiModelProperty
(
"状态:0待审核,1已上架,2已下架"
)
private
Integer
status
;
private
Integer
status
;
@ApiModelProperty
(
"资源类型"
)
@ApiModelProperty
(
"资源类型"
)
private
Integer
resourceType
;
private
Integer
resourceType
;
@ApiModelProperty
(
"授权时间"
)
private
Date
authorizationTime
;
@ApiModelProperty
(
"上传时间"
)
private
Date
uploadTime
;
@ApiModelProperty
(
"更新时间"
)
private
Date
updateTime
;
@ApiModelProperty
(
"播放次数"
)
private
Integer
clickNum
;
@ApiModelProperty
(
"浏览数量"
)
@ApiModelProperty
(
"浏览数量"
)
private
Integer
browseNum
;
private
Integer
browseNum
;
@ApiModelProperty
(
"售价选项 0 免费,1收费"
)
private
Integer
priceOption
;
@ApiModelProperty
(
value
=
"分类id"
)
private
List
<
CourseLibraryDiyType
>
diyType
;
@ApiModelProperty
(
value
=
"标签id"
)
private
List
<
CourseLibraryLabelContentDiyType
>
label
;
}
}
app/resource/src/main/java/com/zrqx/resource/commons/form/bg/videolibrary/BatchUpdateVideoLibraryForm.java
浏览文件 @
eb364cf0
...
@@ -21,6 +21,11 @@ public class BatchUpdateVideoLibraryForm {
...
@@ -21,6 +21,11 @@ public class BatchUpdateVideoLibraryForm {
private
BigDecimal
price
;
private
BigDecimal
price
;
@ApiModelProperty
(
"售价"
)
@ApiModelProperty
(
"售价"
)
private
BigDecimal
realPrice
;
private
BigDecimal
realPrice
;
@ApiModelProperty
(
"全文阅读权限 0 游客可见 1会员可见"
)
@ApiModelProperty
(
"销售方式"
)
private
Integer
readTextPower
;
private
Integer
saleType
;
@ApiModelProperty
(
"售价选项 0 免费,1收费"
)
private
Integer
priceOption
;
@ApiModelProperty
(
"阅读权限"
)
private
Integer
ReadTextPower
;
}
}
app/resource/src/main/java/com/zrqx/resource/commons/form/bg/videolibrary/QueryVideoLibraryForm.java
浏览文件 @
eb364cf0
...
@@ -10,8 +10,6 @@ import lombok.Data;
...
@@ -10,8 +10,6 @@ import lombok.Data;
public
class
QueryVideoLibraryForm
{
public
class
QueryVideoLibraryForm
{
@ApiModelProperty
(
value
=
"资源名称"
)
@ApiModelProperty
(
value
=
"资源名称"
)
private
String
name
;
private
String
name
;
@ApiModelProperty
(
"所属图书"
)
private
String
bookName
;
@ApiModelProperty
(
"状态:0待审核,1已上架,2已下架"
)
@ApiModelProperty
(
"状态:0待审核,1已上架,2已下架"
)
private
String
status
;
private
String
status
;
@ApiModelProperty
(
value
=
"上传时间-开始"
)
@ApiModelProperty
(
value
=
"上传时间-开始"
)
...
@@ -22,6 +20,4 @@ public class QueryVideoLibraryForm {
...
@@ -22,6 +20,4 @@ public class QueryVideoLibraryForm {
private
List
<
Integer
>
diyTypeId
;
private
List
<
Integer
>
diyTypeId
;
@ApiModelProperty
(
"自定义分类code"
)
@ApiModelProperty
(
"自定义分类code"
)
private
String
diyTypeCode
;
private
String
diyTypeCode
;
@ApiModelProperty
(
"民族 1蒙古族 2侗族 3藏族 4朝鲜族 5土家族 6回族 7满族 8汉族"
)
private
Integer
nationsType
;
}
}
app/resource/src/main/java/com/zrqx/resource/commons/form/bg/videolibrary/SaveUpdateVideoLibraryForm.java
浏览文件 @
eb364cf0
...
@@ -4,7 +4,6 @@ import java.math.BigDecimal;
...
@@ -4,7 +4,6 @@ import java.math.BigDecimal;
import
java.util.List
;
import
java.util.List
;
import
com.zrqx.resource.commons.model.videolibrary.VideoLibraryDiyType
;
import
com.zrqx.resource.commons.model.videolibrary.VideoLibraryDiyType
;
import
com.zrqx.resource.commons.model.videolibrary.VideoLibraryLabelContentDiyType
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -16,40 +15,39 @@ public class SaveUpdateVideoLibraryForm {
...
@@ -16,40 +15,39 @@ public class SaveUpdateVideoLibraryForm {
private
String
id
;
private
String
id
;
@ApiModelProperty
(
value
=
"视频名称"
)
@ApiModelProperty
(
value
=
"视频名称"
)
private
String
name
;
private
String
name
;
@ApiModelProperty
(
"来源"
)
@ApiModelProperty
(
value
=
"作者名称和id(用,隔开)"
)
private
String
source
;
private
String
authorNameAndId
;
@ApiModelProperty
(
"关键词"
)
private
String
keywords
;
@ApiModelProperty
(
"定价"
)
private
BigDecimal
price
;
@ApiModelProperty
(
"售价"
)
private
BigDecimal
realPrice
;
@ApiModelProperty
(
"作者id"
)
@ApiModelProperty
(
"作者id"
)
private
String
authorId
;
private
String
authorId
;
@ApiModelProperty
(
"作者"
)
@ApiModelProperty
(
"作者"
)
private
String
author
;
private
String
author
;
@ApiModelProperty
(
"时长"
)
@ApiModelProperty
(
"广告语"
)
private
String
timeLength
;
private
String
adSlogan
;
@ApiModelProperty
(
"文件大小"
)
@ApiModelProperty
(
value
=
"分类id"
)
private
String
size
;
private
List
<
VideoLibraryDiyType
>
diyType
;
@ApiModelProperty
(
"封面"
)
private
String
img
;
@ApiModelProperty
(
"默认封面"
)
private
String
defaultImg
;
@ApiModelProperty
(
"简介"
)
@ApiModelProperty
(
"简介"
)
private
String
synopsis
;
private
String
synopsis
;
@ApiModelProperty
(
"文本"
)
private
String
text
;
@ApiModelProperty
(
"video"
)
@ApiModelProperty
(
"video"
)
private
String
video
;
private
String
video
;
@ApiModelProperty
(
"封面"
)
private
String
cover
;
@ApiModelProperty
(
value
=
"分类id"
)
private
List
<
VideoLibraryDiyType
>
diyType
;
@ApiModelProperty
(
value
=
"标签id"
)
private
List
<
VideoLibraryLabelContentDiyType
>
label
;
@ApiModelProperty
(
"民族 1蒙古族 2侗族 3藏族 4朝鲜族 5土家族 6回族 7满族 8汉族"
)
private
Integer
nationsType
;
@ApiModelProperty
(
"售价选项 0 免费,1收费"
)
private
Integer
priceOption
;
@ApiModelProperty
(
"全文阅读权限 0 游客可见 1会员可见"
)
private
Integer
readTextPower
;
@ApiModelProperty
(
"video名称"
)
@ApiModelProperty
(
"video名称"
)
private
String
videoName
;
private
String
videoName
;
@ApiModelProperty
(
value
=
"作者名称和id(用,隔开)"
)
@ApiModelProperty
(
"时长"
)
private
String
authorNameAndId
;
private
String
timeLength
;
@ApiModelProperty
(
"文件大小"
)
private
String
size
;
@ApiModelProperty
(
"销售方式"
)
private
Integer
salesType
;
@ApiModelProperty
(
"售价选项 0 免费,1收费"
)
private
Integer
priceOption
;
@ApiModelProperty
(
"定价"
)
private
BigDecimal
price
;
@ApiModelProperty
(
"售价"
)
private
BigDecimal
realPrice
;
}
}
app/resource/src/main/java/com/zrqx/resource/commons/form/bg/videolibrary/SaveVideoLibraryForm.java
浏览文件 @
eb364cf0
package
com
.
zrqx
.
resource
.
commons
.
form
.
bg
.
videolibrary
;
package
com
.
zrqx
.
resource
.
commons
.
form
.
bg
.
videolibrary
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
com.zrqx.resource.commons.model.videolibrary.VideoLibraryDiyType
;
import
com.zrqx.resource.commons.model.videolibrary.VideoLibraryLabelContentDiyType
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -13,34 +7,16 @@ import lombok.Data;
...
@@ -13,34 +7,16 @@ import lombok.Data;
@ApiModel
(
value
=
"SaveVideoLibraryForm"
,
description
=
"添加视频库"
)
@ApiModel
(
value
=
"SaveVideoLibraryForm"
,
description
=
"添加视频库"
)
public
class
SaveVideoLibraryForm
{
public
class
SaveVideoLibraryForm
{
@ApiModelProperty
(
value
=
"视频名称集合"
)
@ApiModelProperty
(
value
=
"视频名称集合"
)
private
List
<
String
>
names
;
private
String
name
;
@ApiModelProperty
(
"来源"
)
private
String
source
;
@ApiModelProperty
(
"关键词"
)
private
String
keywords
;
@ApiModelProperty
(
"定价"
)
private
BigDecimal
price
;
@ApiModelProperty
(
"售价"
)
private
BigDecimal
realPrice
;
@ApiModelProperty
(
"简介"
)
private
String
synopsis
;
@ApiModelProperty
(
"video"
)
@ApiModelProperty
(
"video"
)
private
List
<
String
>
video
;
private
String
video
;
@ApiModelProperty
(
"封面"
)
private
String
cover
;
@ApiModelProperty
(
value
=
"分类id"
)
private
VideoLibraryDiyType
diyType
;
@ApiModelProperty
(
value
=
"标签id"
)
private
VideoLibraryLabelContentDiyType
label
;
@ApiModelProperty
(
"民族 1蒙古族 2侗族 3藏族 4朝鲜族 5土家族 6回族 7满族 8汉族"
)
private
Integer
nationsType
;
@ApiModelProperty
(
"格式"
)
private
List
<
String
>
formats
;
@ApiModelProperty
(
"文件大小"
)
@ApiModelProperty
(
"文件大小"
)
private
List
<
String
>
size
;
private
String
size
;
@ApiModelProperty
(
"时长"
)
@ApiModelProperty
(
"时长"
)
private
List
<
String
>
timeLength
;
private
String
timeLength
;
@ApiModelProperty
(
"video名称"
)
@ApiModelProperty
(
"video名称"
)
private
List
<
String
>
videoName
;
private
String
videoName
;
@ApiModelProperty
(
"默认封面"
)
private
String
defaultImg
;
}
}
app/resource/src/main/java/com/zrqx/resource/commons/model/courcelibrary/CourseLibrary.java
浏览文件 @
eb364cf0
package
com
.
zrqx
.
resource
.
commons
.
model
.
courcelibrary
;
package
com
.
zrqx
.
resource
.
commons
.
model
.
courcelibrary
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
import
javax.persistence.GenerationType
;
import
javax.persistence.Id
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
@Data
@Data
@ApiModel
(
value
=
"CourseLibrary"
,
description
=
"微课库"
)
@ApiModel
(
value
=
"CourseLibrary"
,
description
=
"微课库"
)
...
@@ -26,35 +26,31 @@ public class CourseLibrary {
...
@@ -26,35 +26,31 @@ public class CourseLibrary {
private
String
author
;
private
String
author
;
@ApiModelProperty
(
"讲师id"
)
@ApiModelProperty
(
"讲师id"
)
private
String
authorId
;
private
String
authorId
;
@ApiModelProperty
(
"来源"
)
@ApiModelProperty
(
"总期数"
)
private
String
source
;
private
Integer
totalPeriods
;
@ApiModelProperty
(
"广告语"
)
private
String
adSlogan
;
@ApiModelProperty
(
"封面"
)
@ApiModelProperty
(
"封面"
)
private
String
cover
;
private
String
img
;
@ApiModelProperty
(
"简介"
)
@ApiModelProperty
(
"简介"
)
private
String
synopsis
;
private
String
synopsis
;
@ApiModelProperty
(
"定价 元"
)
@ApiModelProperty
(
"定价 元"
)
private
BigDecimal
price
;
private
BigDecimal
price
;
@ApiModelProperty
(
"售价 元"
)
@ApiModelProperty
(
"售价 元"
)
private
BigDecimal
realPrice
;
private
BigDecimal
realPrice
;
@ApiModelProperty
(
"
关键词
"
)
@ApiModelProperty
(
"
售价选项 0 免费,1收费
"
)
private
String
keywords
;
private
Integer
priceOption
;
@ApiModelProperty
(
"状态:0待审核,1已上架,2已下架"
)
@ApiModelProperty
(
"状态:0待审核,1已上架,2已下架"
)
private
Integer
status
;
private
Integer
status
;
@ApiModelProperty
(
"资源类型"
)
private
Integer
resourceType
;
@ApiModelProperty
(
"授权时间"
)
private
Date
authorizationTime
;
@ApiModelProperty
(
"上传时间"
)
@ApiModelProperty
(
"上传时间"
)
private
Date
uploadTime
;
private
Date
uploadTime
;
@ApiModelProperty
(
"更新时间"
)
@ApiModelProperty
(
"更新时间"
)
private
Date
updateTime
;
private
Date
updateTime
;
@ApiModelProperty
(
"播放次数"
)
private
Integer
clickNum
;
@ApiModelProperty
(
"浏览数量"
)
@ApiModelProperty
(
"浏览数量"
)
private
Integer
browseNum
;
private
Integer
browseNum
;
@ApiModelProperty
(
"销量"
)
@ApiModelProperty
(
"销量"
)
private
Integer
salesNum
;
private
Integer
salesNum
;
@ApiModelProperty
(
"
售价选项 0 免费,1收费
"
)
@ApiModelProperty
(
"
资源类型
"
)
private
Integer
priceOption
;
private
Integer
resourceType
;
}
}
app/resource/src/main/java/com/zrqx/resource/commons/model/videolibrary/VideoLibrary.java
浏览文件 @
eb364cf0
...
@@ -23,58 +23,50 @@ public class VideoLibrary {
...
@@ -23,58 +23,50 @@ public class VideoLibrary {
private
String
id
;
private
String
id
;
@ApiModelProperty
(
value
=
"视频名称"
)
@ApiModelProperty
(
value
=
"视频名称"
)
private
String
name
;
private
String
name
;
@ApiModelProperty
(
"来源"
)
@ApiModelProperty
(
"作者id"
)
private
String
source
;
private
String
authorId
;
@ApiModelProperty
(
"关键词"
)
@ApiModelProperty
(
"作者"
)
private
String
keywords
;
private
String
author
;
@ApiModelProperty
(
"定价"
)
@ApiModelProperty
(
"广告语"
)
private
BigDecimal
price
;
private
String
adSlogan
;
@ApiModelProperty
(
"售价"
)
@ApiModelProperty
(
"封面"
)
private
BigDecimal
realPrice
;
private
String
img
;
@ApiModelProperty
(
"时长"
)
@ApiModelProperty
(
"默认封面"
)
private
String
timeLength
;
private
String
defaultImg
;
@ApiModelProperty
(
"文件大小"
)
private
String
size
;
@ApiModelProperty
(
"简介"
)
@ApiModelProperty
(
"简介"
)
private
String
synopsis
;
private
String
synopsis
;
@ApiModelProperty
(
"文本"
)
private
String
text
;
@ApiModelProperty
(
"video"
)
@ApiModelProperty
(
"video"
)
private
String
video
;
private
String
video
;
@ApiModelProperty
(
"正文"
)
@ApiModelProperty
(
"video名称"
)
private
String
text
;
private
String
videoName
;
@ApiModelProperty
(
"图书id"
)
@ApiModelProperty
(
"时长"
)
private
Integer
bookId
;
private
String
timeLength
;
@ApiModelProperty
(
"资源类型"
)
@ApiModelProperty
(
"文件大小"
)
private
Integer
resourceType
;
private
String
size
;
@ApiModelProperty
(
"图书名称"
)
@ApiModelProperty
(
"销售方式"
)
private
String
bookName
;
private
Integer
salesType
;
@ApiModelProperty
(
"状态:0已录入,1已上架,2已下架"
)
@ApiModelProperty
(
"售价选项 0 免费,1收费"
)
private
Integer
priceOption
;
@ApiModelProperty
(
"定价"
)
private
BigDecimal
price
;
@ApiModelProperty
(
"售价"
)
private
BigDecimal
realPrice
;
@ApiModelProperty
(
"状态:1已上架,2已下架"
)
private
Integer
status
;
private
Integer
status
;
@ApiModelProperty
(
"上传时间"
)
@ApiModelProperty
(
"上传时间"
)
private
Date
uploadTime
;
private
Date
uploadTime
;
@ApiModelProperty
(
"更新时间"
)
@ApiModelProperty
(
"更新时间"
)
private
Date
updateTime
;
private
Date
updateTime
;
@ApiModelProperty
(
"民族 1蒙古族 2侗族 3藏族 4朝鲜族 5土家族 6回族 7满族 8汉族"
)
private
Integer
nationsType
;
@ApiModelProperty
(
"课程Id"
)
@ApiModelProperty
(
"课程Id"
)
private
Integer
courseId
;
private
String
courseId
;
@ApiModelProperty
(
"播放数"
)
private
Integer
clickNum
;
@ApiModelProperty
(
value
=
"销量"
)
private
Integer
salesNum
;
@ApiModelProperty
(
"封面"
)
private
String
cover
;
@ApiModelProperty
(
"浏览数量"
)
@ApiModelProperty
(
"浏览数量"
)
private
Integer
browseNum
;
private
Integer
browseNum
;
@ApiModelProperty
(
"作者id"
)
@ApiModelProperty
(
"销量"
)
private
String
authorId
;
private
Integer
salesNum
;
@ApiModelProperty
(
"作者"
)
@ApiModelProperty
(
"排序"
)
private
String
author
;
private
Integer
sort
;
@ApiModelProperty
(
"全文阅读权限 0 游客可见 1会员可见"
)
@ApiModelProperty
(
"资源类型"
)
private
Integer
readTextPower
;
private
Integer
resourceType
;
@ApiModelProperty
(
"格式"
)
private
String
formats
;
@ApiModelProperty
(
"售价选项 0 免费,1收费"
)
private
Integer
priceOption
;
@ApiModelProperty
(
"video名称"
)
private
String
videoName
;
}
}
app/resource/src/main/java/com/zrqx/resource/commons/vo/bg/courselibrary/CourseLibraryListVO.java
浏览文件 @
eb364cf0
...
@@ -16,37 +16,19 @@ public class CourseLibraryListVO {
...
@@ -16,37 +16,19 @@ public class CourseLibraryListVO {
private
String
id
;
private
String
id
;
@ApiModelProperty
(
"资源名称"
)
@ApiModelProperty
(
"资源名称"
)
private
String
name
;
private
String
name
;
@ApiModelProperty
(
"讲师"
)
private
String
author
;
@ApiModelProperty
(
"讲师id"
)
private
String
authorId
;
@ApiModelProperty
(
"来源"
)
private
String
source
;
@ApiModelProperty
(
"封面"
)
@ApiModelProperty
(
"封面"
)
private
String
cover
;
private
String
img
;
@ApiModelProperty
(
"简介"
)
private
String
synopsis
;
@ApiModelProperty
(
"定价 元"
)
private
String
price
;
@ApiModelProperty
(
"售价 元"
)
@ApiModelProperty
(
"售价 元"
)
private
String
realPrice
;
private
String
realPrice
;
@ApiModelProperty
(
"视频数量"
)
private
Integer
videoNum
;
@ApiModelProperty
(
"上传时间"
)
private
String
uploadTime
;
@ApiModelProperty
(
"状态:0已录入,1已上架,2已下架"
)
@ApiModelProperty
(
"状态:0已录入,1已上架,2已下架"
)
private
Integer
status
;
private
Integer
status
;
@ApiModelProperty
(
"状态:0已录入,1已上架,2已下架"
)
@ApiModelProperty
(
"状态:0已录入,1已上架,2已下架"
)
private
String
status_zh
;
private
String
status_zh
;
@ApiModelProperty
(
"资源类型"
)
@ApiModelProperty
(
"资源类型"
)
private
Integer
resourceType
;
private
Integer
resourceType
;
@ApiModelProperty
(
"授权时间"
)
private
Date
authorizationTime
;
@ApiModelProperty
(
"上传时间"
)
private
Date
uploadTime
;
@ApiModelProperty
(
"更新时间"
)
private
Date
updateTime
;
@ApiModelProperty
(
"播放次数"
)
private
Integer
clickNum
;
@ApiModelProperty
(
"浏览数量"
)
private
Integer
browseNum
;
@ApiModelProperty
(
"视频数量"
)
private
Integer
videoNum
;
}
}
app/resource/src/main/java/com/zrqx/resource/commons/vo/bg/courselibrary/CourseLibraryVO.java
浏览文件 @
eb364cf0
package
com
.
zrqx
.
resource
.
commons
.
vo
.
bg
.
courselibrary
;
package
com
.
zrqx
.
resource
.
commons
.
vo
.
bg
.
courselibrary
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
com.zrqx.resource.commons.model.courcelibrary.CourseLibraryDiyType
;
import
com.zrqx.resource.commons.model.courcelibrary.CourseLibraryDiyType
;
import
com.zrqx.resource.commons.model.courcelibrary.CourseLibraryLabelContentDiyType
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -16,41 +14,35 @@ import lombok.Data;
...
@@ -16,41 +14,35 @@ import lombok.Data;
public
class
CourseLibraryVO
{
public
class
CourseLibraryVO
{
@ApiModelProperty
(
"课程id,新增时不需要填写"
)
@ApiModelProperty
(
"课程id,新增时不需要填写"
)
private
String
id
;
private
String
id
;
@ApiModelProperty
(
"
课程
名称"
)
@ApiModelProperty
(
"
资源
名称"
)
private
String
name
;
private
String
name
;
@ApiModelProperty
(
"封面"
)
@ApiModelProperty
(
"讲师"
)
private
String
cover
;
@ApiModelProperty
(
"课程简介"
)
private
String
synopsis
;
@ApiModelProperty
(
"状态 0下线,1上线"
)
private
Integer
status
;
@ApiModelProperty
(
"授权时间"
)
private
Date
authorizationTime
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
"创建时间"
)
private
Date
uploadTime
;
@ApiModelProperty
(
"作者"
)
private
String
author
;
private
String
author
;
@ApiModelProperty
(
"
作者
id"
)
@ApiModelProperty
(
"
讲师
id"
)
private
String
authorId
;
private
String
authorId
;
@ApiModelProperty
(
value
=
"
作者
名称和id(用,隔开)"
)
@ApiModelProperty
(
value
=
"
讲师
名称和id(用,隔开)"
)
private
String
authorNameAndId
;
private
String
authorNameAndId
;
@ApiModelProperty
(
"浏览数量"
)
@ApiModelProperty
(
"总期数"
)
private
Integer
browseNum
;
private
Integer
totalPeriods
;
@ApiModelProperty
(
"广告语"
)
private
String
adSlogan
;
@ApiModelProperty
(
value
=
"分类"
)
private
List
<
CourseLibraryDiyType
>
diyType
;
@ApiModelProperty
(
"封面"
)
private
String
img
;
@ApiModelProperty
(
"简介"
)
private
String
synopsis
;
@ApiModelProperty
(
"定价 元"
)
@ApiModelProperty
(
"定价 元"
)
private
String
price
;
private
String
price
;
@ApiModelProperty
(
"售价 元"
)
@ApiModelProperty
(
"售价 元"
)
private
String
realPrice
;
private
String
realPrice
;
@ApiModelProperty
(
"售价选项 0 免费,1收费"
)
@ApiModelProperty
(
"售价选项 0 免费,1收费"
)
private
Integer
priceOption
;
private
Integer
priceOption
;
@ApiModelProperty
(
"关键词"
)
@ApiModelProperty
(
"状态:0待审核,1已上架,2已下架"
)
private
String
keywords
;
private
Integer
status
;
@ApiModelProperty
(
"来源"
)
@ApiModelProperty
(
"资源类型"
)
private
String
source
;
private
Integer
resourceType
;
@ApiModelProperty
(
value
=
"分类id"
)
@ApiModelProperty
(
"浏览数量"
)
private
List
<
CourseLibraryDiyType
>
diyType
;
private
Integer
browseNum
;
@ApiModelProperty
(
value
=
"标签id"
)
private
List
<
CourseLibraryLabelContentDiyType
>
label
;
@ApiModelProperty
(
value
=
"标签内容id"
)
private
List
<
Integer
>
labelContentDiyTypeIds
;
}
}
app/resource/src/main/java/com/zrqx/resource/commons/vo/bg/videolibrary/VideoLibraryListVO.java
浏览文件 @
eb364cf0
...
@@ -13,22 +13,22 @@ public class VideoLibraryListVO {
...
@@ -13,22 +13,22 @@ public class VideoLibraryListVO {
private
String
id
;
private
String
id
;
@ApiModelProperty
(
value
=
"资源名称"
)
@ApiModelProperty
(
value
=
"资源名称"
)
private
String
name
;
private
String
name
;
@ApiModelProperty
(
"来源
"
)
@ApiModelProperty
(
value
=
"讲师
"
)
private
String
source
;
private
String
author
;
@ApiModelProperty
(
"售价"
)
@ApiModelProperty
(
"售价"
)
private
String
realPrice
;
private
String
realPrice
;
@ApiModelProperty
(
"上传时间"
)
@ApiModelProperty
(
"上传时间"
)
private
Date
uploadTime
;
private
String
uploadTime
;
@ApiModelProperty
(
"时长"
)
@ApiModelProperty
(
"状态:1已上架,2已下架"
)
private
String
timeLength
;
private
Integer
status
;
@ApiModelProperty
(
"大小"
)
@ApiModelProperty
(
"状态:1已上架,2已下架"
)
private
String
size
;
@ApiModelProperty
(
"状态:0待审核,1已上架,2已下架"
)
private
String
status
;
@ApiModelProperty
(
"状态:0待审核,1已上架,2已下架"
)
private
String
status_zh
;
private
String
status_zh
;
@ApiModelProperty
(
"作者"
)
private
String
author
;
@ApiModelProperty
(
"封面图片"
)
@ApiModelProperty
(
"封面图片"
)
private
String
cover
;
private
String
img
;
@ApiModelProperty
(
"默认封面"
)
private
String
defautImg
;
@ApiModelProperty
(
value
=
"时长"
)
private
String
timeLength
;
@ApiModelProperty
(
value
=
"排序"
)
private
Integer
sort
;
}
}
app/resource/src/main/java/com/zrqx/resource/commons/vo/bg/videolibrary/VideoLibraryOneVO.java
浏览文件 @
eb364cf0
package
com
.
zrqx
.
resource
.
commons
.
vo
.
bg
.
videolibrary
;
package
com
.
zrqx
.
resource
.
commons
.
vo
.
bg
.
videolibrary
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.List
;
import
com.zrqx.resource.commons.model.videolibrary.VideoLibraryDiyType
;
import
com.zrqx.resource.commons.model.videolibrary.VideoLibraryDiyType
;
import
com.zrqx.resource.commons.model.videolibrary.VideoLibraryLabelContentDiyType
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -11,42 +11,41 @@ import lombok.Data;
...
@@ -11,42 +11,41 @@ import lombok.Data;
@Data
@Data
@ApiModel
(
value
=
"VideoLibraryOneVO"
,
description
=
"单个查询视频返回的实体"
)
@ApiModel
(
value
=
"VideoLibraryOneVO"
,
description
=
"单个查询视频返回的实体"
)
public
class
VideoLibraryOneVO
{
public
class
VideoLibraryOneVO
{
@ApiModelProperty
(
"视频id"
)
@ApiModelProperty
(
"视频id
,新增时不需要填写
"
)
private
String
id
;
private
String
id
;
@ApiModelProperty
(
value
=
"视频
标题
"
)
@ApiModelProperty
(
value
=
"视频
名称
"
)
private
String
name
;
private
String
name
;
@ApiModelProperty
(
"来源"
)
@ApiModelProperty
(
value
=
"作者名称和id(用,隔开)"
)
private
String
source
;
private
String
authorNameAndId
;
@ApiModelProperty
(
"关键词"
)
private
String
keywords
;
@ApiModelProperty
(
"定价"
)
private
String
price
;
@ApiModelProperty
(
"售价"
)
private
String
realPrice
;
@ApiModelProperty
(
"简介"
)
private
String
synopsis
;
@ApiModelProperty
(
"正文"
)
private
String
text
;
@ApiModelProperty
(
"video"
)
private
String
video
;
@ApiModelProperty
(
"封面"
)
private
String
cover
;
@ApiModelProperty
(
"作者id"
)
@ApiModelProperty
(
"作者id"
)
private
String
authorId
;
private
String
authorId
;
@ApiModelProperty
(
"作者"
)
@ApiModelProperty
(
"作者"
)
private
String
author
;
private
String
author
;
@ApiModelProperty
(
"广告语"
)
private
String
adSlogan
;
@ApiModelProperty
(
value
=
"分类id"
)
@ApiModelProperty
(
value
=
"分类id"
)
private
List
<
VideoLibraryDiyType
>
diyType
;
private
List
<
VideoLibraryDiyType
>
diyType
;
@ApiModelProperty
(
value
=
"标签id
"
)
@ApiModelProperty
(
"封面
"
)
private
List
<
VideoLibraryLabelContentDiyType
>
label
;
private
String
cover
;
@ApiModelProperty
(
value
=
"标签内容id
"
)
@ApiModelProperty
(
"简介
"
)
private
List
<
Integer
>
labelContentDiyTypeId
s
;
private
String
synopsi
s
;
@ApiModelProperty
(
"
售价选项 0 免费,1收费
"
)
@ApiModelProperty
(
"
文本
"
)
private
Integer
priceOption
;
private
String
text
;
@ApiModelProperty
(
"
全文阅读权限 0 游客可见 1会员可见
"
)
@ApiModelProperty
(
"
video
"
)
private
Integer
readTextPower
;
private
String
video
;
@ApiModelProperty
(
"video名称"
)
@ApiModelProperty
(
"video名称"
)
private
String
videoName
;
private
String
videoName
;
@ApiModelProperty
(
value
=
"作者名称和id(用,隔开)"
)
@ApiModelProperty
(
"时长"
)
private
String
authorNameAndId
;
private
String
timeLength
;
@ApiModelProperty
(
"文件大小"
)
private
String
size
;
@ApiModelProperty
(
"销售方式"
)
private
Integer
salesType
;
@ApiModelProperty
(
"售价选项 0 免费,1收费"
)
private
Integer
priceOption
;
@ApiModelProperty
(
"定价"
)
private
String
price
;
@ApiModelProperty
(
"售价"
)
private
String
realPrice
;
}
}
app/resource/src/main/java/com/zrqx/resource/fg/controller/resourcelibrary/FgResourceLibraryController.java
浏览文件 @
eb364cf0
...
@@ -671,7 +671,7 @@ public class FgResourceLibraryController {
...
@@ -671,7 +671,7 @@ public class FgResourceLibraryController {
orderInfo
.
setPrice
(
entity
.
getPrice
());
orderInfo
.
setPrice
(
entity
.
getPrice
());
}
}
orderInfo
.
setSalePrice
(
entity
.
getRealPrice
());
orderInfo
.
setSalePrice
(
entity
.
getRealPrice
());
orderInfo
.
setCover
(
entity
.
get
Cover
());
orderInfo
.
setCover
(
entity
.
get
Img
());
//获取分类编号
//获取分类编号
VideoLibraryDiyType
alrt
=
new
VideoLibraryDiyType
();
VideoLibraryDiyType
alrt
=
new
VideoLibraryDiyType
();
alrt
.
setVlId
(
entity
.
getId
());
alrt
.
setVlId
(
entity
.
getId
());
...
@@ -707,7 +707,7 @@ public class FgResourceLibraryController {
...
@@ -707,7 +707,7 @@ public class FgResourceLibraryController {
orderInfo
.
setPrice
(
entity
.
getPrice
());
orderInfo
.
setPrice
(
entity
.
getPrice
());
}
}
orderInfo
.
setSalePrice
(
entity
.
getRealPrice
());
orderInfo
.
setSalePrice
(
entity
.
getRealPrice
());
orderInfo
.
setCover
(
entity
.
get
Cover
());
orderInfo
.
setCover
(
entity
.
get
Img
());
//获取分类编号
//获取分类编号
CourseLibraryDiyType
alrt
=
new
CourseLibraryDiyType
();
CourseLibraryDiyType
alrt
=
new
CourseLibraryDiyType
();
alrt
.
setCourseLibraryId
(
entity
.
getId
());
alrt
.
setCourseLibraryId
(
entity
.
getId
());
...
@@ -801,8 +801,8 @@ public class FgResourceLibraryController {
...
@@ -801,8 +801,8 @@ public class FgResourceLibraryController {
VideoLibrary
entity
=
videoLibraryService
.
selectByPrimaryKey
(
id
);
VideoLibrary
entity
=
videoLibraryService
.
selectByPrimaryKey
(
id
);
vo
.
setAuthor
(
entity
.
getAuthor
());
vo
.
setAuthor
(
entity
.
getAuthor
());
vo
.
setAuthorId
(
entity
.
getAuthorId
());
vo
.
setAuthorId
(
entity
.
getAuthorId
());
vo
.
setCover
(
entity
.
get
Cover
());
vo
.
setCover
(
entity
.
get
Img
());
vo
.
setSource
(
entity
.
getSource
());
//
vo.setSource(entity.getSource());
vo
.
setSummary
(
removeLabel
(
entity
.
getSynopsis
()));
vo
.
setSummary
(
removeLabel
(
entity
.
getSynopsis
()));
return
CallBack
.
success
(
vo
);
return
CallBack
.
success
(
vo
);
}
}
...
@@ -811,8 +811,8 @@ public class FgResourceLibraryController {
...
@@ -811,8 +811,8 @@ public class FgResourceLibraryController {
CourseLibrary
entity
=
courseLibraryService
.
selectByPrimaryKey
(
id
);
CourseLibrary
entity
=
courseLibraryService
.
selectByPrimaryKey
(
id
);
vo
.
setAuthor
(
entity
.
getAuthor
());
vo
.
setAuthor
(
entity
.
getAuthor
());
vo
.
setAuthorId
(
entity
.
getAuthorId
());
vo
.
setAuthorId
(
entity
.
getAuthorId
());
vo
.
setCover
(
entity
.
get
Cover
());
vo
.
setCover
(
entity
.
get
Img
());
vo
.
setSource
(
entity
.
getSource
());
//
vo.setSource(entity.getSource());
vo
.
setSummary
(
removeLabel
(
entity
.
getSynopsis
()));
vo
.
setSummary
(
removeLabel
(
entity
.
getSynopsis
()));
return
CallBack
.
success
(
vo
);
return
CallBack
.
success
(
vo
);
}
}
...
...
app/resource/src/main/java/com/zrqx/resource/fg/controller/videolibrary/FgVideoLibraryController.java
浏览文件 @
eb364cf0
...
@@ -155,26 +155,6 @@ public class FgVideoLibraryController {
...
@@ -155,26 +155,6 @@ public class FgVideoLibraryController {
return
input
;
return
input
;
}
}
@ApiOperation
(
"更新播放数"
)
@PostMapping
(
"/update/video-library"
)
public
CallBack
<
Boolean
>
updateDownloadNum
(
@RequestBody
String
fileName
)
{
boolean
b
=
false
;
VideoLibrary
videoLibraryOne
=
new
VideoLibrary
();
videoLibraryOne
.
setVideo
(
fileName
);
List
<
VideoLibrary
>
video
=
service
.
select
(
videoLibraryOne
);
if
(!
video
.
isEmpty
()){
for
(
VideoLibrary
videoLibrary
:
video
)
{
if
(
videoLibrary
.
getClickNum
()
==
null
){
videoLibrary
.
setClickNum
(
1
);
}
else
{
videoLibrary
.
setClickNum
(
videoLibrary
.
getClickNum
()
+
1
);
}
b
=
service
.
updateByPrimaryKeySelective
(
videoLibrary
);
}
}
return
CallBack
.
success
(
b
);
}
@ApiOperation
(
value
=
"查询视频全部信息(跨服务调用)"
,
notes
=
"根据ID查询"
)
@ApiOperation
(
value
=
"查询视频全部信息(跨服务调用)"
,
notes
=
"根据ID查询"
)
@GetMapping
(
value
=
"/{oid}"
)
@GetMapping
(
value
=
"/{oid}"
)
public
CallBack
<
VideoLibrary
>
getOneById
(
@PathVariable
String
oid
)
{
public
CallBack
<
VideoLibrary
>
getOneById
(
@PathVariable
String
oid
)
{
...
...
app/resource/src/main/java/com/zrqx/resource/fg/manage/resourcelibrary/FgResourceManageImpl.java
浏览文件 @
eb364cf0
...
@@ -204,7 +204,7 @@ public class FgResourceManageImpl implements FgResourceManage{
...
@@ -204,7 +204,7 @@ public class FgResourceManageImpl implements FgResourceManage{
infoVo
.
setPrice
(
entity
.
getPrice
());
infoVo
.
setPrice
(
entity
.
getPrice
());
}
}
infoVo
.
setSalePrice
(
entity
.
getRealPrice
());
infoVo
.
setSalePrice
(
entity
.
getRealPrice
());
infoVo
.
setCover
(
entity
.
get
Cover
());
infoVo
.
setCover
(
entity
.
get
Img
());
if
(
entity
.
getStatus
().
equals
(
LibraryStatusEnum
.
STATUS_1
.
getCode
())){
if
(
entity
.
getStatus
().
equals
(
LibraryStatusEnum
.
STATUS_1
.
getCode
())){
infoVo
.
setBookStatus
(
Integer
.
parseInt
(
BooleanStatusEnum
.
YES
.
getCode
()));
infoVo
.
setBookStatus
(
Integer
.
parseInt
(
BooleanStatusEnum
.
YES
.
getCode
()));
infoVo
.
setBookStatusZh
(
LibraryStatusEnum
.
STATUS_1
.
getName
());
infoVo
.
setBookStatusZh
(
LibraryStatusEnum
.
STATUS_1
.
getName
());
...
...
app/resource/src/main/java/com/zrqx/resource/fg/service/FgResourceRelationServiceImpl.java
浏览文件 @
eb364cf0
...
@@ -151,7 +151,7 @@ public class FgResourceRelationServiceImpl extends BaseServiceImpl<ResourceRelat
...
@@ -151,7 +151,7 @@ public class FgResourceRelationServiceImpl extends BaseServiceImpl<ResourceRelat
VideoLibrary
sc
=
videoLibraryMapper
.
selectByPrimaryKey
(
e
.
getResourceId
());
VideoLibrary
sc
=
videoLibraryMapper
.
selectByPrimaryKey
(
e
.
getResourceId
());
if
(
sc
!=
null
)
{
if
(
sc
!=
null
)
{
e
.
setName
(
sc
.
getName
());
e
.
setName
(
sc
.
getName
());
e
.
setCover
(
sc
.
get
Cover
());
e
.
setCover
(
sc
.
get
Img
());
e
.
setAuthor
(
sc
.
getAuthor
());
e
.
setAuthor
(
sc
.
getAuthor
());
e
.
setRealPrice
(
sc
.
getRealPrice
()
+
""
);
e
.
setRealPrice
(
sc
.
getRealPrice
()
+
""
);
e
.
setTimeLength
(
sc
.
getTimeLength
());
e
.
setTimeLength
(
sc
.
getTimeLength
());
...
@@ -178,7 +178,7 @@ public class FgResourceRelationServiceImpl extends BaseServiceImpl<ResourceRelat
...
@@ -178,7 +178,7 @@ public class FgResourceRelationServiceImpl extends BaseServiceImpl<ResourceRelat
CourseLibrary
sc
=
courseLibraryMapper
.
selectByPrimaryKey
(
e
.
getResourceId
());
CourseLibrary
sc
=
courseLibraryMapper
.
selectByPrimaryKey
(
e
.
getResourceId
());
if
(
sc
!=
null
)
{
if
(
sc
!=
null
)
{
e
.
setName
(
sc
.
getName
());
e
.
setName
(
sc
.
getName
());
e
.
setCover
(
sc
.
get
Cover
());
e
.
setCover
(
sc
.
get
Img
());
e
.
setAuthor
(
sc
.
getAuthor
());
e
.
setAuthor
(
sc
.
getAuthor
());
e
.
setRealPrice
(
sc
.
getRealPrice
()
+
""
);
e
.
setRealPrice
(
sc
.
getRealPrice
()
+
""
);
/*if(StringUtils.isNotBlank(sc.getSynopsis())){
/*if(StringUtils.isNotBlank(sc.getSynopsis())){
...
...
app/resource/src/main/java/com/zrqx/resource/fg/service/courselibrary/FgCourseLibrarySerivceImpl.java
浏览文件 @
eb364cf0
...
@@ -120,12 +120,12 @@ public class FgCourseLibrarySerivceImpl extends
...
@@ -120,12 +120,12 @@ public class FgCourseLibrarySerivceImpl extends
Integer
num
=
CourseLibrary
.
getBrowseNum
();
Integer
num
=
CourseLibrary
.
getBrowseNum
();
num
+=
1
;
num
+=
1
;
CourseLibrary
.
setBrowseNum
(
num
);
CourseLibrary
.
setBrowseNum
(
num
);
if
(
CourseLibrary
.
get
Click
Num
()
==
null
){
if
(
CourseLibrary
.
get
Browse
Num
()
==
null
){
CourseLibrary
.
set
ClickNum
(
5
0
);
CourseLibrary
.
set
BrowseNum
(
0
);
}
}
Integer
clickNum
=
CourseLibrary
.
get
Click
Num
();
Integer
clickNum
=
CourseLibrary
.
get
Browse
Num
();
clickNum
+=
1
;
clickNum
+=
1
;
CourseLibrary
.
set
Click
Num
(
clickNum
);
CourseLibrary
.
set
Browse
Num
(
clickNum
);
mapper
.
updateByPrimaryKeySelective
(
CourseLibrary
);
mapper
.
updateByPrimaryKeySelective
(
CourseLibrary
);
return
true
;
return
true
;
}
}
...
...
app/resource/src/main/java/com/zrqx/resource/fg/service/record/FgRecordServiceImpl.java
浏览文件 @
eb364cf0
...
@@ -171,9 +171,8 @@ public class FgRecordServiceImpl extends BaseServiceImpl<Record, Integer>
...
@@ -171,9 +171,8 @@ public class FgRecordServiceImpl extends BaseServiceImpl<Record, Integer>
VideoLibrary
videoLibrary
=
videoLibraryMapper
.
selectByPrimaryKey
(
vo
.
getGoodsId
());
VideoLibrary
videoLibrary
=
videoLibraryMapper
.
selectByPrimaryKey
(
vo
.
getGoodsId
());
if
(
videoLibrary
!=
null
){
if
(
videoLibrary
!=
null
){
vo
.
setName
(
videoLibrary
.
getName
());
vo
.
setName
(
videoLibrary
.
getName
());
vo
.
setImg
(
videoLibrary
.
get
Cover
());
vo
.
setImg
(
videoLibrary
.
get
Img
());
vo
.
setText
(
videoLibrary
.
getSynopsis
());
vo
.
setText
(
videoLibrary
.
getSynopsis
());
vo
.
setSource
(
videoLibrary
.
getSource
());
}
}
}
}
//音频
//音频
...
@@ -204,9 +203,8 @@ public class FgRecordServiceImpl extends BaseServiceImpl<Record, Integer>
...
@@ -204,9 +203,8 @@ public class FgRecordServiceImpl extends BaseServiceImpl<Record, Integer>
CourseLibrary
courseLibrary
=
courseLibraryMapper
.
selectByPrimaryKey
(
vo
.
getGoodsId
());
CourseLibrary
courseLibrary
=
courseLibraryMapper
.
selectByPrimaryKey
(
vo
.
getGoodsId
());
if
(
courseLibrary
!=
null
){
if
(
courseLibrary
!=
null
){
vo
.
setName
(
courseLibrary
.
getName
());
vo
.
setName
(
courseLibrary
.
getName
());
vo
.
setImg
(
courseLibrary
.
get
Cover
());
vo
.
setImg
(
courseLibrary
.
get
Img
());
vo
.
setText
(
courseLibrary
.
getSynopsis
());
vo
.
setText
(
courseLibrary
.
getSynopsis
());
vo
.
setSource
(
courseLibrary
.
getSource
());
vo
.
setAuthor
(
courseLibrary
.
getAuthor
());
vo
.
setAuthor
(
courseLibrary
.
getAuthor
());
}
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论