| | |
| | | package com.panzhihua.auth.api; |
| | | |
| | | import com.panzhihua.auth.model.dos.LoginBody; |
| | | import com.panzhihua.auth.service.LoginService; |
| | | import com.panzhihua.common.exceptions.TokenException; |
| | | import com.panzhihua.common.exceptions.UnAuthenticationException; |
| | |
| | | import com.panzhihua.common.utlis.JWTTokenUtil; |
| | | import io.jsonwebtoken.Claims; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | |
| | | loginService.logoutApplets(token); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 运营后台登录 |
| | | * |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * @return 登录结果 |
| | |
| | | LoginReturnVO loginReturnVO =loginService.loginAppletsBackStage(account,password); |
| | | return R.ok(loginReturnVO); |
| | | } |
| | | |
| | | /** |
| | | * 大数据统计平台(区、街道、社区三层登陆接口) |
| | | * |
| | | * @param loginBody 账户 |
| | | * @return 登录结果 |
| | | * @author manailin |
| | | * @date 2021-5-13 10:56 |
| | | */ |
| | | @PostMapping("/loginBigDataBackStage") |
| | | public R loginBigDataBackStage(@RequestBody LoginBody loginBody) { |
| | | String account = loginBody.getAccount(); |
| | | String password = loginBody.getPassword(); |
| | | if (ObjectUtils.isEmpty(account) || ObjectUtils.isEmpty(password)) { |
| | | return R.fail("账户密码不能为空"); |
| | | } |
| | | LoginReturnVO loginReturnVO = loginService.loginBigDataBackStage(account, password); |
| | | return R.ok(loginReturnVO); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台登录 |
| | | * |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * @return 登录结果 |
| | |
| | | LoginReturnVO loginReturnVO =loginService.loginCommunityBackage(account,password); |
| | | return R.ok(loginReturnVO); |
| | | } |
| | | |
| | | /** |
| | | * 认证中心刷新token |
| | | * |
| | | * @param refreshToken 用户端保存的刷新token |
| | | * @return 新的token 和刷新token |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 商家后台登录 |
| | | * |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * @return 登录结果 |