/*
 * Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
 *
 * https://www.gz-yami.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */

package com.yami.shop.security.api.service;

import com.yami.shop.bean.model.User;
import com.yami.shop.security.api.model.YamiUser;
import com.yami.shop.security.comment.enums.App;
import com.yami.shop.security.comment.exception.UsernameNotFoundException;
import com.yami.shop.security.comment.model.AppConnect;
import org.springframework.security.core.userdetails.UserDetailsService;

/**
 * 用户详细信息
 *
 * @author
 */
public interface YamiUserDetailsService extends UserDetailsService {

	/**
	 * 根据用户名或手机号加载用户信息
	 * @param principal
	 * @param appType
	 * @return
	 */
	YamiUser loadUserByMobileOrUserName(String principal, Integer appType, Integer loginType);

	YamiUser loadUserByAppConnect(AppConnect appConnect);


	User loadUserByMobileOrUserName(String mobileOrUserName,Integer loginType);

	YamiUser getYamiUser(Integer appId, User user, String bizUserId);
}
