Commit beda9746 authored by Quxl's avatar Quxl

xx

parent 2e45b404
package com.egolm.film.api.member;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -28,6 +29,9 @@ public class MemberLoginController {
@Autowired
private MemberTokenService tokenService;
@Value("${opt.member_id}")
private Integer opt_member_id;
@ResponseBody
@PostMapping("login")
@ApiOperation("登陆")
......@@ -41,7 +45,8 @@ public class MemberLoginController {
} else {
LoginToken token = tokenService.doLogin(username, password);
if(token != null) {
return Rjx.jsonOk();
return Rjx.jsonOk().set("show", opt_member_id.intValue() == ((Integer)token.getId()).intValue());
} else {
throw new XException(messages.get("err.user_or_pwd"));
}
......
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