package com.iamberry.app.face;
import com.iamberry.app.config.Response;
import com.iamberry.wechat.tools.ResponseJson;
/**
* @company 深圳爱贝源科技有限公司
* @website www.iamberry.com
* @author 献
* @tel 18271840547
* @date 2016年11月1日
* @explain 验证码业务接口
*/
public interface CodeService {
/**
* 发送短信验证码接口
* @param phone
* @return
*/
public ResponseJson sendCode(String phone, int codeScenario);
/**
* 根据手机号码、短信验证码、使用场景,校验是否正确
* @param phone
* @param code
* @param codeScenario
* @return
* returnCode :
* 404 没有找到此用户的发送记录
* 403 验证码无效,已经超时
* 405 验证码错误
* 200 校验通过
*/
public ResponseJson validCode(String phone, String code, int codeScenario);
/**
* 放轰炸原则:
* 1、每个手机号码,每60秒只能发送1次!
* 2、每个手机号码,每小时只能发送三次!
* 3、每个手机号码,每天只能发送10次!
* @param phone
* @return
* @author 献
* @Time 2016年12月5日
*/
public Response interval(String phone);
}