Commit fbc9304c authored by Quxl's avatar Quxl

x

parent 351db415
package com.egolm.film.api.web.admin; package com.egolm.film.api.web.admin;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -9,7 +12,9 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -9,7 +12,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import com.egolm.common.bean.Rjx; import com.egolm.common.bean.Rjx;
import com.egolm.film.api.service.AdminAuthService;
import com.egolm.film.api.service.AdminTokenService; import com.egolm.film.api.service.AdminTokenService;
import com.egolm.film.bean.Fc_admin;
import com.egolm.film.config.XException; import com.egolm.film.config.XException;
import com.egolm.film.model.LoginToken; import com.egolm.film.model.LoginToken;
...@@ -24,6 +29,9 @@ public class AdminLoginController { ...@@ -24,6 +29,9 @@ public class AdminLoginController {
@Autowired @Autowired
private AdminTokenService tokenService; private AdminTokenService tokenService;
@Autowired
private AdminAuthService authService;
@ResponseBody @ResponseBody
@PostMapping("login") @PostMapping("login")
@ApiOperation("登陆") @ApiOperation("登陆")
...@@ -35,7 +43,9 @@ public class AdminLoginController { ...@@ -35,7 +43,9 @@ public class AdminLoginController {
LoginToken token = tokenService.doLogin(username, password); LoginToken token = tokenService.doLogin(username, password);
if(token != null) { if(token != null) {
tokenService.doLog(request); tokenService.doLog(request);
return Rjx.jsonOk().setData(token); Fc_admin admin = (Fc_admin)tokenService.getTokenObj();
List<Map<String, Object>> groupMenuList = authService.queryGroupMenuList(admin.getGroup_id());
return Rjx.jsonOk().setData(token).set("groupMenuList", groupMenuList);
} else { } else {
throw new XException("用户名或密码错误"); throw new XException("用户名或密码错误");
} }
......
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