Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
83a60aaa
Commit
83a60aaa
authored
Apr 29, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
视频
parent
7de0a109
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/SysSupplierItemServiceImpl.java
...va/com/wwdz/ch/admin/impl/SysSupplierItemServiceImpl.java
+3
-1
ch-core/src/main/java/com/wwdz/ch/core/util/MediaUtil.java
ch-core/src/main/java/com/wwdz/ch/core/util/MediaUtil.java
+2
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
...wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
+5
-2
No files found.
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/SysSupplierItemServiceImpl.java
View file @
83a60aaa
...
...
@@ -280,7 +280,9 @@ public class SysSupplierItemServiceImpl implements SysSupplierItemService {
supplierItem
.
setSupplyPrice
(
PriceUtil
.
convertPriceFromStr
(
dto
.
getSupplyPrice
()));
}
supplierItem
.
setImages
(
dto
.
getImages
());
supplierItem
.
setVideos
(
dto
.
getVideos
());
if
(
StringUtils
.
hasLength
(
dto
.
getVideos
()))
{
supplierItem
.
setVideos
(
getVideosImage
(
dto
.
getVideos
()));
}
supplierItemDao
.
update
(
supplierItem
);
return
Result
.
success
();
}
catch
(
Exception
e
)
{
...
...
ch-core/src/main/java/com/wwdz/ch/core/util/MediaUtil.java
View file @
83a60aaa
...
...
@@ -198,8 +198,9 @@ public class MediaUtil {
}
public
static
void
main
(
String
[]
args
)
{
String
vedioUrl
=
"https://cdn.wanwudezhi.com/
static/web-static/video/53596700878a572ca4fae35243aaa819
.mp4"
;
String
vedioUrl
=
"https://cdn.wanwudezhi.com/
quanku/video/12d8a09d5ff14ec1af6604c3814c614a
.mp4"
;
String
url
=
getImageByCutVedio
(
vedioUrl
);
System
.
out
.
println
(
url
);
ImageInfo
imageInfo
=
getImageSize
(
url
);
System
.
out
.
println
(
imageInfo
.
formartString
());
}
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
View file @
83a60aaa
...
...
@@ -609,7 +609,9 @@ public class SupplierItemServiceImpl implements SupplierItemService {
EntityMapper
.
copyAttribute
(
dto
,
supplierItem
);
supplierItem
.
setDistributionPrice
(
PriceUtil
.
convertPriceFromStr
(
StringUtils
.
isEmpty
(
dto
.
getDistributionPrice
())?
"0"
:
dto
.
getDistributionPrice
()));
supplierItem
.
setImages
(
dto
.
getImages
());
supplierItem
.
setVideos
(
dto
.
getVideos
());
if
(
StringUtils
.
hasLength
(
dto
.
getVideos
()))
{
supplierItem
.
setVideos
(
getVideosImage
(
dto
.
getVideos
()));
}
if
(
dto
.
getIsOnSale
())
{
supplierItem
.
setStock
(
dto
.
getStock
());
}
else
{
...
...
@@ -941,12 +943,13 @@ public class SupplierItemServiceImpl implements SupplierItemService {
String
video
=
""
;
String
[]
images
=
vedios
.
split
(
";"
);
StringBuffer
stringBuffer
=
new
StringBuffer
();
Arrays
.
stream
(
images
).
parallel
().
forEach
(
image
->
{
Arrays
.
stream
(
images
).
forEach
(
image
->
{
if
(
stringBuffer
.
length
()
!=
0
)
{
stringBuffer
.
append
(
";"
);
}
try
{
String
cutImage
=
MediaUtil
.
getImageByCutVedio
(
image
);
logger
.
info
(
">>>>>> 截取视频第一帧图片url = {} <<<<<<<"
,
cutImage
);
URL
url
=
new
URL
(
cutImage
);
InputStream
inputStream
=
url
.
openStream
();
BufferedImage
bufferedImage
=
ImageIO
.
read
(
inputStream
);
...
...
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