Merge remote-tracking branch 'remotes/origin/manailin_test' into test
| | |
| | | LoginReturnVO loginReturnVO =loginService.loginAppletsBackStage(account,password); |
| | | return R.ok(loginReturnVO); |
| | | } |
| | | |
| | | /** |
| | | * 大数据统计平台(区、街道、社区三层登陆接口) |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * @author manailin |
| | | * @return 登录结果 |
| | | * @date 2021-5-13 10:56 |
| | | */ |
| | | @PostMapping("/loginBigDataBackStage") |
| | | public R loginBigDataBackStage(@RequestParam("account") String account, @RequestParam("password")String password){ |
| | | boolean accountCheck = ObjectUtils.isEmpty(account); |
| | | boolean passwordCheck = ObjectUtils.isEmpty(password); |
| | | if (accountCheck||passwordCheck) { |
| | | return R.fail("账户密码不能为空"); |
| | | } |
| | | LoginReturnVO loginReturnVO =loginService.loginBigDataBackStage(account,password); |
| | | return R.ok(loginReturnVO); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台登录 |
| | | * @param account 账户 |
| | |
| | | * @return 登录结果 |
| | | */ |
| | | LoginReturnVO loginShopBackStage(String account, String password); |
| | | /** |
| | | * 大数据统计平台(区、街道、社区三层登陆接口) |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * @author manailin |
| | | * @return 登录结果 |
| | | * @date 2021-5-13 10:56 |
| | | */ |
| | | LoginReturnVO loginBigDataBackStage(String account, String password); |
| | | } |
| | |
| | | return loginReturnVO; |
| | | } |
| | | |
| | | /** |
| | | * 大数据统计平台(区、街道、社区三层登陆接口) |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * @author manailin |
| | | * @return 登录结果 |
| | | * @date 2021-5-13 10:56 |
| | | */ |
| | | @Override |
| | | public LoginReturnVO loginBigDataBackStage(String account, String password) { |
| | | Authentication authentication = null; |
| | | authentication = authenticationManager |
| | | .authenticate(new UsernamePasswordAuthenticationToken(account+"_8", password)); |
| | | LoginUserInfoVO loginUser = (LoginUserInfoVO) authentication.getPrincipal(); |
| | | String token = JWTTokenUtil.generateToken(loginUser); |
| | | String refeshToken = JWTTokenUtil.generateRefeshToken(loginUser); |
| | | LoginReturnVO loginReturnVO=new LoginReturnVO(); |
| | | loginReturnVO.setToken(token); |
| | | loginReturnVO.setRefreshToken(refeshToken); |
| | | return loginReturnVO; |
| | | } |
| | | |
| | | } |