Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
szsy
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
szsy
Commits
8481cbe6
提交
8481cbe6
authored
11月 10, 2020
作者:
renjiancai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
c575687e
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
36 行增加
和
11 行删除
+36
-11
VideoLibraryController.java
...ce/bg/controller/videolibrary/VideoLibraryController.java
+1
-1
PublishMapper.java
...va/com/zrqx/resource/bg/mapper/publish/PublishMapper.java
+1
-1
EbookServiceImpl.java
.../com/zrqx/resource/bg/service/ebook/EbookServiceImpl.java
+0
-2
VideoLibrarySerivceImpl.java
...urce/bg/service/videolibrary/VideoLibrarySerivceImpl.java
+23
-0
CourseLibrary.java
...x/resource/commons/model/courcelibrary/CourseLibrary.java
+4
-0
Book.java
...main/java/com/zrqx/resource/commons/model/ebook/Book.java
+2
-5
VideoLibrary.java
...rqx/resource/commons/model/videolibrary/VideoLibrary.java
+3
-0
ExcelVideoImportVo.java
...source/commons/vo/bg/videolibrary/ExcelVideoImportVo.java
+2
-2
没有找到文件。
app/resource/src/main/java/com/zrqx/resource/bg/controller/videolibrary/VideoLibraryController.java
浏览文件 @
8481cbe6
...
...
@@ -231,7 +231,7 @@ public class VideoLibraryController {
public
CallBack
<
PageInfo
<
VideoLibraryListVO
>>
livePage
(
QueryVideoLibraryForm
form
,
PageParam
pageParam
){
return
CallBack
.
success
(
service
.
livePage
(
form
,
pageParam
));
}
@ApiOperation
(
"导入元数据"
)
@ApiOperation
(
"导入元数据
Excel
"
)
@PostMapping
(
value
=
"/importExcel"
)
public
CallBack
<?>
importVideo
(
@RequestParam
(
"file"
)
MultipartFile
file
)
throws
Exception
{
ImportLabelVo
vo
=
service
.
importLabelExcel
(
file
);
...
...
app/resource/src/main/java/com/zrqx/resource/bg/mapper/publish/PublishMapper.java
浏览文件 @
8481cbe6
...
...
@@ -23,7 +23,7 @@ public interface PublishMapper extends BaseMapper<Publish> {
@Select
(
"<script>"
+
"select * FROM res_publish where 1 = 1 "
+
"<if test='"
+
NOTBLANK
+
"(form.name)'>"
+
"and (name like concat('%',#{form.name}
) or school like concat('%',#{form.name}) or materialName like concat('%',#{form.name}
))"
+
"and (name like concat('%',#{form.name}
,'%') or school like concat('%',#{form.name}) or materialName like concat('%',#{form.name},'%'
))"
+
"</if>"
+
"</script>"
)
List
<
Publish
>
page
(
@Param
(
"form"
)
PublishForm
form
);
...
...
app/resource/src/main/java/com/zrqx/resource/bg/service/ebook/EbookServiceImpl.java
浏览文件 @
8481cbe6
...
...
@@ -14,13 +14,11 @@ import org.springframework.web.multipart.MultipartFile;
import
com.zrqx.core.client.order.bg.OrderClient
;
import
com.zrqx.core.client.statistics.bg.StatisticsClient
;
import
com.zrqx.core.client.vo.ImportLabelVo
;
import
com.zrqx.core.client.vo.resource.StatisticsResourceExprotVo
;
import
com.zrqx.core.client.vo.resource.StatisticsResourceVo
;
import
com.zrqx.core.enums.AllResourceTypeEnum
;
import
com.zrqx.core.enums.GoodsTypeEnum
;
import
com.zrqx.core.enums.resource.EbookStatusEnum
;
import
com.zrqx.core.enums.resource.PriceOptionEnum
;
import
com.zrqx.core.exception.BaseException
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.core.util.bean.BeanUtils
;
...
...
app/resource/src/main/java/com/zrqx/resource/bg/service/videolibrary/VideoLibrarySerivceImpl.java
浏览文件 @
8481cbe6
...
...
@@ -29,6 +29,8 @@ import com.zrqx.core.util.page.PageInfo;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.resource.bg.mapper.ResourceRelationMapper
;
import
com.zrqx.resource.bg.mapper.diytype.DiyTypeMapper
;
import
com.zrqx.resource.bg.mapper.ebook.BookMapper
;
import
com.zrqx.resource.bg.mapper.ebook.EbookMapper
;
import
com.zrqx.resource.bg.mapper.marketing.PromotionContentMapper
;
import
com.zrqx.resource.bg.mapper.membercollection.MemberCollectionMapper
;
import
com.zrqx.resource.bg.mapper.recommend.RecommendResourceMapper
;
...
...
@@ -42,6 +44,7 @@ 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.SaveVideoLibraryForm
;
import
com.zrqx.resource.commons.model.diytype.DiyType
;
import
com.zrqx.resource.commons.model.ebook.Book
;
import
com.zrqx.resource.commons.model.ebook.Ebook
;
import
com.zrqx.resource.commons.model.ebook.EbookDiyType
;
import
com.zrqx.resource.commons.model.membercollection.MemberCollection
;
...
...
@@ -70,6 +73,10 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,String
private
VideoLibraryDiyTypeMapper
vdrMapper
;
@Autowired
private
OrderClient
orderClient
;
@Autowired
private
BookMapper
bookMapper
;
@Autowired
private
EbookMapper
ebookMapper
;
@Autowired
private
StatisticsClient
statisticsClient
;
...
...
@@ -394,6 +401,13 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,String
VideoLibrary
b
=
new
VideoLibrary
();
BeanUtils
.
copyProperties
(
excelVideoImportVo
,
b
);
b
.
setUploadTime
(
new
Date
());
Book
book
=
bookMapper
.
getIsbn
(
excelVideoImportVo
.
getISBN
());
if
(
book
!=
null
)
{
Ebook
ebook
=
ebookMapper
.
selectByPrimaryKey
(
book
.
getId
());
if
(
ebook
!=
null
)
{
b
.
setImg
(
ebook
.
getImg
());
}
}
mapper
.
insert
(
b
);
//查询所属一级分类
DiyType
diyType
=
new
DiyType
();
...
...
@@ -411,6 +425,15 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,String
vdrMapper
.
insert
(
edt
);
}
else
{
BeanUtils
.
copyPropertiesIgnoreNotNull
(
excelVideoImportVo
,
video
,
video
);
if
(
video
.
getImg
()==
null
)
{
Book
book
=
bookMapper
.
getIsbn
(
excelVideoImportVo
.
getISBN
());
if
(
book
!=
null
)
{
Ebook
ebook
=
ebookMapper
.
selectByPrimaryKey
(
book
.
getId
());
if
(
ebook
!=
null
)
{
video
.
setImg
(
ebook
.
getImg
());
}
}
}
mapper
.
updateByPrimaryKeySelective
(
video
);
//查询所属一级分类
DiyType
diyType
=
new
DiyType
();
...
...
app/resource/src/main/java/com/zrqx/resource/commons/model/courcelibrary/CourseLibrary.java
浏览文件 @
8481cbe6
...
...
@@ -54,5 +54,9 @@ public class CourseLibrary {
private
Integer
resourceType
;
@ApiModelProperty
(
"播放次数"
)
private
Integer
clickNum
;
@ApiModelProperty
(
"置顶"
)
private
Integer
top
;
@ApiModelProperty
(
"排序"
)
private
Integer
sort
;
}
app/resource/src/main/java/com/zrqx/resource/commons/model/ebook/Book.java
浏览文件 @
8481cbe6
package
com
.
zrqx
.
resource
.
commons
.
model
.
ebook
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.Date
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
...
...
app/resource/src/main/java/com/zrqx/resource/commons/model/videolibrary/VideoLibrary.java
浏览文件 @
8481cbe6
...
...
@@ -11,6 +11,7 @@ import javax.persistence.Table;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
scala.collection.generic.BitOperations.Int
;
@Data
@ApiModel
(
value
=
"VideoLibrary"
,
description
=
"视频库"
)
@Table
(
name
=
"res_Video_Library"
)
...
...
@@ -72,4 +73,6 @@ public class VideoLibrary {
private
Integer
resourceType
;
@ApiModelProperty
(
"播放次数"
)
private
Integer
clickNum
;
@ApiModelProperty
(
"置顶"
)
private
Integer
top
;
}
app/resource/src/main/java/com/zrqx/resource/commons/vo/bg/videolibrary/ExcelVideoImportVo.java
浏览文件 @
8481cbe6
...
...
@@ -22,8 +22,8 @@ public class ExcelVideoImportVo {
@ExcelResources
(
title
=
"讲师"
)
private
String
author
;
@ExcelResources
(
title
=
"
广告语
"
)
private
String
adSlogan
;
@ExcelResources
(
title
=
"
对应图书的ISBN
"
)
private
String
ISBN
;
@ExcelResources
(
title
=
"课程一级分类"
)
private
String
diyTypeName_1
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论