Commit 0a547320 authored by Quxl's avatar Quxl

x

parent b238018b
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;
...@@ -12,9 +9,7 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -12,9 +9,7 @@ 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;
...@@ -29,9 +24,6 @@ public class AdminLoginController { ...@@ -29,9 +24,6 @@ public class AdminLoginController {
@Autowired @Autowired
private AdminTokenService tokenService; private AdminTokenService tokenService;
@Autowired
private AdminAuthService authService;
@ResponseBody @ResponseBody
@PostMapping("login") @PostMapping("login")
@ApiOperation("登陆") @ApiOperation("登陆")
...@@ -43,9 +35,7 @@ public class AdminLoginController { ...@@ -43,9 +35,7 @@ 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);
Fc_admin admin = (Fc_admin)tokenService.getTokenObj(); return Rjx.jsonOk().setData(token);
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