Commit fbe334bf by lcx

获取字典方法调整

parent d636d27c
...@@ -63,14 +63,14 @@ public PerformanceQuery(GraphQLService service) ...@@ -63,14 +63,14 @@ public PerformanceQuery(GraphQLService service)
Field<ListGraphType<ReportPerformanceType>>("dictionary", Field<ListGraphType<ReportPerformanceType>>("dictionary",
arguments: new QueryArguments( arguments: new QueryArguments(
new QueryArgument<IntGraphType>() { Name = QueryParams.reportId }, new QueryArgument<IntGraphType>() { Name = QueryParams.reportId },
new QueryArgument<ListGraphType<StringGraphType>>() { Name = QueryParams.category } new QueryArgument<ListGraphType<StringGraphType>>() { Name = QueryParams.sourceType }
), ),
resolve: context => resolve: context =>
{ {
int reportId = context.Arguments.ContainsKey(QueryParams.reportId) int reportId = context.Arguments.ContainsKey(QueryParams.reportId)
? ConvertHelper.To<int>(context.Arguments[QueryParams.reportId]) ? ConvertHelper.To<int>(context.Arguments[QueryParams.reportId])
: 15; : 15;
var parameters = GetDynamicParameters(context.Arguments, QueryParams.category); var parameters = GetDynamicParameters(context.Arguments, QueryParams.sourceType);
return service.GetReportPerformance(reportId, parameters); return service.GetReportPerformance(reportId, parameters);
} }
); );
......
...@@ -19,6 +19,8 @@ public struct QueryParams ...@@ -19,6 +19,8 @@ public struct QueryParams
public const string reportId = "reportID"; public const string reportId = "reportID";
public const string sourceType = "sourceType";
public const string category = "category"; public const string category = "category";
public const string itemName = "itemName"; public const string itemName = "itemName";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment