Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YZG
yzg-util
Commits
95262b2f
Commit
95262b2f
authored
Nov 12, 2020
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文件处理
parent
022c826b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
170 additions
and
4 deletions
+170
-4
YzgFileMoveItemReqVo.java
...a/com/yanzuoguang/cloud/file/vo/YzgFileMoveItemReqVo.java
+16
-4
YzgFileVideoImageItemReqVo.java
...yanzuoguang/cloud/file/vo/YzgFileVideoImageItemReqVo.java
+102
-0
YzgFileVideoImageReqVo.java
...com/yanzuoguang/cloud/file/vo/YzgFileVideoImageReqVo.java
+52
-0
No files found.
yzg-util-cloud/src/main/java/com/yanzuoguang/cloud/file/vo/YzgFileMoveItemReqVo.java
View file @
95262b2f
...
...
@@ -13,17 +13,29 @@ import io.swagger.annotations.ApiModelProperty;
public
class
YzgFileMoveItemReqVo
extends
BaseVo
{
/**
* 来源路径,当目标路径存在时,则认为已经移动成功
*
移动文件的
来源路径,当目标路径存在时,则认为已经移动成功
*/
@ApiModelProperty
(
notes
=
"来源路径,当目标路径存在时,则认为已经移动成功"
,
position
=
1000
)
@ApiModelProperty
(
notes
=
"
移动文件的
来源路径,当目标路径存在时,则认为已经移动成功"
,
position
=
1000
)
private
String
from
;
/**
* 目标路径
*
移动文件的
目标路径
*/
@ApiModelProperty
(
notes
=
"目标路径"
,
position
=
1010
)
@ApiModelProperty
(
notes
=
"
移动文件的
目标路径"
,
position
=
1010
)
private
String
to
;
public
YzgFileMoveItemReqVo
()
{
}
public
YzgFileMoveItemReqVo
(
String
from
)
{
this
.
from
=
from
;
}
public
YzgFileMoveItemReqVo
(
String
from
,
String
to
)
{
this
.
from
=
from
;
this
.
to
=
to
;
}
public
String
getFrom
()
{
return
from
;
}
...
...
yzg-util-cloud/src/main/java/com/yanzuoguang/cloud/file/vo/YzgFileVideoImageItemReqVo.java
0 → 100644
View file @
95262b2f
package
com
.
yanzuoguang
.
cloud
.
file
.
vo
;
import
com.yanzuoguang.util.vo.BaseVo
;
import
io.swagger.annotations.ApiModelProperty
;
import
javax.validation.constraints.NotNull
;
/**
* 获取文件的大小
*
* @author 颜佐光
*/
public
class
YzgFileVideoImageItemReqVo
extends
BaseVo
{
/**
* 高质量品质
*/
public
static
final
YzgFileVideoImageItemReqVo
VIDEO_TYPE_HIGH
=
new
YzgFileVideoImageItemReqVo
(
1
D
,
1
D
,
1920
,
1080
);
/**
* 常规品质
*/
public
static
final
YzgFileVideoImageItemReqVo
VIDEO_TYPE_COMMON
=
new
YzgFileVideoImageItemReqVo
(
1
D
,
1
D
,
800
,
600
);
/**
* 低质量品质
*/
public
static
final
YzgFileVideoImageItemReqVo
VIDEO_TYPE_LOW
=
new
YzgFileVideoImageItemReqVo
(
1
D
,
1
D
,
960
,
0
);
@ApiModelProperty
(
notes
=
"目标文件"
)
private
String
toFile
;
@ApiModelProperty
(
notes
=
"压缩尺寸比例,默认为1,范围在0~1之间."
)
private
double
size
=
1
D
;
@ApiModelProperty
(
notes
=
"质量压缩比例,默认为1,范围在0~1之间."
)
private
double
quote
=
1
D
;
@ApiModelProperty
(
notes
=
"分辨率x,如: 1920*1080中的1920."
)
private
double
x
=
0
;
@ApiModelProperty
(
notes
=
"分辨率x,如: 1920*1080中的1080."
)
private
double
y
=
0
;
public
YzgFileVideoImageItemReqVo
()
{
}
private
YzgFileVideoImageItemReqVo
(
double
size
,
double
quote
,
double
x
,
double
y
)
{
this
.
size
=
size
;
this
.
quote
=
quote
;
this
.
x
=
x
;
this
.
y
=
y
;
}
public
YzgFileVideoImageItemReqVo
(
String
toFile
,
@NotNull
YzgFileVideoImageItemReqVo
from
)
{
this
(
from
.
size
,
from
.
quote
,
from
.
x
,
from
.
y
);
this
.
toFile
=
toFile
;
}
public
YzgFileVideoImageItemReqVo
(
String
toFile
,
double
size
,
double
quote
,
double
x
,
double
y
)
{
this
(
size
,
quote
,
x
,
y
);
this
.
toFile
=
toFile
;
}
public
String
getToFile
()
{
return
toFile
;
}
public
void
setToFile
(
String
toFile
)
{
this
.
toFile
=
toFile
;
}
public
double
getSize
()
{
return
size
;
}
public
void
setSize
(
double
size
)
{
this
.
size
=
size
;
}
public
double
getQuote
()
{
return
quote
;
}
public
void
setQuote
(
double
quote
)
{
this
.
quote
=
quote
;
}
public
double
getX
()
{
return
x
;
}
public
void
setX
(
double
x
)
{
this
.
x
=
x
;
}
public
double
getY
()
{
return
y
;
}
public
void
setY
(
double
y
)
{
this
.
y
=
y
;
}
}
yzg-util-cloud/src/main/java/com/yanzuoguang/cloud/file/vo/YzgFileVideoImageReqVo.java
0 → 100644
View file @
95262b2f
package
com
.
yanzuoguang
.
cloud
.
file
.
vo
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
/**
* 设置需要移动,并且对移动后的文件进行压缩
*
* @author 颜佐光
*/
public
class
YzgFileVideoImageReqVo
extends
YzgFileMoveItemReqVo
{
/**
* 压缩后的文件参数集合
*/
@ApiModelProperty
(
notes
=
"压缩后的文件参数集合"
,
position
=
10000
)
private
List
<
YzgFileVideoImageReqVo
>
list
=
new
ArrayList
<>();
public
YzgFileVideoImageReqVo
()
{
}
public
YzgFileVideoImageReqVo
(
String
from
,
YzgFileVideoImageReqVo
...
list
)
{
super
(
from
);
this
.
list
.
addAll
(
Arrays
.
asList
(
list
));
}
public
YzgFileVideoImageReqVo
(
String
from
,
String
to
,
YzgFileVideoImageReqVo
...
list
)
{
super
(
from
,
to
);
this
.
list
.
addAll
(
Arrays
.
asList
(
list
));
}
public
YzgFileVideoImageReqVo
(
String
from
,
List
<
YzgFileVideoImageReqVo
>
list
)
{
super
(
from
);
this
.
list
=
list
;
}
public
YzgFileVideoImageReqVo
(
String
from
,
String
to
,
List
<
YzgFileVideoImageReqVo
>
list
)
{
super
(
from
,
to
);
this
.
list
=
list
;
}
public
List
<
YzgFileVideoImageReqVo
>
getList
()
{
return
list
;
}
public
void
setList
(
List
<
YzgFileVideoImageReqVo
>
list
)
{
this
.
list
=
list
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment