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
360421f8
Commit
360421f8
authored
Dec 17, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
bbd113f8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
11 deletions
+52
-11
ReviewServiceImpl.java
...va/com/egolm/film/api/service/impl/ReviewServiceImpl.java
+17
-11
WebUtilController.java
.../java/com/egolm/film/api/web/admin/WebUtilController.java
+35
-0
No files found.
src/main/java/com/egolm/film/api/service/impl/ReviewServiceImpl.java
View file @
360421f8
...
...
@@ -19,6 +19,7 @@ import com.egolm.film.bean.Fc_review;
import
com.egolm.film.bean.Fc_review_doubtful
;
import
com.egolm.film.bean.Fc_review_record
;
import
com.egolm.film.bean.Fc_review_record_ext
;
import
com.egolm.film.config.XRException
;
import
com.egolm.film.util.SqlWhere
;
@Service
...
...
@@ -208,6 +209,8 @@ public class ReviewServiceImpl implements ReviewService {
@Override
@Transactional
public
void
toFirstRound
(
Long
member_film_id
,
Integer
enroll_type_id
)
{
Integer
count
=
jdbcTemplate
.
queryForInt
(
"select count(id) from fc_review where film_id = ?"
,
member_film_id
);
if
(
count
==
0
)
{
Date
now
=
new
Date
();
Fc_review
review
=
new
Fc_review
();
review
.
setEnroll_type_id
(
enroll_type_id
);
...
...
@@ -219,6 +222,9 @@ public class ReviewServiceImpl implements ReviewService {
review
.
setReview_state
(
null
);
review
.
setCreate_time
(
now
);
jdbcTemplate
.
save
(
review
);
}
else
{
throw
new
XRException
(
"该影已存在审片流程"
);
}
}
@Override
...
...
src/main/java/com/egolm/film/api/web/admin/WebUtilController.java
View file @
360421f8
package
com
.
egolm
.
film
.
api
.
web
.
admin
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
...
@@ -9,6 +11,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.film.api.service.ReviewService
;
import
com.egolm.film.bean.Fc_member_film
;
import
com.egolm.film.config.XRException
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -31,4 +35,35 @@ public class WebUtilController {
service
.
tryNextRound
(
review_id
);
return
Rjx
.
jsonOk
();
}
@ResponseBody
@PostMapping
(
"initAllReview"
)
@ApiOperation
(
"初始化所有审片流程"
)
public
Object
initAllReview
()
{
jdbcTemplate
.
executeUpdate
(
"delete from fc_review"
);
jdbcTemplate
.
executeUpdate
(
"delete from fc_review_record"
);
jdbcTemplate
.
executeUpdate
(
"delete from fc_review_record_ext"
);
List
<
Fc_member_film
>
films
=
jdbcTemplate
.
queryForBeans
(
"select * from fc_member_film where apply_state = 2"
,
Fc_member_film
.
class
);
Integer
enroll_1_2
=
null
;
for
(
Fc_member_film
film
:
films
)
{
String
enroll_type_name
=
film
.
getEnroll_type_name
();
String
[]
enrolls
=
enroll_type_name
.
split
(
","
);
for
(
String
enroll_str
:
enrolls
)
{
Integer
enroll_type_id
=
Integer
.
valueOf
(
enroll_str
);
if
(
enroll_type_id
==
1
||
enroll_type_id
==
2
)
{
if
(
enroll_1_2
==
null
)
{
enroll_1_2
=
enroll_type_id
;
}
else
{
throw
new
XRException
(
"不能同时申请亚新和金爵流程"
);
}
}
}
if
(
enroll_1_2
!=
null
)
{
service
.
toFirstRound
(
film
.
getId
(),
enroll_1_2
);
}
else
{
service
.
toFirstRound
(
film
.
getId
(),
4
);
}
}
return
Rjx
.
jsonOk
();
}
}
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