调整了一下项目框架与前端JS代码

This commit is contained in:
yubaolee
2015-09-20 21:59:36 +08:00
parent 2dea364b2b
commit 43f8130e7e
224 changed files with 17851 additions and 3449 deletions

View File

@@ -1,31 +0,0 @@
using System;
using OpenAuth.Domain.Interface;
using OpenAuth.Domain.Model;
namespace OpenAuth.Domain.Service
{
public class LoginService
{
private IUserRepository _userRepository;
public LoginService(IUserRepository repository)
{
_userRepository = repository;
}
public User Login(string username, string password)
{
var user = _userRepository.FindByAccount(username);
if (user == null)
{
throw new Exception("用户名不存在");
}
if (!user.Password.Equals(password))
{
throw new Exception("密码错误");
}
if (!user.Enabled)
{
throw new Exception("该用户被禁用");
}
return user;
}
}
}

View File

@@ -1,12 +0,0 @@
using System.Collections.Generic;
using System.Linq;
using OpenAuth.Domain.Interface;
using OpenAuth.Domain.Model;
namespace OpenAuth.Domain.Service
{
public class MenuService
{
}
}