/**
* 文件：ValidCodeService.java
* 版本：1.0.0
* 日期：
* Copyright &reg; 
* All right reserved.
*/

package com.mortals.xhx.base.system.valid.service;


import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.base.system.valid.model.ValidCodeEntity;

/**
 * <p>Title: 验证码信息</p>
 * <p>Description: ValidCodeService service接口 </p>
 * <p>Copyright: Copyright &reg;  </p>
 * <p>Company: </p>
 * @author 
 * @version 1.0.0
 */

public interface ValidCodeService extends ICRUDService<ValidCodeEntity,Long> {
    /**
     * 创建图片校验码
     * @param sessionId
     * @param ip
     * @return
     * @throws AppException
     */
    public String createImageValidCode(String sessionId, String ip) throws AppException;

    /**
     * 校验图片校验码
     * @param sessionId
     * @param ip
     * @param code
     * @return
     * @throws AppException
     */
    public boolean doCheckImageValidCode(String sessionId, String ip, String code) throws AppException;

    /**
     * 创建短信校验码
     * @param sessionId
     * @param ip
     * @param mobile
     * @return
     * @throws AppException
     */
    public boolean createSmsValidCode(String sessionId, String ip, String mobile) throws AppException;

    /**
     * 校验短信校验码
     * @param sessionId
     * @param ip
     * @param mobile
     * @param code
     * @return
     * @throws AppException
     */
    public boolean doCheckSmsValidCode(String sessionId, String ip, String mobile, String code) throws AppException;
}