/// <summary>
/// 后台登录
/// </summary>
/// <returns></returns>
public Sys_UserInfo LoginUser(Sys_UserInfo model)
{
using (DbHelper dbhelper = DbHelper.CreateDbHelper())
{
string sql = "SELECT [Id],[LoginId],[LoginPwd],[UserName],[RoleId],[CreateTime] FROM [Sys_User] WHERE LoginId=@LoginId AND LoginPwd =@LoginPwd";
dbhelper.AddInParameter("@LoginId", model.LoginId);
dbhelper.AddInParameter("@LoginPwd", model.LoginPwd);
return dbhelper.ExecuteSQLSingle(sql).ToTarget<Sys_UserInfo>();
}
}