| | |
| | | import com.fzzy.igds.app.v1.util.PhoneRespUtil; |
| | | import com.fzzy.igds.app.v1.util.PhoneUtil; |
| | | import com.fzzy.igds.service.SysDeptService; |
| | | import com.fzzy.igds.utils.Base64Util; |
| | | import com.ruoyi.common.constant.Constants; |
| | | import com.ruoyi.common.constant.UserConstants; |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | |
| | | private SysDeptService deptService; |
| | | @Autowired |
| | | private RedisCache redisUtil; |
| | | |
| | | @Override |
| | | public String getInterfaceId() { |
| | | return PhoneConstant.API_PHONE_5001; |
| | |
| | | AsyncManager.me().execute(AsyncFactory.recordLogininfor(param.getUsername(), Constants.LOGIN_FAIL, MessageUtils.message("user.blocked"))); |
| | | throw new UserBlockedException(); |
| | | } |
| | | |
| | | passwordService.validate(user, param.getPassword()); |
| | | String password = Base64Util.decodeBase64Password(param.getPassword()); |
| | | passwordService.validate(user, password); |
| | | |
| | | AsyncManager.me().execute(AsyncFactory.recordLogininfor(param.getUsername(), Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"))); |
| | | PUserDto phoneUserDto = new PUserDto(); |
| | |
| | | authUser.setCname(user.getUserName()); |
| | | authUser.setEmail(user.getEmail()); |
| | | authUser.setMobile(user.getPhonenumber()); |
| | | authUser.setUserType(user.getUserType()); |
| | | //设置登录用户所属分库信息 |
| | | SysDept dept = deptService.getCacheDept(user.getCompanyId(),user.getDeptId().toString()); |
| | | SysDept dept = deptService.getCacheDept(user.getCompanyId(), user.getDeptId().toString()); |
| | | |
| | | phoneUserDto.setCompanyId(authUser.getCompanyId()); |
| | | phoneUserDto.setDeptId(dept.getDeptId().toString()); |