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
461cfb36
Commit
461cfb36
authored
Oct 12, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善申报接口
parent
11d00605
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
81 additions
and
26 deletions
+81
-26
MemberApplyController.java
...java/com/egolm/film/api/member/MemberApplyController.java
+1
-1
MemberService.java
...java/com/egolm/film/api/member/service/MemberService.java
+1
-1
MemberServiceImpl.java
...egolm/film/api/member/service/impl/MemberServiceImpl.java
+77
-22
messages_en_US.properties
src/main/resources/i18n/messages_en_US.properties
+1
-1
messages_zh_CN.properties
src/main/resources/i18n/messages_zh_CN.properties
+1
-1
No files found.
src/main/java/com/egolm/film/api/member/MemberApplyController.java
View file @
461cfb36
...
...
@@ -137,7 +137,7 @@ public class MemberApplyController {
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"array"
,
allowMultiple
=
true
,
required
=
false
,
name
=
"show_filmfest_intro"
,
value
=
"简介(获奖或报名奖项等)"
),
})
public
Object
saveMemberFilmShow
(
Long
member_film_id
,
String
play_shanghai
,
String
[]
show_filmfest
,
String
[]
show_filmfest_type
,
String
[]
show_filmfest_intro
)
{
memberService
.
saveMemberFilmShow
(
member_film_id
,
play_shanghai
,
show_filmfest
,
show_filmfest_type
,
show_filmfest_intro
,
show_filmfest_intro
);
memberService
.
saveMemberFilmShow
(
member_film_id
,
play_shanghai
,
show_filmfest
,
show_filmfest_type
,
show_filmfest_intro
);
return
Rjx
.
jsonOk
();
}
...
...
src/main/java/com/egolm/film/api/member/service/MemberService.java
View file @
461cfb36
...
...
@@ -62,7 +62,7 @@ public interface MemberService {
String
[]
issuer_email
,
String
[]
issuer_tel
);
void
saveMemberFilmShow
(
Long
member_film_id
,
String
play_shanghai
,
String
[]
show_filmfest
,
String
[]
show_filmfest_type
,
String
[]
show_filmfest_intro
,
String
[]
show_filmfest_intro2
);
String
[]
show_filmfest_type
,
String
[]
show_filmfest_intro
);
void
saveMemberFilmCompany
(
Long
member_film_id
,
String
film_apply_company
,
String
film_apply_realname
,
String
film_apply_email
,
String
film_apply_tel
,
String
film_apply_mobile
,
String
film_apply_country
);
...
...
src/main/java/com/egolm/film/api/member/service/impl/MemberServiceImpl.java
View file @
461cfb36
package
com
.
egolm
.
film
.
api
.
member
.
service
.
impl
;
import
java.sql.Connection
;
import
java.sql.PreparedStatement
;
import
java.sql.SQLException
;
import
java.sql.Statement
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.jdbc.core.PreparedStatementCreator
;
import
org.springframework.jdbc.support.GeneratedKeyHolder
;
import
org.springframework.jdbc.support.KeyHolder
;
import
org.springframework.stereotype.Service
;
import
com.egolm.common.StringUtil
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.film.api.member.service.MemberService
;
import
com.egolm.film.bean.Fc_member
;
...
...
@@ -15,11 +23,16 @@ import com.egolm.film.bean.Fc_member_film_director;
import
com.egolm.film.bean.Fc_member_film_issuer
;
import
com.egolm.film.bean.Fc_member_film_playactor
;
import
com.egolm.film.bean.Fc_member_film_show
;
import
com.egolm.film.common.Messages
;
import
com.egolm.film.config.XException
;
@Service
public
class
MemberServiceImpl
implements
MemberService
{
@Autowired
private
Messages
messages
;
@Autowired
private
JdbcTemplate
jdbcTemplate
;
...
...
@@ -114,23 +127,45 @@ public class MemberServiceImpl implements MemberService {
@Override
public
Long
saveMemberFilmType
(
Long
member_film_id
,
String
film_type_name
,
String
enroll_type_name
)
{
// TODO Auto-generated method stub
return
null
;
}
@Override
public
void
saveMemberFilmBase
(
Long
member_film_id
,
String
[]
enroll_type_name_other
,
String
cn_name
,
String
en_name
,
String
intro
)
{
// TODO Auto-generated method stub
String
sql
=
"insert into fc_member_film (film_type_name, enroll_type_name) values (?, ?)"
;
Object
[]
args
=
new
Object
[]{
film_type_name
,
enroll_type_name
};
KeyHolder
keyHolder
=
new
GeneratedKeyHolder
();
jdbcTemplate
.
update
(
new
PreparedStatementCreator
()
{
public
PreparedStatement
createPreparedStatement
(
Connection
connection
)
throws
SQLException
{
PreparedStatement
ps
=
connection
.
prepareStatement
(
sql
,
Statement
.
RETURN_GENERATED_KEYS
);
for
(
int
i
=
0
;
i
<
args
.
length
;
i
++)
{
Object
argObj
=
args
[
i
];
if
(
argObj
instanceof
java
.
util
.
Date
)
{
java
.
util
.
Date
argDate
=
(
java
.
util
.
Date
)
argObj
;
ps
.
setObject
(
i
+
1
,
new
java
.
sql
.
Timestamp
(
argDate
.
getTime
()));
}
else
if
(
argObj
.
getClass
().
isEnum
())
{
ps
.
setObject
(
i
+
1
,
args
[
i
].
toString
());
}
else
{
ps
.
setObject
(
i
+
1
,
args
[
i
]);
}
}
return
ps
;
}
},
keyHolder
);
return
keyHolder
.
getKey
().
longValue
();
}
@Override
public
void
saveMemberFilmBase
(
Long
member_film_id
,
String
[]
enroll_type_name_other
,
String
cn_name
,
String
en_name
,
String
intro
)
{
String
sql
=
"update fc_member_film set enroll_type_name_other = ?, cn_name = ?, en_name = ?, intro = ? where id = ?"
;
String
str
=
StringUtil
.
join
(
","
,
""
,
""
,
""
,
enroll_type_name_other
);
Object
[]
args
=
new
Object
[]{
str
,
cn_name
,
en_name
,
intro
,
member_film_id
};
jdbcTemplate
.
executeUpdate
(
sql
,
args
);
}
@Override
public
void
saveMemberFilmInfo
(
Long
member_film_id
,
String
film_country
,
String
dialogue_lang
,
String
subtitle_lang
,
String
[]
co_production_country
,
String
film_total_time
,
String
completion_date
,
String
show_date
,
String
film_medium
,
String
film_format
)
{
// TODO Auto-generated method stub
String
sql
=
"update fc_member_film set film_country = ?, dialogue_lang = ?, subtitle_lang = ?, co_production_country = ?, film_total_time = ?, completion_date = ?, show_date = ?, film_medium = ?, film_format = ? where id = ?"
;
String
str
=
StringUtil
.
join
(
","
,
""
,
""
,
""
,
co_production_country
);
Object
[]
args
=
new
Object
[]{
str
,
film_country
,
dialogue_lang
,
subtitle_lang
,
str
,
film_total_time
,
completion_date
,
show_date
,
film_medium
,
film_format
,
member_film_id
};
jdbcTemplate
.
executeUpdate
(
sql
,
args
);
}
@Override
...
...
@@ -142,23 +177,43 @@ public class MemberServiceImpl implements MemberService {
}
@Override
public
void
saveMemberFilmIssuer
(
Long
member_film_id
,
String
[]
issuer_company
,
String
[]
issuer_contacts
,
String
[]
issuer_email
,
String
[]
issuer_tel
)
{
// TODO Auto-generated method stub
public
void
saveMemberFilmIssuer
(
Long
member_film_id
,
String
[]
issuer_company
,
String
[]
issuer_contacts
,
String
[]
issuer_email
,
String
[]
issuer_tel
)
{
if
(
issuer_company
.
length
==
issuer_contacts
.
length
&&
issuer_contacts
.
length
==
issuer_email
.
length
&&
issuer_email
.
length
==
issuer_tel
.
length
)
{
Long
create_time
=
System
.
currentTimeMillis
();
jdbcTemplate
.
executeUpdate
(
"delete from fc_member_film_issuer where film_id = ?"
,
member_film_id
);
String
sql
=
"insert into fc_member_film_issuer (film_id, issuer_company, issuer_contacts, issuer_email, issuer_tel, create_time) values (?, ?, ?, ?, ?, ?);"
;
Object
[][]
args
=
new
Object
[
issuer_company
.
length
][];
for
(
int
i
=
0
;
i
<
issuer_company
.
length
;
i
++)
{
args
[
i
]
=
new
Object
[]{
member_film_id
,
issuer_company
[
i
],
issuer_contacts
[
i
],
issuer_email
[
i
],
issuer_tel
[
i
],
create_time
};
}
jdbcTemplate
.
batchUpdate
(
sql
,
args
);
}
else
{
throw
new
XException
(
messages
.
get
(
"err.args_nums"
));
}
}
@Override
public
void
saveMemberFilmShow
(
Long
member_film_id
,
String
play_shanghai
,
String
[]
show_filmfest
,
String
[]
show_filmfest_type
,
String
[]
show_filmfest_intro
,
String
[]
show_filmfest_intro2
)
{
// TODO Auto-generated method stub
public
void
saveMemberFilmShow
(
Long
member_film_id
,
String
play_shanghai
,
String
[]
show_filmfest
,
String
[]
show_filmfest_type
,
String
[]
show_filmfest_intro
)
{
if
(
show_filmfest
.
length
==
show_filmfest_type
.
length
&&
show_filmfest_type
.
length
==
show_filmfest_intro
.
length
)
{
Long
create_time
=
System
.
currentTimeMillis
();
jdbcTemplate
.
executeUpdate
(
"update fc_member_film set play_shanghai = ? where id = ?"
,
play_shanghai
,
member_film_id
);
jdbcTemplate
.
executeUpdate
(
"delete from fc_member_film_show where film_id = ?"
,
member_film_id
);
String
sql
=
"insert into fc_member_film_show (film_id, show_filmfest, show_filmfest_type, show_filmfest_intro, create_time) values (?, ?, ?, ?, ?);"
;
Object
[][]
args
=
new
Object
[
show_filmfest
.
length
][];
for
(
int
i
=
0
;
i
<
show_filmfest
.
length
;
i
++)
{
args
[
i
]
=
new
Object
[]{
member_film_id
,
show_filmfest
[
i
],
show_filmfest_type
[
i
],
show_filmfest_intro
[
i
],
create_time
};
}
jdbcTemplate
.
batchUpdate
(
sql
,
args
);
}
else
{
throw
new
XException
(
messages
.
get
(
"err.args_nums"
));
}
}
@Override
public
void
saveMemberFilmCompany
(
Long
member_film_id
,
String
film_apply_company
,
String
film_apply_realname
,
String
film_apply_email
,
String
film_apply_tel
,
String
film_apply_mobile
,
String
film_apply_country
)
{
// TODO Auto-generated method stub
public
void
saveMemberFilmCompany
(
Long
member_film_id
,
String
film_apply_company
,
String
film_apply_realname
,
String
film_apply_email
,
String
film_apply_tel
,
String
film_apply_mobile
,
String
film_apply_country
)
{
String
sql
=
"update fc_member_film set film_apply_company = ?, film_apply_realname = ?, film_apply_email = ?, film_apply_tel = ?, film_apply_mobile = ?, film_apply_country = ? where id = ?"
;
Object
[]
args
=
new
Object
[]{
film_apply_company
,
film_apply_realname
,
film_apply_email
,
film_apply_tel
,
film_apply_mobile
,
film_apply_country
,
member_film_id
};
jdbcTemplate
.
executeUpdate
(
sql
,
args
);
}
...
...
src/main/resources/i18n/messages_en_US.properties
View file @
461cfb36
...
...
@@ -10,4 +10,4 @@ err.user_exists=User already exists
err.email_null
=
The mailbox can not be empty
err.name_null
=
The username can not be empty
err.pwd_null
=
The password can not be empty
err.args_nums
=
Incorrect number of parameters
src/main/resources/i18n/messages_zh_CN.properties
View file @
461cfb36
...
...
@@ -10,4 +10,4 @@ err.user_exists=\u7528\u6237\u5DF2\u5B58\u5728
err.email_null=
\u
90AE
\u
7BB1
\u
4E0D
\u
80FD
\u
4E3A
\u
7A7A
err.name_null
=
\u
59D3
\u
540D
\u
4E0D
\u
80FD
\u
4E3A
\u
7A7A
err.pwd_null
=
\u
5BC6
\u7801\u
4E0D
\u
80FD
\u
4E3A
\u
7A7A
err.args_nums
=
\u
653E
\u6620\u
53C2
\u6570\u6570\u
91CF
\u9519\u
8BEF
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