Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
master-5.0
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
master-5.0
Commits
89dbd7bf
提交
89dbd7bf
authored
12月 19, 2019
作者:
chaoyanjun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
b1d12603
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
11 行增加
和
10 行删除
+11
-10
LiveController.java
...main/java/com/zrqx/live/bg/controller/LiveController.java
+5
-8
LiveImageForm.java
...c/main/java/com/zrqx/live/commons/form/LiveImageForm.java
+6
-2
没有找到文件。
app/live/src/main/java/com/zrqx/live/bg/controller/LiveController.java
浏览文件 @
89dbd7bf
...
...
@@ -19,7 +19,9 @@ import org.springframework.web.bind.annotation.GetMapping;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
...
...
@@ -60,7 +62,7 @@ public class LiveController {
@ApiOperation
(
value
=
"创建直播"
)
@PostMapping
(
value
=
"/save"
)
public
CallBack
<
String
>
save
(
@RequestBody
SaveOrUpdateLiveForm
entity
,
HttpServletRequest
request
){
public
CallBack
<
String
>
save
(
@RequestBody
SaveOrUpdateLiveForm
entity
,
@RequestParam
(
"image"
)
MultipartFile
image
,
@RequestParam
(
"file"
)
MultipartFile
file
){
Live
live
=
new
Live
();
BeanUtils
.
copyProperties
(
entity
,
live
);
live
.
setLiveTime
(
Timestamp
.
valueOf
(
entity
.
getLiveTime
()).
getTime
()/
1000
);
...
...
@@ -85,13 +87,8 @@ public class LiveController {
liveService
.
updateByPrimaryKeySelective
(
live
);
LiveImageForm
f
=
new
LiveImageForm
();
f
.
setWebinar_id
(
Integer
.
parseInt
(
data
));
try
{
Map
<
String
,
String
>
map
=
HttpsUtils
.
reciveImageAndParams
(
request
);
f
.
setMap
(
map
);
}
catch
(
Exception
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
f
.
setImage
(
image
);
f
.
setFile
(
file
);
// 设置直播封面
MicroRoarReturn
create
=
create
(
f
,
"image"
);
if
(
"200"
.
equals
(
create
.
getCode
()))
{
...
...
app/live/src/main/java/com/zrqx/live/commons/form/LiveImageForm.java
浏览文件 @
89dbd7bf
...
...
@@ -2,6 +2,8 @@ package com.zrqx.live.commons.form;
import
java.util.Map
;
import
org.springframework.web.multipart.MultipartFile
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -14,6 +16,8 @@ public class LiveImageForm {
@ApiModelProperty
(
"直播id"
)
private
Integer
webinar_id
;
@ApiModelProperty
(
"文件/图片流"
)
private
Map
<
String
,
String
>
map
;
@ApiModelProperty
(
"图片流"
)
private
MultipartFile
file
;
@ApiModelProperty
(
"图片流"
)
private
MultipartFile
image
;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论