| | |
| | | package com.gkhy.safePlatform.accountController; |
| | | |
| | | import cn.hutool.core.codec.Base64; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.gkhy.safePlatform.account.rpc.apimodel.AccountAuthService; |
| | | import com.gkhy.safePlatform.account.rpc.apimodel.model.resp.MenuRPCRespDTO; |
| | |
| | | public ResultVO<UserLoginRPCRespDTO> authLogin(@RequestBody JSONObject loginForm){ |
| | | String username = loginForm.getString("username"); |
| | | String password = loginForm.getString("password"); |
| | | password= Base64.decodeStr(password); |
| | | return accountAuthService.authLogin(username, password); |
| | | } |
| | | |
| | | @RequestMapping("/menu") |
| | | public ResultVO<List<MenuRPCRespDTO>> getMenu(Authentication authentication, Long projectId){ |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | return accountAuthService.getMenu(currentUser.getUid(), projectId); |
| | | return accountAuthService.getMenu(currentUser, projectId); |
| | | } |
| | | } |