sunpengfei
2025-08-19 a59e5d99a77fcb152e6fe49df78f69cb5fd6c5a0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
using Mapster;
using MediatR;
using Newtonsoft.Json;
using Swashbuckle.AspNetCore.Annotations;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace FlexJobApi.Core
{
    /// <summary>
    /// 查询地区选择器
    /// </summary>
    [Resource([EnumResourceController.Dictionary], AllowAnonymous = true)]
    public class GetAreaSelectQuery : IRequest<List<GetAreaSelectQueryResultOption>>
    {
        /// <summary>
        /// 最大深度
        /// </summary>
        public int? MaxDeep { get; set; }
    }
 
    public class GetAreaSelectQueryResultOption
    {
        public GetAreaSelectQueryResultOption()
        {
 
        }
 
        /// <summary>
        /// Id
        /// </summary>
        [JsonProperty("areaCode")]
        public string Value { get; set; }
 
        /// <summary>
        /// 地区名称
        /// </summary>
        [JsonProperty("areaName")]
        public string Label { get; set; }
 
        /// <summary>
        /// 数据
        /// </summary>
        [JsonIgnore, SwaggerIgnore]
        public GetDictionaryDataSelectQueryResultOption Data { get; set; }
 
        /// <summary>
        /// 子级
        /// </summary>
        public List<GetAreaSelectQueryResultOption> Children
        {
            get
            {
                var children = Data.Children.Adapt<List<GetAreaSelectQueryResultOption>>();
                if (children.IsNull()) return null;
                else return children;
            }
        }
 
        /// <summary>
        /// Id
        /// </summary>
        public Guid Id => Data.Id;
 
        /// <summary>
        /// 上级编号
        /// </summary>
        public string ParentCode => Data.ParentCode;
 
        /// <summary>
        /// 层级
        /// </summary>
        public int Leyer => Data.Deep;
 
        /// <summary>
        /// 排序
        /// </summary>
        public int Sort => Data.Sort;
 
        /// <summary>
        /// 快速查询
        /// </summary>
        public string QuickQuery => Data.Field2;
 
    }
 
    public class GetAreaSelectQueryResultOptionData
    {
        /// <summary>
        /// 子级
        /// </summary>
        public List<GetAreaSelectQueryResultOption> Children { get; set; }
 
        /// <summary>
        /// 编号
        /// </summary>
        public string AreaCode { get; set; }
 
        /// <summary>
        /// 上级编号
        /// </summary>
        public string ParentCode { get; set; }
 
        /// <summary>
        /// 层级
        /// </summary>
        public int Leyer { get; set; }
 
        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }
 
        /// <summary>
        /// 快速查询
        /// </summary>
        public string QuickQuery { get; set; }
    }
}