Commit 72ece12a authored by Quxl's avatar Quxl

API文档header增加i18n_language参数

parent c22e95d0
......@@ -13,6 +13,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
import com.egolm.common.FileUtil;
import com.egolm.common.bean.Rjx;
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.ApiOperation;
......@@ -68,8 +70,15 @@ public class AdminAuthController {
@ResponseBody
@RequestMapping("groupSaveOrUpdate")
@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();
}
......
......@@ -40,6 +40,9 @@ public class MemberApplyController {
@ResponseBody
@PostMapping("get_list")
@ApiOperation("申报项目查询")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", dataType="string", name="i18n_language")
})
public Object list() {
LoginToken loginToken = tokenService.getToken();
Integer member_id = (Integer)loginToken.getId();
......@@ -51,6 +54,7 @@ public class MemberApplyController {
@PostMapping("save_type")
@ApiOperation("新增影片,并保存申报影片类型")
@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="enroll_type_name", value="影片性质"),
})
......@@ -65,6 +69,7 @@ public class MemberApplyController {
@PostMapping("save_base")
@ApiOperation("保存影片基本信息")
@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="string", required=false, name="enroll_type_name_other", value="申报奖项", allowMultiple=true),
@ApiImplicitParam(paramType="query", dataType="string", required=true, name="cn_name", value="中文名称"),
......@@ -94,6 +99,7 @@ public class MemberApplyController {
@PostMapping("save_info")
@ApiOperation("保存影片制作信息")
@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="string", required=true, name="film_country", value="制作国家"),
@ApiImplicitParam(paramType="query", dataType="string", required=true, name="dialogue_lang", value="对白语言"),
......@@ -162,6 +168,7 @@ public class MemberApplyController {
@PostMapping("save_playactor")
@ApiOperation("保存影片演职员信息")
@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="string", allowMultiple=true, required=true, name="playactor_type", value="演职员类型"),
@ApiImplicitParam(paramType="query", dataType="string", allowMultiple=true, required=true, name="playactor_role_name", value="饰演的角色名"),
......@@ -204,6 +211,7 @@ public class MemberApplyController {
@PostMapping("save_issuer")
@ApiOperation("保存影片发行信息")
@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="string", allowMultiple=true, required=true, name="issuer_company", value="发行公司"),
@ApiImplicitParam(paramType="query", dataType="string", allowMultiple=true, required=false, name="issuer_contacts", value="发行方联系人"),
......@@ -234,6 +242,7 @@ public class MemberApplyController {
@PostMapping("save_show")
@ApiOperation("保存影片放映信息")
@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="string", allowMultiple=false, required=true, name="play_shanghai", value="该片在上海电影节放映是"),
@ApiImplicitParam(paramType="query", dataType="string", allowMultiple=true, required=true, name="show_filmfest", value="参加过什么电影节"),
......@@ -263,6 +272,7 @@ public class MemberApplyController {
@PostMapping("save_company")
@ApiOperation("保存影片申报信息")
@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="string", required=true, name="film_apply_company", value="申报公司"),
@ApiImplicitParam(paramType="query", dataType="string", required=true, name="film_apply_realname", value="申报联系人"),
......@@ -297,7 +307,10 @@ public class MemberApplyController {
@ResponseBody
@PostMapping("get_detail")
@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) {
Fc_member_film memberFilm = memberService.queryMemberFilmById(member_film_id);
List<Fc_member_film_director> directorList = memberService.queryMemberFilmDirectorList(memberFilm.getId());
......@@ -316,7 +329,9 @@ public class MemberApplyController {
@ResponseBody
@PostMapping("do_apply")
@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) {
LoginToken loginToken = tokenService.getToken();
Integer member_id = (Integer)loginToken.getId();
......@@ -327,7 +342,9 @@ public class MemberApplyController {
@ResponseBody
@PostMapping("get_more")
@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) {
Fc_member_film_all more = memberService.queryMoreByNo(film_no);
return Rjx.jsonOk().setData(more);
......@@ -336,6 +353,9 @@ public class MemberApplyController {
@ResponseBody
@PostMapping("save_more")
@ApiOperation("获取更多影片信息")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", dataType="string", name="i18n_language"),
})
public Object saveMore(Fc_member_film_all more) {
memberService.saveMore(more);
return Rjx.jsonOk();
......
......@@ -36,6 +36,9 @@ public class MemberInfoController {
@ResponseBody
@PostMapping("query")
@ApiOperation("查询会员基本信息")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", dataType="string", name="i18n_language")
})
public Object query() {
LoginToken loginToken = tokenService.getToken();
Integer id = (Integer)loginToken.getId();
......@@ -47,6 +50,7 @@ public class MemberInfoController {
@PostMapping("save")
@ApiOperation("保存会员基本信息")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", dataType="string", name="i18n_language"),
@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 = "address"),
......@@ -64,6 +68,7 @@ public class MemberInfoController {
@PostMapping("changePassword")
@ApiOperation("修改密码")
@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 = "newPassword", value="新密码"),
})
......
......@@ -51,6 +51,9 @@ public class MemberLoginController {
@ResponseBody
@PostMapping("logout")
@ApiOperation("退出")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", dataType="string", name="i18n_language")
})
public Object logout() {
tokenService.doLogout();
return Rjx.jsonOk();
......
......@@ -48,6 +48,7 @@ public class MemberOpenApiController {
@PostMapping("register")
@ApiOperation("会员注册")
@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 = "password"),
@ApiImplicitParam(paramType = "query", dataType = "String", required = true, name = "email"),
......@@ -78,7 +79,9 @@ public class MemberOpenApiController {
@ResponseBody
@PostMapping("resetPassword")
@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) {
XException.assertNotBlank(messages.get("err.email_null"), email);
int code = (int) ((Math.random() * 9 + 1) * 10000000);
......@@ -121,7 +124,9 @@ public class MemberOpenApiController {
@ResponseBody
@PostMapping("setLocale")
@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) {
Cookie cookie = new Cookie(LocaleCookieInterceptor.language, i18n_language);
cookie.setMaxAge(3600000);
......@@ -133,6 +138,9 @@ public class MemberOpenApiController {
@ResponseBody
@PostMapping("getLocale")
@ApiOperation("获取当前语言环境")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", dataType="string", name="i18n_language")
})
public Object getLocale(HttpServletRequest request) {
return Rjx.jsonOk().set("locale", LocaleContextHolder.getLocale().toString()).set("msg.test", messages.get("msg.test"));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment