代码生成新增加排序字段
This commit is contained in:
@@ -43,7 +43,7 @@ namespace ZR.Service
|
||||
{
|
||||
return baseRepository.Add(t);
|
||||
}
|
||||
public IInsertable<T> Insertable(T t)
|
||||
public IInsertable<T> Insertable(T t)
|
||||
{
|
||||
return baseRepository.Insertable(t);
|
||||
}
|
||||
@@ -179,7 +179,7 @@ namespace ZR.Service
|
||||
|
||||
public DbResult<bool> UseTran(Action action)
|
||||
{
|
||||
var result = baseRepository.UseTran(action) ;
|
||||
var result = baseRepository.UseTran(action);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -330,6 +330,10 @@ namespace ZR.Service
|
||||
{
|
||||
return baseRepository.GetPages(where, parm, order, orderEnum);
|
||||
}
|
||||
public PagedInfo<T> GetPages(Expression<Func<T, bool>> where, PagerInfo parm, Expression<Func<T, object>> order, string orderByType)
|
||||
{
|
||||
return baseRepository.GetPages(where, parm, order, orderByType == "desc" ? OrderByType.Desc : OrderByType.Asc);
|
||||
}
|
||||
/// <summary>
|
||||
/// 查询所有数据(无分页,请慎用)
|
||||
/// </summary>
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace ZR.Service
|
||||
PagedInfo<T> GetPages(Expression<Func<T, bool>> where, PagerInfo parm);
|
||||
|
||||
PagedInfo<T> GetPages(Expression<Func<T, bool>> where, PagerInfo parm, Expression<Func<T, object>> order, OrderByType orderEnum = OrderByType.Asc);
|
||||
|
||||
PagedInfo<T> GetPages(Expression<Func<T, bool>> where, PagerInfo parm, Expression<Func<T, object>> order, string orderType);
|
||||
bool Any(Expression<Func<T, bool>> expression);
|
||||
|
||||
ISugarQueryable<T> Queryable();
|
||||
|
||||
@@ -70,7 +70,9 @@ namespace ZR.Service.System
|
||||
if (!string.IsNullOrEmpty(genTable?.Options))
|
||||
{
|
||||
Dictionary<string, object> options = JsonConvert.DeserializeObject<Dictionary<string, object>>(genTable.Options);
|
||||
genTable.ParentMenuId = Convert.ToString(options.GetValueOrDefault("parentMenuId"));
|
||||
genTable.ParentMenuId = options.GetValueOrDefault("parentMenuId") ?? null;
|
||||
genTable.SortType = options.GetValueOrDefault("sortType") ?? "asc";
|
||||
genTable.SortField = options.GetValueOrDefault("sortField") ?? null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,6 @@ namespace ZR.Service.System.IService
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
//public int AddTaskLog(string jobId);
|
||||
public SysTasksLog AddTaskLog(string jobId, SysTasksLog tasksLog);
|
||||
SysTasksLog AddTaskLog(string jobId, SysTasksLog tasksLog);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using Infrastructure.Attribute;
|
||||
using System;
|
||||
using System.Linq.Expressions;
|
||||
using ZR.Model;
|
||||
using ZR.Model.System;
|
||||
using ZR.Repository;
|
||||
using ZR.Service.System.IService;
|
||||
@@ -34,5 +36,10 @@ namespace ZR.Service.System
|
||||
Add(logModel);
|
||||
return logModel;
|
||||
}
|
||||
|
||||
public PagedInfo<SysTasksLog> GetPages(Expression<Func<SysTasksLog, bool>> where, PagerInfo parm, Expression<Func<SysTasksLog, object>> order, string orderType)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user