Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
sentinel
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
曲欣亮
sentinel
Commits
b222f286
Commit
b222f286
authored
Feb 22, 2019
by
张永
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
3496fd5e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
OtherUploadServiceImpl.java
...m/egolm/film/api/service/impl/OtherUploadServiceImpl.java
+11
-0
No files found.
src/main/java/com/egolm/film/api/service/impl/OtherUploadServiceImpl.java
View file @
b222f286
...
...
@@ -37,6 +37,9 @@ public class OtherUploadServiceImpl implements OtherUploadService {
if
(
StringUtil
.
isNotEmpty
(
taskName
))
{
String
sql
=
"update fc_film_upload set id = ? ,upload_state = ? ,upload_progress = '0%' ,taskName=? where film_id = ? and number = ? "
;
jdbcTemplate
.
executeUpdate
(
sql
,
videoId
,
FilmContrants
.
UPLOAD_STATUS_ING
,
taskName
,
film_id
,
number
);
String
filmSql
=
"update fc_member_film set upload_id =?, upload_state = ? where id = ? "
;
jdbcTemplate
.
executeUpdate
(
filmSql
,
videoId
,
FilmContrants
.
UPLOAD_STATUS_ING
,
film_id
);
}
else
{
String
sql
=
"update fc_film_upload set id = ? ,upload_state = ? ,upload_progress = '0%' where film_id = ? and number = ? "
;
jdbcTemplate
.
executeUpdate
(
sql
,
videoId
,
FilmContrants
.
UPLOAD_STATUS_ING
,
film_id
,
number
);
...
...
@@ -52,16 +55,24 @@ public class OtherUploadServiceImpl implements OtherUploadService {
public
void
updateSuccess
(
String
videoId
)
{
String
sql
=
"update fc_film_upload set upload_time = now() ,file_local_path = '' ,upload_state = ? where id = ? "
;
jdbcTemplate
.
executeUpdate
(
sql
,
FilmContrants
.
UPLOAD_STATUS_COMPLETED
,
videoId
);
String
filmSql
=
"update fc_member_film set upload_state = ? ,upload_time =now() where upload_id = ? "
;
jdbcTemplate
.
executeUpdate
(
filmSql
,
FilmContrants
.
UPLOAD_STATUS_COMPLETED
,
videoId
);
}
//上传失败
public
void
updateFail
(
String
videoId
,
String
errorMessage
)
{
String
sql
=
"update fc_film_upload set upload__error_message =? ,upload_state = ? where id = ? "
;
jdbcTemplate
.
executeUpdate
(
sql
,
errorMessage
,
FilmContrants
.
UPLOAD_STATUS_FILE
,
videoId
);
String
filmSql
=
"update fc_member_film set upload_state = ? where upload_id = ? "
;
jdbcTemplate
.
executeUpdate
(
filmSql
,
FilmContrants
.
UPLOAD_STATUS_FILE
,
videoId
);
}
public
void
updateFail
(
Integer
film_id
,
Integer
number
,
String
errorMessage
)
{
String
sql
=
"update fc_film_upload set upload__error_message =? ,upload_state = ? where film_id = ? and number = ? "
;
jdbcTemplate
.
executeUpdate
(
sql
,
errorMessage
,
FilmContrants
.
UPLOAD_STATUS_FILE
,
film_id
,
number
);
}
/**
...
...
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