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
d4c69c3c
Commit
d4c69c3c
authored
Feb 20, 2019
by
张永
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加上传监控接口
parent
0520e2c8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1093 additions
and
1026 deletions
+1093
-1026
FilmService.java
src/main/java/com/egolm/film/api/service/FilmService.java
+158
-154
FilmServiceImpl.java
...java/com/egolm/film/api/service/impl/FilmServiceImpl.java
+649
-621
AdminFirstController.java
...va/com/egolm/film/api/web/admin/AdminFirstController.java
+286
-251
No files found.
src/main/java/com/egolm/film/api/service/FilmService.java
View file @
d4c69c3c
...
@@ -151,4 +151,8 @@ public interface FilmService {
...
@@ -151,4 +151,8 @@ public interface FilmService {
void
exchangeFilmNo
(
Integer
id1
,
Integer
id2
);
void
exchangeFilmNo
(
Integer
id1
,
Integer
id2
);
void
initKeywords
(
Long
member_film_id
);
void
initKeywords
(
Long
member_film_id
);
List
<
Map
<
String
,
Object
>>
queryMonitorUploadList
(
String
keyword
,
Integer
upload_state
,
Page
page
);
public
void
updateFilmUploadState
(
String
[]
film_id
,
String
[]
number
);
}
}
src/main/java/com/egolm/film/api/service/impl/FilmServiceImpl.java
View file @
d4c69c3c
...
@@ -617,5 +617,33 @@ public class FilmServiceImpl implements FilmService {
...
@@ -617,5 +617,33 @@ public class FilmServiceImpl implements FilmService {
jdbcTemplate
.
executeUpdate
(
"update fc_member_film set director_name = ?, keywords = ? where id = ?"
,
directors
,
keywords
,
member_film_id
);
jdbcTemplate
.
executeUpdate
(
"update fc_member_film set director_name = ?, keywords = ? where id = ?"
,
directors
,
keywords
,
member_film_id
);
}
}
@Override
public
List
<
Map
<
String
,
Object
>>
queryMonitorUploadList
(
String
keyword
,
Integer
upload_state
,
Page
page
)
{
SqlWhere
w
=
new
SqlWhere
().
lk
(
new
String
[]{
"file_name"
,
"film_id"
},
keyword
).
eq
(
"upload_state"
,
upload_state
);
String
sql
=
"select * from fc_film_upload "
+
StringUtil
.
join
(
" and "
,
" where "
,
""
,
""
,
w
.
getStringList
());;
return
jdbcTemplate
.
limit
(
sql
,
page
,
w
.
getObjectArray
());
}
/**
* 批量修改上传状态 为 未上传
* @Title: updateFilmUploadState
* @Description: TODO(这里用一句话描述这个方法的作用)
* @param: @param film_id
* @param: @param number
* @return: void
* @throws
*/
@Override
public
void
updateFilmUploadState
(
String
[]
film_id
,
String
[]
number
)
{
if
(
film_id
.
length
==
number
.
length
)
{
List
<
Object
[]>
objs
=
new
ArrayList
<
Object
[]>();
for
(
int
i
=
0
;
i
<
film_id
.
length
;
i
++)
{
objs
.
add
(
new
Object
[]{
film_id
[
i
],
number
[
i
]});
}
String
sql
=
"update fc_film_upload set upload_state = 0 ,upload__error_message= '',upload_progress='0%' where film_id = ? and number = ? "
;
jdbcTemplate
.
batchUpdate
(
sql
,
objs
);
}
}
}
}
src/main/java/com/egolm/film/api/web/admin/AdminFirstController.java
View file @
d4c69c3c
...
@@ -204,6 +204,41 @@ public class AdminFirstController {
...
@@ -204,6 +204,41 @@ public class AdminFirstController {
return
Rjx
.
jsonOk
();
return
Rjx
.
jsonOk
();
}
}
@ResponseBody
@PostMapping
(
"upload_monitor"
)
@ApiOperation
(
"影片上传监控列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"String"
,
required
=
false
,
name
=
"keyword"
,
value
=
"关键字"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
required
=
false
,
name
=
"upload_state"
,
value
=
"上传状态( 0未上传, 1上传中, 2已上传)"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
required
=
true
,
name
=
"index"
,
value
=
"分页编号"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
required
=
true
,
name
=
"limit"
,
value
=
"分页大小"
),
})
public
Object
upload_monitor
(
String
keyword
,
Integer
upload_state
,
Long
index
,
Long
limit
)
{
index
=
index
==
null
?
1
:
index
;
limit
=
limit
==
null
?
20
:
limit
;
Page
page
=
new
Page
(
index
,
limit
);
List
<
Map
<
String
,
Object
>>
list
=
filmService
.
queryMonitorUploadList
(
keyword
,
upload_state
,
page
);
return
Rjx
.
jsonOk
().
setData
(
list
).
setPage
(
page
);
}
@ResponseBody
@PostMapping
(
"batch_update_state"
)
@ApiOperation
(
"批量修改上传列表状态"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
allowMultiple
=
true
,
required
=
true
,
name
=
"film_id"
,
value
=
"影片ID"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
allowMultiple
=
true
,
required
=
true
,
name
=
"number"
,
value
=
"第几集"
),
})
public
Object
batch_update_state
(
HttpServletRequest
req
)
{
String
[]
film_id
=
req
.
getParameterValues
(
"film_id"
);
String
[]
number
=
req
.
getParameterValues
(
"number"
);
filmService
.
updateFilmUploadState
(
film_id
,
number
);
return
Rjx
.
jsonOk
();
}
@ResponseBody
@ResponseBody
@PostMapping
(
"exchangeFilmNo"
)
@PostMapping
(
"exchangeFilmNo"
)
@ApiOperation
(
"交换影片编号, id1影片会被更新初审待审核状态,id2影片会被更新为初审否决状态"
)
@ApiOperation
(
"交换影片编号, id1影片会被更新初审待审核状态,id2影片会被更新为初审否决状态"
)
...
...
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