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
72ece12a
Commit
72ece12a
authored
Nov 19, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
API文档header增加i18n_language参数
parent
c22e95d0
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
7 deletions
+52
-7
AdminAuthController.java
...in/java/com/egolm/film/api/admin/AdminAuthController.java
+11
-2
MemberApplyController.java
...java/com/egolm/film/api/member/MemberApplyController.java
+23
-3
MemberInfoController.java
.../java/com/egolm/film/api/member/MemberInfoController.java
+5
-0
MemberLoginController.java
...java/com/egolm/film/api/member/MemberLoginController.java
+3
-0
MemberOpenApiController.java
...va/com/egolm/film/api/member/MemberOpenApiController.java
+10
-2
No files found.
src/main/java/com/egolm/film/api/admin/AdminAuthController.java
View file @
72ece12a
...
@@ -13,6 +13,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
...
@@ -13,6 +13,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
import
com.egolm.common.FileUtil
;
import
com.egolm.common.FileUtil
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.film.api.admin.service.AdminAuthService
;
import
com.egolm.film.api.admin.service.AdminAuthService
;
import
com.egolm.film.bean.Fc_admin_group
;
import
com.egolm.film.config.WebMvcConfig
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -68,8 +70,15 @@ public class AdminAuthController {
...
@@ -68,8 +70,15 @@ public class AdminAuthController {
@ResponseBody
@ResponseBody
@RequestMapping
(
"groupSaveOrUpdate"
)
@RequestMapping
(
"groupSaveOrUpdate"
)
@ApiOperation
(
"添加组"
)
@ApiOperation
(
"添加组"
)
public
Object
groupSaveOrUpdate
(
Integer
groupid
,
String
group_name
,
Integer
state
,
String
film_type_name
,
String
authJson
)
{
public
Object
groupSaveOrUpdate
(
Integer
group_id
,
String
group_name
,
Integer
state
,
String
film_type_name
,
String
group_power
)
{
String
remoteIp
=
WebMvcConfig
.
getRemoteIp
();
Fc_admin_group
group
=
new
Fc_admin_group
();
group
.
setGroup_id
(
group_id
);
group
.
setGroup_name
(
group_name
);
group
.
setState
(
state
);
group
.
setCreate_ip
(
remoteIp
);
group
.
setCreate_time
(
System
.
currentTimeMillis
());
group
.
setGroup_power
(
group_power
);
return
Rjx
.
jsonOk
();
return
Rjx
.
jsonOk
();
}
}
...
...
src/main/java/com/egolm/film/api/member/MemberApplyController.java
View file @
72ece12a
...
@@ -40,6 +40,9 @@ public class MemberApplyController {
...
@@ -40,6 +40,9 @@ public class MemberApplyController {
@ResponseBody
@ResponseBody
@PostMapping
(
"get_list"
)
@PostMapping
(
"get_list"
)
@ApiOperation
(
"申报项目查询"
)
@ApiOperation
(
"申报项目查询"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
dataType
=
"string"
,
name
=
"i18n_language"
)
})
public
Object
list
()
{
public
Object
list
()
{
LoginToken
loginToken
=
tokenService
.
getToken
();
LoginToken
loginToken
=
tokenService
.
getToken
();
Integer
member_id
=
(
Integer
)
loginToken
.
getId
();
Integer
member_id
=
(
Integer
)
loginToken
.
getId
();
...
@@ -51,6 +54,7 @@ public class MemberApplyController {
...
@@ -51,6 +54,7 @@ public class MemberApplyController {
@PostMapping
(
"save_type"
)
@PostMapping
(
"save_type"
)
@ApiOperation
(
"新增影片,并保存申报影片类型"
)
@ApiOperation
(
"新增影片,并保存申报影片类型"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
dataType
=
"string"
,
name
=
"i18n_language"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"film_type_name"
,
value
=
"影片类型"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"film_type_name"
,
value
=
"影片类型"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"enroll_type_name"
,
value
=
"影片性质"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"enroll_type_name"
,
value
=
"影片性质"
),
})
})
...
@@ -65,6 +69,7 @@ public class MemberApplyController {
...
@@ -65,6 +69,7 @@ public class MemberApplyController {
@PostMapping
(
"save_base"
)
@PostMapping
(
"save_base"
)
@ApiOperation
(
"保存影片基本信息"
)
@ApiOperation
(
"保存影片基本信息"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
dataType
=
"string"
,
name
=
"i18n_language"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
required
=
true
,
name
=
"member_film_id"
,
value
=
"影片ID"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
required
=
true
,
name
=
"member_film_id"
,
value
=
"影片ID"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
false
,
name
=
"enroll_type_name_other"
,
value
=
"申报奖项"
,
allowMultiple
=
true
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
false
,
name
=
"enroll_type_name_other"
,
value
=
"申报奖项"
,
allowMultiple
=
true
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"cn_name"
,
value
=
"中文名称"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"cn_name"
,
value
=
"中文名称"
),
...
@@ -94,6 +99,7 @@ public class MemberApplyController {
...
@@ -94,6 +99,7 @@ public class MemberApplyController {
@PostMapping
(
"save_info"
)
@PostMapping
(
"save_info"
)
@ApiOperation
(
"保存影片制作信息"
)
@ApiOperation
(
"保存影片制作信息"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
dataType
=
"string"
,
name
=
"i18n_language"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
required
=
true
,
name
=
"member_film_id"
,
value
=
"影片ID"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
required
=
true
,
name
=
"member_film_id"
,
value
=
"影片ID"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"film_country"
,
value
=
"制作国家"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"film_country"
,
value
=
"制作国家"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"dialogue_lang"
,
value
=
"对白语言"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"dialogue_lang"
,
value
=
"对白语言"
),
...
@@ -162,6 +168,7 @@ public class MemberApplyController {
...
@@ -162,6 +168,7 @@ public class MemberApplyController {
@PostMapping
(
"save_playactor"
)
@PostMapping
(
"save_playactor"
)
@ApiOperation
(
"保存影片演职员信息"
)
@ApiOperation
(
"保存影片演职员信息"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
dataType
=
"string"
,
name
=
"i18n_language"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
allowMultiple
=
false
,
required
=
true
,
name
=
"member_film_id"
,
value
=
"影片ID"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
allowMultiple
=
false
,
required
=
true
,
name
=
"member_film_id"
,
value
=
"影片ID"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
allowMultiple
=
true
,
required
=
true
,
name
=
"playactor_type"
,
value
=
"演职员类型"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
allowMultiple
=
true
,
required
=
true
,
name
=
"playactor_type"
,
value
=
"演职员类型"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
allowMultiple
=
true
,
required
=
true
,
name
=
"playactor_role_name"
,
value
=
"饰演的角色名"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
allowMultiple
=
true
,
required
=
true
,
name
=
"playactor_role_name"
,
value
=
"饰演的角色名"
),
...
@@ -204,6 +211,7 @@ public class MemberApplyController {
...
@@ -204,6 +211,7 @@ public class MemberApplyController {
@PostMapping
(
"save_issuer"
)
@PostMapping
(
"save_issuer"
)
@ApiOperation
(
"保存影片发行信息"
)
@ApiOperation
(
"保存影片发行信息"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
dataType
=
"string"
,
name
=
"i18n_language"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
allowMultiple
=
false
,
required
=
true
,
name
=
"member_film_id"
,
value
=
"影片ID"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
allowMultiple
=
false
,
required
=
true
,
name
=
"member_film_id"
,
value
=
"影片ID"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
allowMultiple
=
true
,
required
=
true
,
name
=
"issuer_company"
,
value
=
"发行公司"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
allowMultiple
=
true
,
required
=
true
,
name
=
"issuer_company"
,
value
=
"发行公司"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
allowMultiple
=
true
,
required
=
false
,
name
=
"issuer_contacts"
,
value
=
"发行方联系人"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
allowMultiple
=
true
,
required
=
false
,
name
=
"issuer_contacts"
,
value
=
"发行方联系人"
),
...
@@ -234,6 +242,7 @@ public class MemberApplyController {
...
@@ -234,6 +242,7 @@ public class MemberApplyController {
@PostMapping
(
"save_show"
)
@PostMapping
(
"save_show"
)
@ApiOperation
(
"保存影片放映信息"
)
@ApiOperation
(
"保存影片放映信息"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
dataType
=
"string"
,
name
=
"i18n_language"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
allowMultiple
=
false
,
required
=
true
,
name
=
"member_film_id"
,
value
=
"影片ID"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
allowMultiple
=
false
,
required
=
true
,
name
=
"member_film_id"
,
value
=
"影片ID"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
allowMultiple
=
false
,
required
=
true
,
name
=
"play_shanghai"
,
value
=
"该片在上海电影节放映是"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
allowMultiple
=
false
,
required
=
true
,
name
=
"play_shanghai"
,
value
=
"该片在上海电影节放映是"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
allowMultiple
=
true
,
required
=
true
,
name
=
"show_filmfest"
,
value
=
"参加过什么电影节"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
allowMultiple
=
true
,
required
=
true
,
name
=
"show_filmfest"
,
value
=
"参加过什么电影节"
),
...
@@ -263,6 +272,7 @@ public class MemberApplyController {
...
@@ -263,6 +272,7 @@ public class MemberApplyController {
@PostMapping
(
"save_company"
)
@PostMapping
(
"save_company"
)
@ApiOperation
(
"保存影片申报信息"
)
@ApiOperation
(
"保存影片申报信息"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
dataType
=
"string"
,
name
=
"i18n_language"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
required
=
true
,
name
=
"member_film_id"
,
value
=
"影片ID"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
required
=
true
,
name
=
"member_film_id"
,
value
=
"影片ID"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"film_apply_company"
,
value
=
"申报公司"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"film_apply_company"
,
value
=
"申报公司"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"film_apply_realname"
,
value
=
"申报联系人"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"film_apply_realname"
,
value
=
"申报联系人"
),
...
@@ -297,7 +307,10 @@ public class MemberApplyController {
...
@@ -297,7 +307,10 @@ public class MemberApplyController {
@ResponseBody
@ResponseBody
@PostMapping
(
"get_detail"
)
@PostMapping
(
"get_detail"
)
@ApiOperation
(
"获取全部申报信息"
)
@ApiOperation
(
"获取全部申报信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
required
=
true
,
name
=
"member_film_id"
,
value
=
"申报影片ID"
)})
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
dataType
=
"string"
,
name
=
"i18n_language"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
required
=
true
,
name
=
"member_film_id"
,
value
=
"申报影片ID"
)
})
public
Object
getDetail
(
Long
member_film_id
)
{
public
Object
getDetail
(
Long
member_film_id
)
{
Fc_member_film
memberFilm
=
memberService
.
queryMemberFilmById
(
member_film_id
);
Fc_member_film
memberFilm
=
memberService
.
queryMemberFilmById
(
member_film_id
);
List
<
Fc_member_film_director
>
directorList
=
memberService
.
queryMemberFilmDirectorList
(
memberFilm
.
getId
());
List
<
Fc_member_film_director
>
directorList
=
memberService
.
queryMemberFilmDirectorList
(
memberFilm
.
getId
());
...
@@ -316,7 +329,9 @@ public class MemberApplyController {
...
@@ -316,7 +329,9 @@ public class MemberApplyController {
@ResponseBody
@ResponseBody
@PostMapping
(
"do_apply"
)
@PostMapping
(
"do_apply"
)
@ApiOperation
(
"提交申报"
)
@ApiOperation
(
"提交申报"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
required
=
true
,
name
=
"member_film_id"
,
value
=
"申报影片ID"
)})
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
dataType
=
"string"
,
name
=
"i18n_language"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
required
=
true
,
name
=
"member_film_id"
,
value
=
"申报影片ID"
)
})
public
Object
doApply
(
Long
member_film_id
)
{
public
Object
doApply
(
Long
member_film_id
)
{
LoginToken
loginToken
=
tokenService
.
getToken
();
LoginToken
loginToken
=
tokenService
.
getToken
();
Integer
member_id
=
(
Integer
)
loginToken
.
getId
();
Integer
member_id
=
(
Integer
)
loginToken
.
getId
();
...
@@ -327,7 +342,9 @@ public class MemberApplyController {
...
@@ -327,7 +342,9 @@ public class MemberApplyController {
@ResponseBody
@ResponseBody
@PostMapping
(
"get_more"
)
@PostMapping
(
"get_more"
)
@ApiOperation
(
"获取更多影片信息"
)
@ApiOperation
(
"获取更多影片信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"film_no"
,
value
=
"情报影片编号"
)})
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
dataType
=
"string"
,
name
=
"i18n_language"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"film_no"
,
value
=
"情报影片编号"
)
})
public
Object
getMore
(
String
film_no
)
{
public
Object
getMore
(
String
film_no
)
{
Fc_member_film_all
more
=
memberService
.
queryMoreByNo
(
film_no
);
Fc_member_film_all
more
=
memberService
.
queryMoreByNo
(
film_no
);
return
Rjx
.
jsonOk
().
setData
(
more
);
return
Rjx
.
jsonOk
().
setData
(
more
);
...
@@ -336,6 +353,9 @@ public class MemberApplyController {
...
@@ -336,6 +353,9 @@ public class MemberApplyController {
@ResponseBody
@ResponseBody
@PostMapping
(
"save_more"
)
@PostMapping
(
"save_more"
)
@ApiOperation
(
"获取更多影片信息"
)
@ApiOperation
(
"获取更多影片信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
dataType
=
"string"
,
name
=
"i18n_language"
),
})
public
Object
saveMore
(
Fc_member_film_all
more
)
{
public
Object
saveMore
(
Fc_member_film_all
more
)
{
memberService
.
saveMore
(
more
);
memberService
.
saveMore
(
more
);
return
Rjx
.
jsonOk
();
return
Rjx
.
jsonOk
();
...
...
src/main/java/com/egolm/film/api/member/MemberInfoController.java
View file @
72ece12a
...
@@ -36,6 +36,9 @@ public class MemberInfoController {
...
@@ -36,6 +36,9 @@ public class MemberInfoController {
@ResponseBody
@ResponseBody
@PostMapping
(
"query"
)
@PostMapping
(
"query"
)
@ApiOperation
(
"查询会员基本信息"
)
@ApiOperation
(
"查询会员基本信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
dataType
=
"string"
,
name
=
"i18n_language"
)
})
public
Object
query
()
{
public
Object
query
()
{
LoginToken
loginToken
=
tokenService
.
getToken
();
LoginToken
loginToken
=
tokenService
.
getToken
();
Integer
id
=
(
Integer
)
loginToken
.
getId
();
Integer
id
=
(
Integer
)
loginToken
.
getId
();
...
@@ -47,6 +50,7 @@ public class MemberInfoController {
...
@@ -47,6 +50,7 @@ public class MemberInfoController {
@PostMapping
(
"save"
)
@PostMapping
(
"save"
)
@ApiOperation
(
"保存会员基本信息"
)
@ApiOperation
(
"保存会员基本信息"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
dataType
=
"string"
,
name
=
"i18n_language"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"email"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"email"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
false
,
name
=
"realname"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
false
,
name
=
"realname"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
false
,
name
=
"address"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
false
,
name
=
"address"
),
...
@@ -64,6 +68,7 @@ public class MemberInfoController {
...
@@ -64,6 +68,7 @@ public class MemberInfoController {
@PostMapping
(
"changePassword"
)
@PostMapping
(
"changePassword"
)
@ApiOperation
(
"修改密码"
)
@ApiOperation
(
"修改密码"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
dataType
=
"string"
,
name
=
"i18n_language"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"password"
,
value
=
"当前密码"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"password"
,
value
=
"当前密码"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"newPassword"
,
value
=
"新密码"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"newPassword"
,
value
=
"新密码"
),
})
})
...
...
src/main/java/com/egolm/film/api/member/MemberLoginController.java
View file @
72ece12a
...
@@ -51,6 +51,9 @@ public class MemberLoginController {
...
@@ -51,6 +51,9 @@ public class MemberLoginController {
@ResponseBody
@ResponseBody
@PostMapping
(
"logout"
)
@PostMapping
(
"logout"
)
@ApiOperation
(
"退出"
)
@ApiOperation
(
"退出"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
dataType
=
"string"
,
name
=
"i18n_language"
)
})
public
Object
logout
()
{
public
Object
logout
()
{
tokenService
.
doLogout
();
tokenService
.
doLogout
();
return
Rjx
.
jsonOk
();
return
Rjx
.
jsonOk
();
...
...
src/main/java/com/egolm/film/api/member/MemberOpenApiController.java
View file @
72ece12a
...
@@ -48,6 +48,7 @@ public class MemberOpenApiController {
...
@@ -48,6 +48,7 @@ public class MemberOpenApiController {
@PostMapping
(
"register"
)
@PostMapping
(
"register"
)
@ApiOperation
(
"会员注册"
)
@ApiOperation
(
"会员注册"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
dataType
=
"string"
,
name
=
"i18n_language"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"String"
,
required
=
true
,
name
=
"username"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"String"
,
required
=
true
,
name
=
"username"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"String"
,
required
=
true
,
name
=
"password"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"String"
,
required
=
true
,
name
=
"password"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"String"
,
required
=
true
,
name
=
"email"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"String"
,
required
=
true
,
name
=
"email"
),
...
@@ -78,7 +79,9 @@ public class MemberOpenApiController {
...
@@ -78,7 +79,9 @@ public class MemberOpenApiController {
@ResponseBody
@ResponseBody
@PostMapping
(
"resetPassword"
)
@PostMapping
(
"resetPassword"
)
@ApiOperation
(
"找回密码"
)
@ApiOperation
(
"找回密码"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"String"
,
required
=
true
,
name
=
"email"
)})
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
dataType
=
"string"
,
name
=
"i18n_language"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"String"
,
required
=
true
,
name
=
"email"
)
})
public
Object
resetPassword
(
String
email
)
{
public
Object
resetPassword
(
String
email
)
{
XException
.
assertNotBlank
(
messages
.
get
(
"err.email_null"
),
email
);
XException
.
assertNotBlank
(
messages
.
get
(
"err.email_null"
),
email
);
int
code
=
(
int
)
((
Math
.
random
()
*
9
+
1
)
*
10000000
);
int
code
=
(
int
)
((
Math
.
random
()
*
9
+
1
)
*
10000000
);
...
@@ -121,7 +124,9 @@ public class MemberOpenApiController {
...
@@ -121,7 +124,9 @@ public class MemberOpenApiController {
@ResponseBody
@ResponseBody
@PostMapping
(
"setLocale"
)
@PostMapping
(
"setLocale"
)
@ApiOperation
(
"设置语言环境"
)
@ApiOperation
(
"设置语言环境"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"String"
,
required
=
true
,
name
=
"i18n_language"
,
defaultValue
=
"zh_CN"
)})
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
dataType
=
"string"
,
name
=
"i18n_language"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"String"
,
required
=
true
,
name
=
"i18n_language"
,
defaultValue
=
"zh_CN"
)
})
public
Object
setLocale
(
HttpServletResponse
response
,
String
i18n_language
)
{
public
Object
setLocale
(
HttpServletResponse
response
,
String
i18n_language
)
{
Cookie
cookie
=
new
Cookie
(
LocaleCookieInterceptor
.
language
,
i18n_language
);
Cookie
cookie
=
new
Cookie
(
LocaleCookieInterceptor
.
language
,
i18n_language
);
cookie
.
setMaxAge
(
3600000
);
cookie
.
setMaxAge
(
3600000
);
...
@@ -133,6 +138,9 @@ public class MemberOpenApiController {
...
@@ -133,6 +138,9 @@ public class MemberOpenApiController {
@ResponseBody
@ResponseBody
@PostMapping
(
"getLocale"
)
@PostMapping
(
"getLocale"
)
@ApiOperation
(
"获取当前语言环境"
)
@ApiOperation
(
"获取当前语言环境"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
dataType
=
"string"
,
name
=
"i18n_language"
)
})
public
Object
getLocale
(
HttpServletRequest
request
)
{
public
Object
getLocale
(
HttpServletRequest
request
)
{
return
Rjx
.
jsonOk
().
set
(
"locale"
,
LocaleContextHolder
.
getLocale
().
toString
()).
set
(
"msg.test"
,
messages
.
get
(
"msg.test"
));
return
Rjx
.
jsonOk
().
set
(
"locale"
,
LocaleContextHolder
.
getLocale
().
toString
()).
set
(
"msg.test"
,
messages
.
get
(
"msg.test"
));
}
}
...
...
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