package cn.pluss.platform.phoneValidateCode;

import cn.pluss.platform.entity.PhoneValidateCode;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

public interface PhoneValidateCodeService extends IService<PhoneValidateCode> {

    PhoneValidateCode queryPhoneValidateCode(PhoneValidateCode phoneValidateCode);

    List<PhoneValidateCode> queryPhoneValidateCodeList(PhoneValidateCode phoneValidateCode);

    void savePhoneValidateCode(PhoneValidateCode phoneValidateCode);

    void updatePhoneValidateCode(PhoneValidateCode phoneValidateCode);

    void deletePhoneValidateCode(PhoneValidateCode phoneValidateCode);

    List<PhoneValidateCode> queryPhoneValidateCodePage(Map map);

    Integer queryPhoneValidateCodePageCount(Map map);

    /**
     * 保存验证码，若已存在验证码，则更新对应的验证码信息
     * @param phoneValidateCode 前端传过来的验证码信息
     */
    void saveOrReplaceIfExist(PhoneValidateCode phoneValidateCode);

    /**
     * 校验短信验证码
     * @param phone
     * @param verifyCode
     */
    void checkSmsVerifyCode(String phone, String verifyCode);
}

