招聘后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

109 lines
3.9 KiB

using System;
using System.Data;
using System.Threading.Tasks;
using Znyc.Recruitment.Admin.Commons.Enums;
using Znyc.Recruitment.Admin.Commons.IServices;
using Znyc.Recruitment.Admin.Commons.Pages;
using Znyc.Recruitment.Admin.Security.Dtos;
using Znyc.Recruitment.Admin.Security.Entitys;
namespace Znyc.Recruitment.Admin.Security.IServices
{
/// <summary>
/// 用户服务接口
/// </summary>
public interface IAdminUserService : IService<AdminUserEntity, AdminUserOutputDto, long>
{
/// <summary>
/// 用户登陆验证。
/// </summary>
/// <param name="userName">用户名</param>
/// <param name="password">密码(第一次md5加密后)</param>
/// <returns>验证成功返回用户实体,验证失败返回null|提示消息</returns>
Task<Tuple<AdminUserEntity, string>> Validate(string userName, string password);
/// <summary>
/// 用户登陆验证。
/// </summary>
/// <param name="userName">用户名</param>
/// <param name="password">密码(第一次md5加密后)</param>
/// <param name="userType">用户类型</param>
/// <returns>验证成功返回用户实体,验证失败返回null|提示消息</returns>
Task<Tuple<AdminUserEntity, string>> Validate(string userName, string password, UserType userType);
/// <summary>
/// 根据用户账号查询用户信息
/// </summary>
/// <param name="userName"></param>
/// <returns></returns>
Task<AdminUserEntity> GetByUserName(string userName);
/// <summary>
/// 根据用户手机号码查询用户信息
/// </summary>
/// <param name="mobilePhone">手机号码</param>
/// <returns></returns>
Task<AdminUserEntity> GetUserByMobilePhone(string mobilePhone);
/// <summary>
/// 根据Account、手机号查询用户信息
/// </summary>
/// <param name="account">登录账号</param>
/// <returns></returns>
Task<AdminUserEntity> GetUserByLogin(string account);
/// <summary>
/// 根据第三方OpenId查询用户信息
/// </summary>
/// <param name="openIdType">第三方类型</param>
/// <param name="openId">OpenId值</param>
/// <returns></returns>
AdminUserEntity GetUserByOpenId(string openIdType, string openId);
/// <summary>
/// 根据微信UnionId查询用户信息
/// </summary>
/// <param name="unionId">UnionId值</param>
/// <returns></returns>
AdminUserEntity GetUserByUnionId(string unionId);
/// <summary>
/// 根据userId查询用户信息
/// </summary>
/// <param name="openIdType">第三方类型</param>
/// <param name="userId">userId</param>
/// <returns></returns>
UserOpenIdsEntity GetUserOpenIdByuserId(string openIdType, long userId);
/// <summary>
/// 更新用户信息,第三方平台
/// </summary>
/// <param name="entity"></param>
/// <param name="userLogOnEntity"></param>
/// <param name="trans"></param>
bool UpdateUserByOpenId(AdminUserEntity entity, AdminUserLogOnEntity userLogOnEntity,
UserOpenIdsEntity userOpenIds,
IDbTransaction trans = null);
/// <summary>
/// 微信注册普通会员用户
/// </summary>
/// <param name="userInPut">第三方类型</param>
/// <returns></returns>
bool CreateUserByWxOpenId(UserInputDto userInPut);
/// <summary>
/// 更新用户
/// </summary>
/// <param name="userInPut"></param>
/// <returns></returns>
bool UpdateUserByOpenId(UserInputDto userInPut);
/// <summary>
/// 根据条件查询数据库,并返回对象集合(用于分页数据显示)
/// </summary>
/// <param name="search">查询的条件</param>
/// <returns>指定对象的集合</returns>
Task<PageResult<AdminUserOutputDto>> FindWithPagerSearchAsync(SearchUserModel search);
}
}