|
@@ -449,7 +449,18 @@ namespace TEAMModelOS.SDK.DI
|
|
|
StringBuilder sql;
|
|
|
sql = SQLHelper.GetSQLSelect(propertys);
|
|
|
string pk = typeof(T).Name;
|
|
|
- AzureCosmosQuery cosmosDbQuery = SQLHelper.GetSQL(jsonElement, sql, pk);
|
|
|
+ Dictionary<string, object> dict = new Dictionary<string, object>();
|
|
|
+ var emobj = jsonElement.EnumerateObject();
|
|
|
+ while (emobj.MoveNext())
|
|
|
+ {
|
|
|
+ dict[emobj.Current.Name] = emobj.Current.Value;
|
|
|
+ }
|
|
|
+ //处理code
|
|
|
+ if (dict.TryGetValue("code", out object _))
|
|
|
+ {
|
|
|
+ dict.Remove("code");
|
|
|
+ }
|
|
|
+ AzureCosmosQuery cosmosDbQuery = SQLHelper.GetSQL(dict, sql, pk);
|
|
|
QueryRequestOptions queryRequestOptions = GetDefaultQueryRequestOptions(itemsPerPage: GetEffectivePageSize(-1, null));
|
|
|
return await ResultsFromQueryAndOptions<T>(azureCosmosFactory, cosmosDbQuery, queryRequestOptions);
|
|
|
}
|