|
@@ -69,7 +69,7 @@ public class DictService : BaseService, IDictService, IDynamicApi
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
[AllowAnonymous]
|
|
|
[HttpPost]
|
|
@@ -90,6 +90,30 @@ public class DictService : BaseService, IDictService, IDynamicApi
|
|
|
return dicts;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ [AllowAnonymous]
|
|
|
+ [HttpPost]
|
|
|
+ public async Task<Dictionary<string, List<DictGetListDto>>> GetListByNamesAsync(string[] names)
|
|
|
+ {
|
|
|
+ var list = await _dictRepository.Select
|
|
|
+ .Where(a => names.Contains(a.DictType.Name) && a.DictType.Enabled == true && a.Enabled == true)
|
|
|
+ .OrderBy(a => a.Sort)
|
|
|
+ .ToListAsync(a => new DictGetListDto { DictTypeName = a.DictType.Name });
|
|
|
+
|
|
|
+ var dicts = new Dictionary<string, List<DictGetListDto>>();
|
|
|
+ foreach (var name in names)
|
|
|
+ {
|
|
|
+ if (name.NotNull())
|
|
|
+ dicts[name] = list.Where(a => a.DictTypeName == name).ToList();
|
|
|
+ }
|
|
|
+
|
|
|
+ return dicts;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
|
|
|
|