puzhibing
2023-07-27 d56eb9b8c519945957c2a90e4204efb48abd463b
DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/DriverServiceImpl.java
@@ -270,8 +270,8 @@
     * @throws Exception
     */
    @Override
    public boolean checkCaptcha(String phone, String code) throws Exception {
        Object value = redisUtil.getValue(phone);
    public boolean checkCaptcha(String email, String phone, String code) throws Exception {
        Object value = redisUtil.getValue(ToolUtil.isNotEmpty(email) ? email : phone);
        if("1246".equals(code)){
            return true;
        }
@@ -411,7 +411,7 @@
     */
    @Override
    public ResultUtil<LoginWarpper> registeredDriver(String phoneOperator, String phone, String code, String password,Integer uid,Integer uType, Integer language) throws Exception {
        boolean b = this.checkCaptcha(phone, code);
        boolean b = this.checkCaptcha("", phone, code);
        if(!b){
            return ResultUtil.error(language == 1 ? "验证码无效" : language == 2 ? "Invalid captcha" : "Code de vérification invalide");
        }
@@ -613,7 +613,7 @@
     */
    @Override
    public ResultUtil resetPassword(String phone, String code, String password, Integer language) throws Exception {
        boolean b = this.checkCaptcha(phone, code);
        boolean b = this.checkCaptcha("", phone, code);
        if(!b){
            return ResultUtil.error(language == 1 ? "验证码无效" : language == 2 ? "Invalid captcha" : "Code de vérification invalide");
        }
@@ -1046,7 +1046,7 @@
        if(null != driver){
            return ResultUtil.error(language == 1 ? "电话号码已被注册" : language == 2 ? "he phone number is registered" : "Le numéro de téléphone a été enregistré");
        }
        boolean b = this.checkCaptcha(phone, code);
        boolean b = this.checkCaptcha("", phone, code);
        if(!b){
            return ResultUtil.error(language == 1 ? "验证码无效" : language == 2 ? "Invalid captcha" : "Code de vérification invalide");
        }