修改操作日志查询接口
This commit is contained in:
@@ -6,7 +6,10 @@ namespace YLErp.Modules.RiskEngine.Dto
|
||||
public class QueryRiskAuditLogReq : BaseSearchReq
|
||||
{
|
||||
public string OperationType { get; set; }
|
||||
public string OperationTypes { get; set; }
|
||||
public string TargetType { get; set; }
|
||||
public string TargetName { get; set; }
|
||||
public string OptName { get; set; }
|
||||
public DateTime? StartDate { get; set; }
|
||||
public DateTime? EndDate { get; set; }
|
||||
public string Keyword { get; set; }
|
||||
|
||||
@@ -1461,11 +1461,27 @@ namespace YLErp.Modules.RiskEngine
|
||||
query = query.Where(l => l.OperationType == req.OperationType);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(req.OperationTypes))
|
||||
{
|
||||
var types = req.OperationTypes.Split(',', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries);
|
||||
query = query.Where(l => types.Contains(l.OperationType));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(req.TargetType))
|
||||
{
|
||||
query = query.Where(l => l.TargetType == req.TargetType);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(req.TargetName))
|
||||
{
|
||||
query = query.Where(l => l.TargetName.Contains(req.TargetName));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(req.OptName))
|
||||
{
|
||||
query = query.Where(l => l.OptName.Contains(req.OptName));
|
||||
}
|
||||
|
||||
if (req.StartDate.HasValue)
|
||||
{
|
||||
query = query.Where(l => l.OptDate >= req.StartDate.Value.Date);
|
||||
|
||||
Reference in New Issue
Block a user