😎优化同步行政区域数据转换速度

This commit is contained in:
zuohuaijun 2025-03-28 17:41:58 +08:00
parent 14d14db4bb
commit cc52c599dc

View File

@ -310,9 +310,8 @@ public class SysRegionService : IDynamicApiController, ITransient
{
var url = $"https://dmfw.mca.gov.cn/9095/xzqh/getList?code={input.Code}&maxLevel={input.Level}";
var res = await _httpRemoteService.GetAsStringAsync(url);
dynamic clay = Clay.Parse(res);
SysRegion regionLevel0 = clay.data;
var res = await _httpRemoteService.GetAsStreamAsync(url);
SysRegion regionLevel0 = ((dynamic)Clay.Parse(res)).data;
if (regionLevel0 == null) return 0;
var areaList = new List<SysRegion>();