package com.YuyeTech.HeartRate.game.userinfo.service;

import com.YuyeTech.HeartRate.common.service.CommonService;
import com.YuyeTech.HeartRate.game.userinfo.projo.MainInfo;
import com.YuyeTech.HeartRate.game.userinfo.vo.MainInfoVo;

/**
 * @author:slambb
 * @date:2019/12/31
 */
public interface MainInfoService extends CommonService<MainInfoVo, MainInfo, String> {
    MainInfo findMainInfoById(String userId);
    MainInfo findMainInfoByPhoneNumber(String phoneNumber);
    MainInfo findMainInfoByPhoneNumberAndPassword(String phoneNumber,String password);
    MainInfo findMainInfoByEmailAndPassword(String email,String password);
    MainInfo findMainInfoByEmail(String mail);
    MainInfo addMainInfo(MainInfo mainInfo);

    /**
     * 删除用户，目前只是挂起数据
     * @param userId
     * @param type 删除的操作类型
     * @return
     */
    String deleteMainInfoById(String userId,String type);

    /**
     * 恢复删除用户数据
     * @param userId
     * @return
     */
    MainInfoVo restoreMainInfoById(String userId);
}
