package com.cyksj.service.market.task;

import com.cyksj.dto.Result;
import com.cyksj.model.entity.User;
import com.cyksj.model.entity.UserBindDetail;
import com.cyksj.model.request.UserBindInfoReq;

/*
 *项目名: netflix
 *文件名: BindTaskService
 *创建者: JavaZou
 *创建时间:2023/4/13 9:53
 */
public interface BindTaskService {

	/**
	 * @param user        用户
	 * @param phone       绑定手机号
	 * @param code        验证码
	 */
	UserBindDetail bindPhone(User user, String phone, String code);

	void updateBindPhone(User user, String phone, String code);

	UserBindDetail bindEmail(User user, String email, String code);

	Result<String> bindOtherAccount(UserBindInfoReq request) throws Exception;

	void updateBindAccount(UserBindInfoReq request);

	void updateBindEmail(User user, String email, String inputCode);

	void checkPhoneCode(String phone, String inputCode);

	void checkEmailCode(String email, String inputCode);

	/**
	 * 更换登录手机号
	 */
	void changeBindAccount(UserBindInfoReq request);
}
