Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
member-api
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
曲欣亮
member-api
Commits
2b6e2970
Commit
2b6e2970
authored
Dec 20, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
c24280b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
WebUtilController.java
.../java/com/egolm/film/api/web/admin/WebUtilController.java
+32
-0
No files found.
src/main/java/com/egolm/film/api/web/admin/WebUtilController.java
View file @
2b6e2970
package
com
.
egolm
.
film
.
api
.
web
.
admin
;
package
com
.
egolm
.
film
.
api
.
web
.
admin
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -10,12 +12,15 @@ import org.springframework.web.bind.annotation.PostMapping;
...
@@ -10,12 +12,15 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.egolm.common.StringUtil
;
import
com.egolm.common.Util
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.film.api.service.AdminTokenService
;
import
com.egolm.film.api.service.AdminTokenService
;
import
com.egolm.film.api.service.ReviewService
;
import
com.egolm.film.api.service.ReviewService
;
import
com.egolm.film.bean.Fc_admin
;
import
com.egolm.film.bean.Fc_admin
;
import
com.egolm.film.bean.Fc_member_film
;
import
com.egolm.film.bean.Fc_member_film
;
import
com.egolm.film.bean.Fc_member_film_enroll
;
import
com.egolm.film.config.XRException
;
import
com.egolm.film.config.XRException
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -46,6 +51,33 @@ public class WebUtilController {
...
@@ -46,6 +51,33 @@ public class WebUtilController {
return
Rjx
.
jsonOk
();
return
Rjx
.
jsonOk
();
}
}
@ResponseBody
@PostMapping
(
"initAllEnrollType"
)
@ApiOperation
(
"初始化所有影片性质"
)
public
Object
initAllEnrollType
()
{
jdbcTemplate
.
executeUpdate
(
"delete from fc_member_film_enroll"
);
String
sql
=
"select id, enroll_type_name, enroll_type_name_other from fc_member_film"
;
List
<
Map
<
String
,
Object
>>
list
=
jdbcTemplate
.
queryForList
(
sql
);
List
<
Fc_member_film_enroll
>
enrolls
=
new
ArrayList
<
Fc_member_film_enroll
>();
for
(
Map
<
String
,
Object
>
map
:
list
)
{
Integer
id
=
Util
.
toInt
(
map
.
get
(
"id"
));
String
name
=
(
String
)
map
.
get
(
"enroll_type_name"
);
if
(
StringUtil
.
isNotBlank
(
name
))
{
String
[]
strs
=
name
.
trim
().
split
(
","
);
for
(
String
str
:
strs
)
{
Fc_member_film_enroll
enroll
=
new
Fc_member_film_enroll
();
enroll
.
setEnroll_type_id
(
Integer
.
valueOf
(
str
));
enroll
.
setFilm_id
(
id
);
enrolls
.
add
(
enroll
);
}
}
}
if
(
enrolls
.
size
()
>
0
)
{
jdbcTemplate
.
batchSave
(
enrolls
);
}
return
Rjx
.
jsonOk
();
}
@ResponseBody
@ResponseBody
@PostMapping
(
"initAllReview"
)
@PostMapping
(
"initAllReview"
)
@ApiOperation
(
"初始化所有审片流程"
)
@ApiOperation
(
"初始化所有审片流程"
)
...
...
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