package shop.alien.storeplatform.service;

import com.alibaba.fastjson.JSONObject;
import shop.alien.entity.result.R;
import shop.alien.entity.store.StoreUser;
import shop.alien.entity.store.vo.StoreUserVo;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;

public interface StorePlatformLoginervice {

    R<Boolean> register(String phone, String password);

    R<StoreUserVo> createToKen(StoreUser storeUser);

    public boolean checkRegister(String phone);

    /**
     * 修改密码或忘记密码
     *
     * @param phone   手机号
     * @param oldPassword 原密码
     * @param newPassword       新密码
     * @param confirmNewPassword 确认密码
     * @param type 类型
     * @return boolean
     */
    R<String> forgetOrModifyPassword(String phone, String newPhone, String oldPassword, String newPassword,String confirmNewPassword,String verificationCode,  Integer type);

    void generateCaptcha(HttpServletResponse response, HttpSession session) throws IOException;

    JSONObject getExpirationTime(Integer storeId) throws Exception;

}
