| | |
| | | * @param password 密码 |
| | | * @return 结果 |
| | | */ |
| | | public String Cuslogin(String username, String password, Boolean type,String code,String uuid) { |
| | | public String Cuslogin(String username,String sfzh, String password, Boolean type,String code,String uuid) { |
| | | |
| | | String aSwitch = configService.selectConfigByKey("captcha_switch"); |
| | | if(null !=aSwitch && aSwitch.equalsIgnoreCase("Y")){ |
| | |
| | | } |
| | | |
| | | |
| | | LoginUser loginUser = loadCusByCusname(username, password); |
| | | LoginUser loginUser = loadCusByCusname(username,sfzh, password); |
| | | if (loginUser == null) { |
| | | return "用户名或密码错误"; |
| | | } |
| | |
| | | return tokenService.createToken(loginUser); |
| | | } |
| | | |
| | | public LoginUser loadCusByCusname(String username, String password) { |
| | | public LoginUser loadCusByCusname(String username,String sfzh, String password) { |
| | | LambdaQueryWrapper<TjCustomer> wq = new LambdaQueryWrapper<>(); |
| | | wq.eq(TjCustomer::getCusPhone, username); |
| | | wq.eq(TjCustomer::getCusIdcard, sfzh); |
| | | List<TjCustomer> customerList = customerService.list(wq); |
| | | if (null == customerList || customerList.size() == 0) { |
| | | if (null == customerList || customerList.isEmpty()) { |
| | | //throw new ServiceException("登录用户:" + username + " 不存在"); |
| | | throw new ServiceException("账号或密码错误,请检查!"); |
| | | } |