优化字段缓存后,修正单元测试
This commit is contained in:
parent
8a26e9913d
commit
2de8ddf627
|
@ -141,7 +141,7 @@ public partial class Area : Entity<Area>
|
|||
}
|
||||
|
||||
// Select Count(Id) as Id,PinYin From Area Where CreateTime>'2020-01-24 00:00:00' Group By PinYin Order By Id Desc limit 20
|
||||
static readonly FieldCache<Area> _PinYinCache = new FieldCache<Area>(nameof(PinYin))
|
||||
static readonly FieldCache<Area> _PinYinCache = new(nameof(PinYin))
|
||||
{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
};
|
||||
|
@ -151,7 +151,7 @@ public partial class Area : Entity<Area>
|
|||
public static IDictionary<String, String> GetPinYinList() => _PinYinCache.FindAllName();
|
||||
|
||||
// Select Count(Id) as Id,JianPin From Area Where CreateTime>'2020-01-24 00:00:00' Group By JianPin Order By Id Desc limit 20
|
||||
static readonly FieldCache<Area> _JianPinCache = new FieldCache<Area>(nameof(JianPin))
|
||||
static readonly FieldCache<Area> _JianPinCache = new(nameof(JianPin))
|
||||
{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
};
|
||||
|
@ -161,7 +161,7 @@ public partial class Area : Entity<Area>
|
|||
public static IDictionary<String, String> GetJianPinList() => _JianPinCache.FindAllName();
|
||||
|
||||
// Select Count(Id) as Id,GeoHash From Area Where CreateTime>'2020-01-24 00:00:00' Group By GeoHash Order By Id Desc limit 20
|
||||
static readonly FieldCache<Area> _GeoHashCache = new FieldCache<Area>(nameof(GeoHash))
|
||||
static readonly FieldCache<Area> _GeoHashCache = new(nameof(GeoHash))
|
||||
{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
};
|
||||
|
|
|
@ -149,7 +149,7 @@ public partial class Parameter : Entity<Parameter>
|
|||
}
|
||||
|
||||
// Select Count(ID) as ID,Category From Parameter Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By ID Desc limit 20
|
||||
static readonly FieldCache<Parameter> _CategoryCache = new FieldCache<Parameter>(nameof(Category))
|
||||
static readonly FieldCache<Parameter> _CategoryCache = new(nameof(Category))
|
||||
{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
};
|
||||
|
|
|
@ -141,7 +141,7 @@ public partial class MemberLog : Entity<MemberLog>
|
|||
}
|
||||
|
||||
// Select Count(ID) as ID,Action From MemberLog Where CreateTime>'2020-01-24 00:00:00' Group By Action Order By ID Desc limit 20
|
||||
static readonly FieldCache<MemberLog> _ActionCache = new FieldCache<MemberLog>(nameof(Action))
|
||||
static readonly FieldCache<MemberLog> _ActionCache = new(nameof(Action))
|
||||
{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
};
|
||||
|
@ -151,7 +151,7 @@ public partial class MemberLog : Entity<MemberLog>
|
|||
public static IDictionary<String, String> GetActionList() => _ActionCache.FindAllName();
|
||||
|
||||
// Select Count(ID) as ID,Category From MemberLog Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By ID Desc limit 20
|
||||
static readonly FieldCache<MemberLog> _CategoryCache = new FieldCache<MemberLog>(nameof(Category))
|
||||
static readonly FieldCache<MemberLog> _CategoryCache = new(nameof(Category))
|
||||
{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
};
|
||||
|
|
|
@ -151,7 +151,7 @@ public partial class Log : Entity<Log>
|
|||
}
|
||||
|
||||
// Select Count(Id) as Id,Action From Log Where CreateTime>'2020-01-24 00:00:00' Group By Action Order By Id Desc limit 20
|
||||
static readonly FieldCache<Log> _ActionCache = new FieldCache<Log>(nameof(Action))
|
||||
static readonly FieldCache<Log> _ActionCache = new(nameof(Action))
|
||||
{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
};
|
||||
|
@ -161,7 +161,7 @@ public partial class Log : Entity<Log>
|
|||
public static IDictionary<String, String> GetActionList() => _ActionCache.FindAllName();
|
||||
|
||||
// Select Count(Id) as Id,Category From Log Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
static readonly FieldCache<Log> _CategoryCache = new FieldCache<Log>(nameof(Category))
|
||||
static readonly FieldCache<Log> _CategoryCache = new(nameof(Category))
|
||||
{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
};
|
||||
|
|
|
@ -182,7 +182,7 @@ public partial class User : Entity<User>
|
|||
}
|
||||
|
||||
// Select Count(ID) as ID,Mail From User Where CreateTime>'2020-01-24 00:00:00' Group By Mail Order By ID Desc limit 20
|
||||
static readonly FieldCache<User> _MailCache = new FieldCache<User>(nameof(Mail))
|
||||
static readonly FieldCache<User> _MailCache = new(nameof(Mail))
|
||||
{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
};
|
||||
|
@ -192,7 +192,7 @@ public partial class User : Entity<User>
|
|||
public static IDictionary<String, String> GetMailList() => _MailCache.FindAllName();
|
||||
|
||||
// Select Count(ID) as ID,Mobile From User Where CreateTime>'2020-01-24 00:00:00' Group By Mobile Order By ID Desc limit 20
|
||||
static readonly FieldCache<User> _MobileCache = new FieldCache<User>(nameof(Mobile))
|
||||
static readonly FieldCache<User> _MobileCache = new(nameof(Mobile))
|
||||
{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
};
|
||||
|
@ -202,7 +202,7 @@ public partial class User : Entity<User>
|
|||
public static IDictionary<String, String> GetMobileList() => _MobileCache.FindAllName();
|
||||
|
||||
// Select Count(ID) as ID,Code From User Where CreateTime>'2020-01-24 00:00:00' Group By Code Order By ID Desc limit 20
|
||||
static readonly FieldCache<User> _CodeCache = new FieldCache<User>(nameof(Code))
|
||||
static readonly FieldCache<User> _CodeCache = new(nameof(Code))
|
||||
{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
};
|
||||
|
|
|
@ -148,7 +148,7 @@ public partial class UserLog : Entity<UserLog>
|
|||
}
|
||||
|
||||
// Select Count(ID) as ID,Action From UserLog Where CreateTime>'2020-01-24 00:00:00' Group By Action Order By ID Desc limit 20
|
||||
static readonly FieldCache<UserLog> _ActionCache = new FieldCache<UserLog>(nameof(Action))
|
||||
static readonly FieldCache<UserLog> _ActionCache = new(nameof(Action))
|
||||
{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
};
|
||||
|
@ -158,7 +158,7 @@ public partial class UserLog : Entity<UserLog>
|
|||
public static IDictionary<String, String> GetActionList() => _ActionCache.FindAllName();
|
||||
|
||||
// Select Count(ID) as ID,Category From UserLog Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By ID Desc limit 20
|
||||
static readonly FieldCache<UserLog> _CategoryCache = new FieldCache<UserLog>(nameof(Category))
|
||||
static readonly FieldCache<UserLog> _CategoryCache = new(nameof(Category))
|
||||
{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
};
|
||||
|
|
|
@ -138,7 +138,7 @@ public partial class Tenant : Entity<Tenant>
|
|||
}
|
||||
|
||||
// Select Count(Id) as Id,Category From Tenant Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<Tenant> _CategoryCache = new FieldCache<Tenant>(nameof(Category))
|
||||
//static readonly FieldCache<Tenant> _CategoryCache = new(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
|
|
@ -137,7 +137,7 @@ public partial class TenantUser : Entity<TenantUser>
|
|||
}
|
||||
|
||||
// Select Count(Id) as Id,Category From TenantUser Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
//static readonly FieldCache<TenantUser> _CategoryCache = new FieldCache<TenantUser>(nameof(Category))
|
||||
//static readonly FieldCache<TenantUser> _CategoryCache = new(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
|
|
@ -154,7 +154,7 @@ public partial class Menu : Entity<Menu>
|
|||
}
|
||||
|
||||
// Select Count(ID) as ID,Category From Menu Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By ID Desc limit 20
|
||||
//static readonly FieldCache<Menu> _CategoryCache = new FieldCache<Menu>(nameof(Category))
|
||||
//static readonly FieldCache<Menu> _CategoryCache = new(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
|
|
@ -152,7 +152,7 @@ public partial class Role : Entity<Role>
|
|||
}
|
||||
|
||||
// Select Count(ID) as ID,Category From Role Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By ID Desc limit 20
|
||||
//static readonly FieldCache<Role> _CategoryCache = new FieldCache<Role>(nameof(Category))
|
||||
//static readonly FieldCache<Role> _CategoryCache = new(nameof(Category))
|
||||
//{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
//};
|
||||
|
|
|
@ -155,7 +155,7 @@ public partial class Department : Entity<Department>
|
|||
}
|
||||
|
||||
// Select Count(ID) as ID,Code From Department Where CreateTime>'2020-01-24 00:00:00' Group By Code Order By ID Desc limit 20
|
||||
static readonly FieldCache<Department> _CodeCache = new FieldCache<Department>(nameof(Code))
|
||||
static readonly FieldCache<Department> _CodeCache = new(nameof(Code))
|
||||
{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
};
|
||||
|
|
|
@ -147,7 +147,7 @@ public partial class Log : Entity<Log>
|
|||
}
|
||||
|
||||
// Select Count(Id) as Id,Action From Log Where CreateTime>'2020-01-24 00:00:00' Group By Action Order By Id Desc limit 20
|
||||
static readonly FieldCache<Log> _ActionCache = new FieldCache<Log>(nameof(Action))
|
||||
static readonly FieldCache<Log> _ActionCache = new(nameof(Action))
|
||||
{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
};
|
||||
|
@ -157,7 +157,7 @@ public partial class Log : Entity<Log>
|
|||
public static IDictionary<String, String> GetActionList() => _ActionCache.FindAllName();
|
||||
|
||||
// Select Count(Id) as Id,Category From Log Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By Id Desc limit 20
|
||||
static readonly FieldCache<Log> _CategoryCache = new FieldCache<Log>(nameof(Category))
|
||||
static readonly FieldCache<Log> _CategoryCache = new(nameof(Category))
|
||||
{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
};
|
||||
|
|
|
@ -179,7 +179,7 @@ public partial class User : Entity<User>
|
|||
}
|
||||
|
||||
// Select Count(ID) as ID,Mail From User Where CreateTime>'2020-01-24 00:00:00' Group By Mail Order By ID Desc limit 20
|
||||
static readonly FieldCache<User> _MailCache = new FieldCache<User>(nameof(Mail))
|
||||
static readonly FieldCache<User> _MailCache = new(nameof(Mail))
|
||||
{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
};
|
||||
|
@ -189,7 +189,7 @@ public partial class User : Entity<User>
|
|||
public static IDictionary<String, String> GetMailList() => _MailCache.FindAllName();
|
||||
|
||||
// Select Count(ID) as ID,Mobile From User Where CreateTime>'2020-01-24 00:00:00' Group By Mobile Order By ID Desc limit 20
|
||||
static readonly FieldCache<User> _MobileCache = new FieldCache<User>(nameof(Mobile))
|
||||
static readonly FieldCache<User> _MobileCache = new(nameof(Mobile))
|
||||
{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
};
|
||||
|
@ -199,7 +199,7 @@ public partial class User : Entity<User>
|
|||
public static IDictionary<String, String> GetMobileList() => _MobileCache.FindAllName();
|
||||
|
||||
// Select Count(ID) as ID,Code From User Where CreateTime>'2020-01-24 00:00:00' Group By Code Order By ID Desc limit 20
|
||||
static readonly FieldCache<User> _CodeCache = new FieldCache<User>(nameof(Code))
|
||||
static readonly FieldCache<User> _CodeCache = new(nameof(Code))
|
||||
{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
};
|
||||
|
|
|
@ -178,7 +178,7 @@ public partial class CorePerson : Entity<CorePerson>
|
|||
}
|
||||
|
||||
// Select Count(PersonID) as PersonID,Pname From core_person Where CreateTime>'2020-01-24 00:00:00' Group By Pname Order By PersonID Desc limit 20
|
||||
static readonly FieldCache<CorePerson> _PnameCache = new FieldCache<CorePerson>(nameof(Pname))
|
||||
static readonly FieldCache<CorePerson> _PnameCache = new(nameof(Pname))
|
||||
{
|
||||
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue