package com.duiba.tuia.youtui.web.bo;

import cn.com.duiba.tuia.activity.center.api.constant.BalanceType;
import cn.com.duiba.tuia.ssp.center.api.dto.PlugBuoyConfigDto;
import com.duiba.tuia.youtui.web.exception.ActivityException;
import com.duiba.tuia.youtui.web.exception.BusinessException;
import com.duiba.tuia.youtui.web.model.AutoLoginReq;
import com.duiba.tuia.youtui.web.model.CommonLoginReq;
import com.duiba.tuia.youtui.web.model.req.ConsumerReq;
import com.duiba.tuia.youtui.web.model.rsp.LoginMidPageRsp;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.security.NoSuchAlgorithmException;

/**
 * Created by Administrator on 2017/12/12.
 */
public interface ConsumerBO {
    Boolean register(ConsumerReq req, HttpServletRequest request) throws BusinessException, ActivityException, UnsupportedEncodingException, NoSuchAlgorithmException;

    void wxAutoLogin(HttpServletRequest request, PlugBuoyConfigDto slot, Long appId, String deviceId) throws ActivityException;

    LoginMidPageRsp commonlogin(CommonLoginReq req, String host) throws ActivityException;

    void autoLogin(AutoLoginReq req, BalanceType balanceType) throws ActivityException;

    Boolean login(ConsumerReq req, HttpServletRequest request) throws BusinessException, ActivityException;

    Boolean resetPassword(ConsumerReq req) throws ActivityException;

    Boolean sendSms(ConsumerReq consumerDto, String validate, Integer type) throws IOException, BusinessException, NoSuchAlgorithmException;

    Boolean imgCheck(String phoneNumber);

    void updateConsumerInfo(CommonLoginReq req) throws ActivityException;

    String getTongDunDeviceId(String tokenId, HttpServletRequest request);
}
