Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
shop-Mall
Project
Project
Details
Activity
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
licc
shop-Mall
Commits
d91d97bb
Commit
d91d97bb
authored
Mar 10, 2021
by
m1991
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资讯模块数据——视频功能修复
parent
d163b1dd
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
18 deletions
+13
-18
FrameGrabberKit.java
.../main/java/cn/wisenergy/common/utils/FrameGrabberKit.java
+2
-3
ShopZxMapper.java
...apper/src/main/java/cn/wisenergy/mapper/ShopZxMapper.java
+2
-1
ShopZxMapper.xml
wisenergy-mapper/src/main/resources/mapper/ShopZxMapper.xml
+2
-2
shopZx.java
...gy-model/src/main/java/cn/wisenergy/model/app/shopZx.java
+1
-1
UploadServiceImpl.java
...java/cn/wisenergy/service/app/impl/UploadServiceImpl.java
+6
-11
No files found.
wisenergy-common/src/main/java/cn/wisenergy/common/utils/FrameGrabberKit.java
View file @
d91d97bb
...
...
@@ -6,7 +6,7 @@ import java.awt.image.BufferedImage;
import
java.io.File
;
import
javax.imageio.ImageIO
;
import
org.bytedeco.javacpp.opencv_core
;
import
org.bytedeco.javacv.FFmpegFrameGrabber
;
import
org.bytedeco.javacv.Frame
;
import
org.bytedeco.javacv.Java2DFrameConverter
;
...
...
@@ -44,7 +44,7 @@ public class FrameGrabberKit {
* 获取指定视频的帧并保存为图片至指定目录
*
* @param videofile 源视频文件路径
* @param framefile 截取帧的图片存放路径 例:F:
/hfkjrecorder/target/
4.jpg
* @param framefile 截取帧的图片存放路径 例:F:
\hfkjrecorder\target\
4.jpg
* @throws Exception
*/
public
static
void
fetchFrame
(
String
videofile
,
String
framefile
)
throws
Exception
{
...
...
@@ -82,5 +82,4 @@ public class FrameGrabberKit {
//ff.flush();
ff
.
stop
();
}
}
wisenergy-mapper/src/main/java/cn/wisenergy/mapper/ShopZxMapper.java
View file @
d91d97bb
...
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.math.BigInteger
;
import
java.util.List
;
...
...
@@ -20,7 +21,7 @@ public interface ShopZxMapper extends BaseMapper<shopZx> {
* @param
* @return 1
*/
int
zxadd
(
@Param
(
"zxUrl"
)
String
zxUrl
,
@Param
(
"zxField"
)
String
zxField
,
@Param
(
"zxAddress"
)
String
zxAddress
,
@Param
(
"inviteCode"
)
String
inviteCode
,
@Param
(
"zxDate"
)
Stri
ng
zxDate
);
int
zxadd
(
@Param
(
"zxUrl"
)
String
zxUrl
,
@Param
(
"zxField"
)
String
zxField
,
@Param
(
"zxAddress"
)
String
zxAddress
,
@Param
(
"inviteCode"
)
String
inviteCode
,
@Param
(
"zxDate"
)
Lo
ng
zxDate
);
/**
* 查询资讯数据
...
...
wisenergy-mapper/src/main/resources/mapper/ShopZxMapper.xml
View file @
d91d97bb
...
...
@@ -16,12 +16,12 @@
</sql>
<sql
id=
"cols_all"
>
zxid,
zx
_id as zx
id,
<include
refid=
"cols_exclude_id"
/>
</sql>
<sql
id=
"cols_exclude_id"
>
zx
Url,zxField,zxAddress,inviteCode,zxD
ate
zx
_url,zx_field,zx_address,invite_code,zx_d
ate
</sql>
<sql
id=
"vals"
>
...
...
wisenergy-model/src/main/java/cn/wisenergy/model/app/shopZx.java
View file @
d91d97bb
...
...
@@ -65,7 +65,7 @@ public class shopZx extends Model<shopZx> implements Serializable {
* 资讯数据创建时间
*/
@ApiModelProperty
(
name
=
"zx_date"
,
value
=
"资讯数据创建时间"
)
private
BigInteger
zxDate
;
private
Long
zxDate
;
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/UploadServiceImpl.java
View file @
d91d97bb
...
...
@@ -12,7 +12,6 @@ import org.springframework.util.StringUtils;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.IOException
;
import
java.math.BigInteger
;
import
java.net.MalformedURLException
;
import
java.nio.file.Files
;
import
java.nio.file.Path
;
...
...
@@ -20,16 +19,12 @@ import java.nio.file.Paths;
import
java.nio.file.StandardCopyOption
;
import
cn.wisenergy.service.app.UploadService
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileOutputStream
;
import
java.io.InputStream
;
import
java.util.*
;
import
javax.servlet.http.HttpServletRequest
;
import
cn.wisenergy.mapper.ShopZxMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ClassUtils
;
/**
...
...
@@ -93,8 +88,8 @@ public class UploadServiceImpl implements UploadService {
/**
* 生成当前时间戳
*/
BigInteger
zxDate
=
BigInteger
.
valueOf
(
System
.
currentTimeMillis
()
);
shopZxMapper
.
zxadd
(
zxUrl
,
zxField
,
zxAddress
,
inviteCode
,
String
.
valueOf
(
zxDate
)
);
Long
zxDate
=
System
.
currentTimeMillis
(
);
shopZxMapper
.
zxadd
(
zxUrl
,
zxField
,
zxAddress
,
inviteCode
,
zxDate
);
return
resultMap
;
}
...
...
@@ -108,7 +103,7 @@ public class UploadServiceImpl implements UploadService {
/**
* 生成当前时间戳
*/
BigInteger
zxDate
=
BigInteger
.
valueOf
(
System
.
currentTimeMillis
());
Long
zxDate
=
Long
.
valueOf
(
System
.
currentTimeMillis
());
String
basePath
=
request
.
getScheme
()
+
"://"
+
request
.
getServerName
()
+
":"
+
request
.
getServerPort
()+
"/mimi/upload/images/"
;
...
...
@@ -136,7 +131,7 @@ public class UploadServiceImpl implements UploadService {
resultMap
.
put
(
"zxUrl"
,
zxUrl
);
resultMap
.
put
(
"returnCode"
,
0
);
shopZxMapper
.
zxadd
(
zxUrl
,
zxField
,
zxAddress
,
inviteCode
,
String
.
valueOf
(
zxDate
)
);
shopZxMapper
.
zxadd
(
zxUrl
,
zxField
,
zxAddress
,
inviteCode
,
zxDate
);
return
resultMap
;
}
...
...
@@ -146,7 +141,7 @@ public class UploadServiceImpl implements UploadService {
/**
* 生成当前时间戳
*/
BigInteger
zxDate
=
BigInteger
.
valueOf
(
System
.
currentTimeMillis
());
Long
zxDate
=
Long
.
valueOf
(
System
.
currentTimeMillis
());
//获取上传图片数量,打印在控制台
System
.
out
.
println
(
"上传图片数量"
+
files
.
length
);
//创建集合
...
...
@@ -199,7 +194,7 @@ public class UploadServiceImpl implements UploadService {
String
root_json
=
JSON
.
toJSONString
(
root
);
System
.
out
.
println
(
root_json
);
result
.
put
(
"returnCode"
,
0
);
shopZxMapper
.
zxadd
(
zxUrl
,
zxField
,
zxAddress
,
inviteCode
,
String
.
valueOf
(
zxDate
)
);
shopZxMapper
.
zxadd
(
zxUrl
,
zxField
,
zxAddress
,
inviteCode
,
zxDate
);
return
root
;
}
...
...
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