5287eb591b125e4f3f19dd20bac6cbebbf8f6b57.svn-base 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. package com.iamberry.app.face;
  2. import com.iamberry.app.config.Response;
  3. import com.iamberry.wechat.tools.ResponseJson;
  4. /**
  5. * @company 深圳爱贝源科技有限公司
  6. * @website www.iamberry.com
  7. * @author 献
  8. * @tel 18271840547
  9. * @date 2016年11月1日
  10. * @explain 验证码业务接口
  11. */
  12. public interface CodeService {
  13. /**
  14. * 发送短信验证码接口
  15. * @param phone
  16. * @return
  17. */
  18. public ResponseJson sendCode(String phone, int codeScenario);
  19. /**
  20. * 根据手机号码、短信验证码、使用场景,校验是否正确
  21. * @param phone
  22. * @param code
  23. * @param codeScenario
  24. * @return
  25. * returnCode :
  26. * 404 没有找到此用户的发送记录
  27. * 403 验证码无效,已经超时
  28. * 405 验证码错误
  29. * 200 校验通过
  30. */
  31. public ResponseJson validCode(String phone, String code, int codeScenario);
  32. /**
  33. * 放轰炸原则:
  34. * 1、每个手机号码,每60秒只能发送1次!<br>
  35. * 2、每个手机号码,每小时只能发送三次!<br>
  36. * 3、每个手机号码,每天只能发送10次!<br>
  37. * @param phone
  38. * @return
  39. * @author 献
  40. * @Time 2016年12月5日
  41. */
  42. //public Response interval(String phone);
  43. }