| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.matrix.component.redis.RedisClient; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.UUIDUtil; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.app.dto.LoginDto; |
| | | import com.matrix.system.app.vo.UserInfoVo; |
| | | import com.matrix.system.common.authority.DefaultAuthorityManager; |
| | |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * @author wzy |
| | |
| | | result.putInMap("token", token); |
| | | return result; |
| | | } |
| | | |
| | | @ApiOperation(value = "退出登陆", notes = "退出登陆") |
| | | @GetMapping(value = "/loginOut") |
| | | public AjaxResult loginOut() { |
| | | SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | String token = redisClient.getCachedValue(sysUsers.getSuId().toString()); |
| | | |
| | | redisClient.removeObject(token); |
| | | redisClient.removeObject(sysUsers.getSuId().toString()); |
| | | return AjaxResult.buildSuccessInstance("退出成功"); |
| | | } |
| | | } |