| | |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.http.server.reactive.ServerHttpRequest; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | |
| | | private MemberMapper memberMapper; |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | @Lazy |
| | | @Autowired |
| | | private SystemUserMapper systemUserMapper; |
| | | @Lazy |
| | | |
| | | @Autowired |
| | | private SmsEmailMapper smsEmailMapper; |
| | |
| | | @Lazy |
| | | @Autowired |
| | | private SystemPermissionService systemPermissionService; |
| | | |
| | | @Lazy |
| | | @Autowired |
| | | private CaptchaService captchaService; |
| | | @Lazy |
| | | |
| | | @Autowired |
| | | private SystemLoginLogService systemLoginLogService; |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public LoginUserInfo loginDriverWithCode(LoginPhoneDTO param, ServerHttpRequest request) { |
| | | isCaptcheValide(param.getPhone(),param.getCode());//检查验证码 |
| | | |
| | |
| | | systemUser.setSource(Constants.TWO); |
| | | systemUser.setOpenid(param.getOpenid()); |
| | | systemUserMapper.insert(systemUser); |
| | | }else{ |
| | | if(!Constants.equalsInteger(systemUser.getType(),Constants.memberType.driver)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,请使用正确的司机账号登陆!"); |
| | | } |
| | | } |
| | | |
| | | dealOpenIdBiz(systemUser,param.getOpenid()); |
| | |
| | | if(Objects.nonNull(systemUser.getCompanyId())){ |
| | | company = companyMapper.selectById(systemUser.getCompanyId()); |
| | | } |
| | | LoginUserInfo userInfo = LoginUserInfo.from(systemUser, null, null,null,null); |
| | | LoginUserInfo userInfo = LoginUserInfo.from(systemUser, null, null,company,null); |
| | | return userInfo; |
| | | } |
| | | |