internal ServiceResult <User> PasswordSignIn(string userName, string password) { return(FMPTDbContext.DelegateNonTransaction(c => { var user = UserRepository.GetByUserNameAndPassword(userName, password.ToMD5()); if (user == null) { throw new NotImplementedException("用户不存在或密码错误"); } return user; })); }
internal ServiceResult <User> GetUserInfo(long userId) { return(FMPTDbContext.DelegateNonTransaction(c => { var user = UserRepository.GetById(userId); if (user == null) { throw new NotImplementedException("用户不存在"); } return user; })); }