Эх сурвалжийг харах

新增 数据字典服务新增查询列表接口
调整 将Dictionary重命名为Dict
优化 数据字典服务查询接口排序
优化 数据字典服务新增和修改接口新增数据校验
更新初始化数据

zhontai 2 жил өмнө
parent
commit
7193882f17
51 өөрчлөгдсөн 875 нэмэгдсэн , 814 устгасан
  1. 2 2
      src/hosts/ZhonTai.Host/Configs/dbconfig.json
  2. 161 181
      src/hosts/ZhonTai.Host/InitData/Admin/ad_api.json
  3. 8 8
      src/hosts/ZhonTai.Host/InitData/Admin/ad_dict.json
  4. 2 2
      src/hosts/ZhonTai.Host/InitData/Admin/ad_dict_type.json
  5. 0 40
      src/hosts/ZhonTai.Host/InitData/Admin/ad_dictionary.tenant.json
  6. 0 18
      src/hosts/ZhonTai.Host/InitData/Admin/ad_dictionary_type.tenant.json
  7. 1 1
      src/hosts/ZhonTai.Host/InitData/Admin/ad_org.json
  8. 1 1
      src/hosts/ZhonTai.Host/InitData/Admin/ad_org.tenant.json
  9. 7 7
      src/hosts/ZhonTai.Host/InitData/Admin/ad_permission.json
  10. 112 112
      src/hosts/ZhonTai.Host/InitData/Admin/ad_permission_api.json
  11. 6 6
      src/hosts/ZhonTai.Host/InitData/Admin/ad_role.json
  12. 6 6
      src/hosts/ZhonTai.Host/InitData/Admin/ad_role.tenant.json
  13. 1 1
      src/hosts/ZhonTai.Host/InitData/Admin/ad_tenant.json
  14. 1 1
      src/hosts/ZhonTai.Host/InitData/Admin/ad_user.json
  15. 1 1
      src/hosts/ZhonTai.Host/InitData/Admin/ad_user.tenant.json
  16. 1 1
      src/hosts/ZhonTai.Host/InitData/Admin/ad_user_org.json
  17. 1 1
      src/hosts/ZhonTai.Host/InitData/Admin/ad_user_role.json
  18. 1 1
      src/hosts/ZhonTai.Host/InitData/Admin/ad_user_staff.json
  19. 1 1
      src/hosts/ZhonTai.Host/InitData/Admin/ad_user_staff.tenant.json
  20. 25 25
      src/hosts/ZhonTai.Host/InitData/Admin/ad_view.json
  21. 8 7
      src/platform/ZhonTai.Admin/Domain/Dict/DictEntity.cs
  22. 3 3
      src/platform/ZhonTai.Admin/Domain/Dict/Dto/DictGetPageDto.cs
  23. 7 0
      src/platform/ZhonTai.Admin/Domain/Dict/IDictRepository.cs
  24. 3 3
      src/platform/ZhonTai.Admin/Domain/DictType/DictTypeEntity.cs
  25. 2 2
      src/platform/ZhonTai.Admin/Domain/DictType/Dto/DictTypeGetPageDto.cs
  26. 7 0
      src/platform/ZhonTai.Admin/Domain/DictType/IDictTypeRepository.cs
  27. 0 7
      src/platform/ZhonTai.Admin/Domain/Dictionary/IDictionaryRepository.cs
  28. 0 7
      src/platform/ZhonTai.Admin/Domain/DictionaryType/IDictionaryTypeRepository.cs
  29. 6 8
      src/platform/ZhonTai.Admin/Repositories/CustomGenerateData.cs
  30. 4 4
      src/platform/ZhonTai.Admin/Repositories/CustomSyncData.cs
  31. 2 2
      src/platform/ZhonTai.Admin/Repositories/Dictionary/DictionaryRepository.cs
  32. 2 2
      src/platform/ZhonTai.Admin/Repositories/DictionaryType/DictionaryTypeRepository.cs
  33. 201 0
      src/platform/ZhonTai.Admin/Services/Dict/DictService.cs
  34. 8 3
      src/platform/ZhonTai.Admin/Services/Dict/Dto/DictAddInput.cs
  35. 32 0
      src/platform/ZhonTai.Admin/Services/Dict/Dto/DictGetListDto.cs
  36. 5 0
      src/platform/ZhonTai.Admin/Services/Dict/Dto/DictGetOutput.cs
  37. 12 2
      src/platform/ZhonTai.Admin/Services/Dict/Dto/DictGetPageOutput.cs
  38. 2 2
      src/platform/ZhonTai.Admin/Services/Dict/Dto/DictUpdateInput.cs
  39. 28 0
      src/platform/ZhonTai.Admin/Services/Dict/IDictService.cs
  40. 42 37
      src/platform/ZhonTai.Admin/Services/DictType/DictTypeService.cs
  41. 7 2
      src/platform/ZhonTai.Admin/Services/DictType/Dto/DictTypeAddInput.cs
  42. 5 0
      src/platform/ZhonTai.Admin/Services/DictType/Dto/DictTypeGetOutput.cs
  43. 6 6
      src/platform/ZhonTai.Admin/Services/DictType/Dto/DictTypeGetPageOutput.cs
  44. 2 2
      src/platform/ZhonTai.Admin/Services/DictType/Dto/DictTypeUpdateInput.cs
  45. 28 0
      src/platform/ZhonTai.Admin/Services/DictType/IDictTypeService.cs
  46. 0 170
      src/platform/ZhonTai.Admin/Services/Dictionary/DictionaryService.cs
  47. 0 5
      src/platform/ZhonTai.Admin/Services/Dictionary/Dto/DictionaryGetOutput.cs
  48. 0 28
      src/platform/ZhonTai.Admin/Services/Dictionary/IDictionaryService.cs
  49. 0 5
      src/platform/ZhonTai.Admin/Services/DictionaryType/Dto/DictionaryTypeGetOutput.cs
  50. 0 28
      src/platform/ZhonTai.Admin/Services/DictionaryType/IDictionaryTypeService.cs
  51. 115 63
      src/platform/ZhonTai.Admin/ZhonTai.Admin.xml

+ 2 - 2
src/hosts/ZhonTai.Host/Configs/dbconfig.json

@@ -66,8 +66,8 @@
     //}
   ],
 
-  //空闲时间(分),设置idleTime=0则不自动回收
-  "idleTime": 10,
+  //空闲时间(分),设置idleTime=0则不自动回收, 设置1天不使用则自动回收
+  "idleTime": 1440,
 
   //多数据库
   //定义DbKeys枚举

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 161 - 181
src/hosts/ZhonTai.Host/InitData/Admin/ad_api.json


+ 8 - 8
src/hosts/ZhonTai.Host/InitData/Admin/ad_dictionary.json → src/hosts/ZhonTai.Host/InitData/Admin/ad_dict.json

@@ -1,38 +1,38 @@
 [
   {
     "id": 187395320303685,
-    "dictionaryTypeId": 187395320434757,
-    "dictionaryType": null,
+    "dictTypeId": 187395320434757,
+    "dictType": null,
     "name": "男",
     "code": "male",
     "value": "1",
     "description": "",
     "enabled": true,
-    "sort": 0,
+    "sort": 1,
     "isDeleted": false,
     "modifiedUserId": null,
     "modifiedUserName": null,
     "modifiedTime": null,
     "createdUserId": 161223411986501,
     "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:08"
+    "createdTime": "2023-04-01T22:06:30"
   },
   {
     "id": 187395320369221,
-    "dictionaryTypeId": 187395320434757,
-    "dictionaryType": null,
+    "dictTypeId": 187395320434757,
+    "dictType": null,
     "name": "女",
     "code": "female",
     "value": "2",
     "description": "",
     "enabled": true,
-    "sort": 0,
+    "sort": 2,
     "isDeleted": false,
     "modifiedUserId": null,
     "modifiedUserName": null,
     "modifiedTime": null,
     "createdUserId": 161223411986501,
     "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:08"
+    "createdTime": "2023-04-01T22:06:30"
   }
 ]

+ 2 - 2
src/hosts/ZhonTai.Host/InitData/Admin/ad_dictionary_type.json → src/hosts/ZhonTai.Host/InitData/Admin/ad_dict_type.json

@@ -5,13 +5,13 @@
     "code": "sex",
     "description": "",
     "enabled": true,
-    "sort": 0,
+    "sort": 1,
     "isDeleted": false,
     "modifiedUserId": null,
     "modifiedUserName": null,
     "modifiedTime": null,
     "createdUserId": 161223411986501,
     "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:07"
+    "createdTime": "2023-04-01T22:06:30"
   }
 ]

+ 0 - 40
src/hosts/ZhonTai.Host/InitData/Admin/ad_dictionary.tenant.json

@@ -1,40 +0,0 @@
-[
-  {
-    "id": 187395320303685,
-    "tenantId": 161223412138053,
-    "dictionaryTypeId": 187395320434757,
-    "dictionaryType": null,
-    "name": "男",
-    "code": "male",
-    "value": "1",
-    "description": "",
-    "enabled": true,
-    "sort": 0,
-    "isDeleted": false,
-    "modifiedUserId": null,
-    "modifiedUserName": null,
-    "modifiedTime": null,
-    "createdUserId": 161223411986501,
-    "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:08"
-  },
-  {
-    "id": 187395320369221,
-    "tenantId": 161223412138053,
-    "dictionaryTypeId": 187395320434757,
-    "dictionaryType": null,
-    "name": "女",
-    "code": "female",
-    "value": "2",
-    "description": "",
-    "enabled": true,
-    "sort": 0,
-    "isDeleted": false,
-    "modifiedUserId": null,
-    "modifiedUserName": null,
-    "modifiedTime": null,
-    "createdUserId": 161223411986501,
-    "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:08"
-  }
-]

+ 0 - 18
src/hosts/ZhonTai.Host/InitData/Admin/ad_dictionary_type.tenant.json

@@ -1,18 +0,0 @@
-[
-  {
-    "id": 187395320434757,
-    "tenantId": 161223412138053,
-    "name": "性别",
-    "code": "sex",
-    "description": "",
-    "enabled": true,
-    "sort": 0,
-    "isDeleted": false,
-    "modifiedUserId": null,
-    "modifiedUserName": null,
-    "modifiedTime": null,
-    "createdUserId": 161223411986501,
-    "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:07"
-  }
-]

+ 1 - 1
src/hosts/ZhonTai.Host/InitData/Admin/ad_org.json

@@ -19,6 +19,6 @@
     "modifiedTime": null,
     "createdUserId": 161223411986501,
     "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:08"
+    "createdTime": "2023-04-01T22:06:30"
   }
 ]

+ 1 - 1
src/hosts/ZhonTai.Host/InitData/Admin/ad_org.tenant.json

@@ -20,6 +20,6 @@
     "modifiedTime": null,
     "createdUserId": 161223411986501,
     "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:08"
+    "createdTime": "2023-04-01T22:06:30"
   }
 ]

+ 7 - 7
src/hosts/ZhonTai.Host/InitData/Admin/ad_permission.json

@@ -1393,7 +1393,7 @@
         "view": null,
         "name": null,
         "path": "/platform/system",
-        "redirect": "/platform/system/dictionary",
+        "redirect": "/platform/system/dict",
         "icon": "fa fa-windows",
         "hidden": false,
         "opened": true,
@@ -2345,7 +2345,7 @@
             "viewId": 187053736300613,
             "view": null,
             "name": "admin/dict",
-            "path": "/platform/system/dictionary",
+            "path": "/platform/system/dict",
             "redirect": null,
             "icon": "fa fa-database",
             "hidden": false,
@@ -2365,7 +2365,7 @@
                 "id": 187375358951493,
                 "parentId": 187055743545413,
                 "label": "查询",
-                "code": "api:admin:dictionary:getpage",
+                "code": "api:admin:dict:getpage",
                 "type": 3,
                 "viewId": null,
                 "view": null,
@@ -2398,7 +2398,7 @@
                 "id": 187389970825285,
                 "parentId": 187055743545413,
                 "label": "修改",
-                "code": "api:admin:dictionary:update",
+                "code": "api:admin:dict:update",
                 "type": 3,
                 "viewId": null,
                 "view": null,
@@ -2431,7 +2431,7 @@
                 "id": 187390547820613,
                 "parentId": 187055743545413,
                 "label": "删除",
-                "code": "api:admin:dictionary:delete",
+                "code": "api:admin:dict:delete",
                 "type": 3,
                 "viewId": null,
                 "view": null,
@@ -2464,7 +2464,7 @@
                 "id": 187391371018309,
                 "parentId": 187055743545413,
                 "label": "批量删除",
-                "code": "api:admin:dictionary:batchsoftdelete",
+                "code": "api:admin:dict:batchsoftdelete",
                 "type": 3,
                 "viewId": null,
                 "view": null,
@@ -2497,7 +2497,7 @@
                 "id": 187391980761157,
                 "parentId": 187055743545413,
                 "label": "新增",
-                "code": "api:admin:dictionary:add",
+                "code": "api:admin:dict:add",
                 "type": 3,
                 "viewId": null,
                 "view": null,

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 112 - 112
src/hosts/ZhonTai.Host/InitData/Admin/ad_permission_api.json


+ 6 - 6
src/hosts/ZhonTai.Host/InitData/Admin/ad_role.json

@@ -19,7 +19,7 @@
     "modifiedTime": null,
     "createdUserId": 161223411986501,
     "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:08"
+    "createdTime": "2023-04-01T22:06:30"
   },
   {
     "id": 162605510979653,
@@ -41,7 +41,7 @@
     "modifiedTime": null,
     "createdUserId": 161223411986501,
     "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:08"
+    "createdTime": "2023-04-01T22:06:30"
   },
   {
     "id": 336557474730053,
@@ -63,7 +63,7 @@
     "modifiedTime": null,
     "createdUserId": 161223411986501,
     "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:08"
+    "createdTime": "2023-04-01T22:06:30"
   },
   {
     "id": 336557508276293,
@@ -85,7 +85,7 @@
     "modifiedTime": null,
     "createdUserId": 161223411986501,
     "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:08"
+    "createdTime": "2023-04-01T22:06:30"
   },
   {
     "id": 336557578817605,
@@ -107,7 +107,7 @@
     "modifiedTime": null,
     "createdUserId": 161223411986501,
     "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:08"
+    "createdTime": "2023-04-01T22:06:30"
   },
   {
     "id": 340428577087557,
@@ -129,6 +129,6 @@
     "modifiedTime": null,
     "createdUserId": 161223411986501,
     "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:08"
+    "createdTime": "2023-04-01T22:06:30"
   }
 ]

+ 6 - 6
src/hosts/ZhonTai.Host/InitData/Admin/ad_role.tenant.json

@@ -20,7 +20,7 @@
     "modifiedTime": null,
     "createdUserId": 161223411986501,
     "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:08"
+    "createdTime": "2023-04-01T22:06:30"
   },
   {
     "id": 162605510979653,
@@ -43,7 +43,7 @@
     "modifiedTime": null,
     "createdUserId": 161223411986501,
     "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:08"
+    "createdTime": "2023-04-01T22:06:30"
   },
   {
     "id": 336557474730053,
@@ -66,7 +66,7 @@
     "modifiedTime": null,
     "createdUserId": 161223411986501,
     "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:08"
+    "createdTime": "2023-04-01T22:06:30"
   },
   {
     "id": 336557508276293,
@@ -89,7 +89,7 @@
     "modifiedTime": null,
     "createdUserId": 161223411986501,
     "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:08"
+    "createdTime": "2023-04-01T22:06:30"
   },
   {
     "id": 336557578817605,
@@ -112,7 +112,7 @@
     "modifiedTime": null,
     "createdUserId": 161223411986501,
     "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:08"
+    "createdTime": "2023-04-01T22:06:30"
   },
   {
     "id": 340428577087557,
@@ -135,6 +135,6 @@
     "modifiedTime": null,
     "createdUserId": 161223411986501,
     "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:08"
+    "createdTime": "2023-04-01T22:06:30"
   }
 ]

+ 1 - 1
src/hosts/ZhonTai.Host/InitData/Admin/ad_tenant.json

@@ -17,6 +17,6 @@
     "modifiedTime": null,
     "createdUserId": 161223411986501,
     "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:08"
+    "createdTime": "2023-04-01T22:06:30"
   }
 ]

+ 1 - 1
src/hosts/ZhonTai.Host/InitData/Admin/ad_user.json

@@ -26,6 +26,6 @@
     "modifiedTime": null,
     "createdUserId": 161223411986501,
     "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:08"
+    "createdTime": "2023-04-01T22:06:30"
   }
 ]

+ 1 - 1
src/hosts/ZhonTai.Host/InitData/Admin/ad_user.tenant.json

@@ -27,6 +27,6 @@
     "modifiedTime": null,
     "createdUserId": 161223411986501,
     "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:08"
+    "createdTime": "2023-04-01T22:06:30"
   }
 ]

+ 1 - 1
src/hosts/ZhonTai.Host/InitData/Admin/ad_user_org.json

@@ -11,6 +11,6 @@
     "modifiedTime": null,
     "createdUserId": 161223411986501,
     "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:08"
+    "createdTime": "2023-04-01T22:06:30"
   }
 ]

+ 1 - 1
src/hosts/ZhonTai.Host/InitData/Admin/ad_user_role.json

@@ -7,6 +7,6 @@
     "role": null,
     "createdUserId": 161223411986501,
     "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:08"
+    "createdTime": "2023-04-01T22:06:30"
   }
 ]

+ 1 - 1
src/hosts/ZhonTai.Host/InitData/Admin/ad_user_staff.json

@@ -13,6 +13,6 @@
     "modifiedTime": null,
     "createdUserId": 161223411986501,
     "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:08"
+    "createdTime": "2023-04-01T22:06:30"
   }
 ]

+ 1 - 1
src/hosts/ZhonTai.Host/InitData/Admin/ad_user_staff.tenant.json

@@ -14,6 +14,6 @@
     "modifiedTime": null,
     "createdUserId": 161223411986501,
     "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:08"
+    "createdTime": "2023-04-01T22:06:30"
   }
 ]

+ 25 - 25
src/hosts/ZhonTai.Host/InitData/Admin/ad_view.json

@@ -27,7 +27,7 @@
         "modifiedTime": null,
         "createdUserId": 161223411986501,
         "createdUserName": "admin",
-        "createdTime": "2023-03-24T22:27:08"
+        "createdTime": "2023-04-01T22:06:30"
       },
       {
         "id": 161227168432197,
@@ -57,7 +57,7 @@
             "modifiedTime": null,
             "createdUserId": 161223411986501,
             "createdUserName": "admin",
-            "createdTime": "2023-03-24T22:27:08"
+            "createdTime": "2023-04-01T22:06:30"
           },
           {
             "id": 161227168444485,
@@ -76,7 +76,7 @@
             "modifiedTime": null,
             "createdUserId": 161223411986501,
             "createdUserName": "admin",
-            "createdTime": "2023-03-24T22:27:08"
+            "createdTime": "2023-04-01T22:06:30"
           },
           {
             "id": 161227168448582,
@@ -95,7 +95,7 @@
             "modifiedTime": null,
             "createdUserId": 161223411986501,
             "createdUserName": "admin",
-            "createdTime": "2023-03-24T22:27:08"
+            "createdTime": "2023-04-01T22:06:30"
           },
           {
             "id": 161227168456774,
@@ -114,14 +114,14 @@
             "modifiedTime": null,
             "createdUserId": 161223411986501,
             "createdUserName": "admin",
-            "createdTime": "2023-03-24T22:27:08"
+            "createdTime": "2023-04-01T22:06:30"
           },
           {
             "id": 187053736300613,
             "parentId": 161227168432197,
-            "name": "admin/dictionary",
+            "name": "admin/dict",
             "label": "数据字典",
-            "path": "admin/dictionary/index",
+            "path": "admin/dict/index",
             "description": "数据字典",
             "cache": true,
             "sort": 1,
@@ -133,7 +133,7 @@
             "modifiedTime": null,
             "createdUserId": 161223411986501,
             "createdUserName": "admin",
-            "createdTime": "2023-03-24T22:27:08"
+            "createdTime": "2023-04-01T22:06:30"
           },
           {
             "id": 336556164300869,
@@ -152,7 +152,7 @@
             "modifiedTime": null,
             "createdUserId": 161223411986501,
             "createdUserName": "admin",
-            "createdTime": "2023-03-24T22:27:08"
+            "createdTime": "2023-04-01T22:06:30"
           },
           {
             "id": 371247502852165,
@@ -171,7 +171,7 @@
             "modifiedTime": null,
             "createdUserId": 161223411986501,
             "createdUserName": "admin",
-            "createdTime": "2023-03-24T22:27:08"
+            "createdTime": "2023-04-01T22:06:30"
           }
         ],
         "isDeleted": false,
@@ -180,7 +180,7 @@
         "modifiedTime": null,
         "createdUserId": 161223411986501,
         "createdUserName": "admin",
-        "createdTime": "2023-03-24T22:27:08"
+        "createdTime": "2023-04-01T22:06:30"
       },
       {
         "id": 161227168436293,
@@ -199,7 +199,7 @@
         "modifiedTime": null,
         "createdUserId": 161223411986501,
         "createdUserName": "admin",
-        "createdTime": "2023-03-24T22:27:08"
+        "createdTime": "2023-04-01T22:06:30"
       },
       {
         "id": 161227168436294,
@@ -229,7 +229,7 @@
             "modifiedTime": null,
             "createdUserId": 161223411986501,
             "createdUserName": "admin",
-            "createdTime": "2023-03-24T22:27:08"
+            "createdTime": "2023-04-01T22:06:30"
           },
           {
             "id": 161227168440389,
@@ -248,7 +248,7 @@
             "modifiedTime": null,
             "createdUserId": 161223411986501,
             "createdUserName": "admin",
-            "createdTime": "2023-03-24T22:27:08"
+            "createdTime": "2023-04-01T22:06:30"
           },
           {
             "id": 161227168444486,
@@ -267,7 +267,7 @@
             "modifiedTime": null,
             "createdUserId": 161223411986501,
             "createdUserName": "admin",
-            "createdTime": "2023-03-24T22:27:08"
+            "createdTime": "2023-04-01T22:06:30"
           },
           {
             "id": 161227168448583,
@@ -286,7 +286,7 @@
             "modifiedTime": null,
             "createdUserId": 161223411986501,
             "createdUserName": "admin",
-            "createdTime": "2023-03-24T22:27:08"
+            "createdTime": "2023-04-01T22:06:30"
           },
           {
             "id": 174312361087045,
@@ -305,7 +305,7 @@
             "modifiedTime": null,
             "createdUserId": 161223411986501,
             "createdUserName": "admin",
-            "createdTime": "2023-03-24T22:27:08"
+            "createdTime": "2023-04-01T22:06:30"
           }
         ],
         "isDeleted": false,
@@ -314,7 +314,7 @@
         "modifiedTime": null,
         "createdUserId": 161223411986501,
         "createdUserName": "admin",
-        "createdTime": "2023-03-24T22:27:08"
+        "createdTime": "2023-04-01T22:06:30"
       },
       {
         "id": 161227168452677,
@@ -344,7 +344,7 @@
             "modifiedTime": null,
             "createdUserId": 161223411986501,
             "createdUserName": "admin",
-            "createdTime": "2023-03-24T22:27:08"
+            "createdTime": "2023-04-01T22:06:30"
           },
           {
             "id": 161227168456773,
@@ -363,7 +363,7 @@
             "modifiedTime": null,
             "createdUserId": 161223411986501,
             "createdUserName": "admin",
-            "createdTime": "2023-03-24T22:27:08"
+            "createdTime": "2023-04-01T22:06:30"
           }
         ],
         "isDeleted": false,
@@ -372,7 +372,7 @@
         "modifiedTime": null,
         "createdUserId": 161223411986501,
         "createdUserName": "admin",
-        "createdTime": "2023-03-24T22:27:08"
+        "createdTime": "2023-04-01T22:06:30"
       }
     ],
     "isDeleted": false,
@@ -381,7 +381,7 @@
     "modifiedTime": null,
     "createdUserId": 161223411986501,
     "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:08"
+    "createdTime": "2023-04-01T22:06:30"
   },
   {
     "id": 361047466754117,
@@ -411,7 +411,7 @@
         "modifiedTime": null,
         "createdUserId": 161223411986501,
         "createdUserName": "admin",
-        "createdTime": "2023-03-24T22:27:08"
+        "createdTime": "2023-04-01T22:06:30"
       },
       {
         "id": 361047841796165,
@@ -430,7 +430,7 @@
         "modifiedTime": null,
         "createdUserId": 161223411986501,
         "createdUserName": "admin",
-        "createdTime": "2023-03-24T22:27:08"
+        "createdTime": "2023-04-01T22:06:30"
       }
     ],
     "isDeleted": false,
@@ -439,6 +439,6 @@
     "modifiedTime": null,
     "createdUserId": 161223411986501,
     "createdUserName": "admin",
-    "createdTime": "2023-03-24T22:27:08"
+    "createdTime": "2023-04-01T22:06:30"
   }
 ]

+ 8 - 7
src/platform/ZhonTai.Admin/Domain/Dictionary/DictionaryEntity.cs → src/platform/ZhonTai.Admin/Domain/Dict/DictEntity.cs

@@ -1,25 +1,26 @@
 using ZhonTai.Admin.Core.Entities;
 using FreeSql.DataAnnotations;
-using ZhonTai.Admin.Domain.DictionaryType;
+using ZhonTai.Admin.Domain.DictType;
 
-namespace ZhonTai.Admin.Domain.Dictionary;
+namespace ZhonTai.Admin.Domain.Dict;
 
 /// <summary>
 /// 数据字典
 /// </summary>
-[Table(Name = "ad_dictionary")]
-[Index("idx_{tablename}_01", nameof(DictionaryTypeId) + "," + nameof(Name) + "," + nameof(TenantId), true)]
-public partial class DictionaryEntity : EntityTenant
+[Table(Name = "ad_dict", OldName = "ad_dictionary")]
+[Index("idx_{tablename}_01", nameof(DictTypeId) + "," + nameof(Name) + "," + nameof(TenantId), true)]
+public partial class DictEntity : EntityTenant
 {
     /// <summary>
     /// 字典类型Id
     /// </summary>
-    public long DictionaryTypeId { get; set; }
+    [Column(OldName = "DictionaryTypeId")]
+    public long DictTypeId { get; set; }
 
     /// <summary>
     /// 字典类型
     /// </summary>
-    public DictionaryTypeEntity DictionaryType { get; set; }
+    public DictTypeEntity DictType { get; set; }
 
     /// <summary>
     /// 字典名称

+ 3 - 3
src/platform/ZhonTai.Admin/Domain/Dictionary/Dto/DictionaryGetPageDto.cs → src/platform/ZhonTai.Admin/Domain/Dict/Dto/DictGetPageDto.cs

@@ -1,12 +1,12 @@
 
-namespace ZhonTai.Admin.Domain.Dictionary.Dto;
+namespace ZhonTai.Admin.Domain.Dict.Dto;
 
-public partial class DictionaryGetPageDto
+public partial class DictGetPageDto
 {
     /// <summary>
     /// 字典类型Id
     /// </summary>
-    public long DictionaryTypeId { get; set; }
+    public long DictTypeId { get; set; }
 
     /// <summary>
     /// 字典名称

+ 7 - 0
src/platform/ZhonTai.Admin/Domain/Dict/IDictRepository.cs

@@ -0,0 +1,7 @@
+using ZhonTai.Admin.Core.Repositories;
+
+namespace ZhonTai.Admin.Domain.Dict;
+
+public interface IDictRepository : IRepositoryBase<DictEntity>
+{
+}

+ 3 - 3
src/platform/ZhonTai.Admin/Domain/DictionaryType/DictionaryTypeEntity.cs → src/platform/ZhonTai.Admin/Domain/DictType/DictTypeEntity.cs

@@ -1,14 +1,14 @@
 using ZhonTai.Admin.Core.Entities;
 using FreeSql.DataAnnotations;
 
-namespace ZhonTai.Admin.Domain.DictionaryType;
+namespace ZhonTai.Admin.Domain.DictType;
 
 /// <summary>
 /// 数据字典类型
 /// </summary>
-[Table(Name = "ad_dictionary_type")]
+[Table(Name = "ad_dict_type", OldName = "ad_dictionary_type")]
 [Index("idx_{tablename}_01", nameof(Name) + "," + nameof(TenantId), true)]
-public class DictionaryTypeEntity : EntityTenant
+public class DictTypeEntity : EntityTenant
 {
     /// <summary>
     /// 名称

+ 2 - 2
src/platform/ZhonTai.Admin/Domain/DictionaryType/Dto/DictionaryTypeGetPageDto.cs → src/platform/ZhonTai.Admin/Domain/DictType/Dto/DictTypeGetPageDto.cs

@@ -1,7 +1,7 @@
 
-namespace ZhonTai.Admin.Domain.DictionaryType.Dto;
+namespace ZhonTai.Admin.Domain.DictType.Dto;
 
-public partial class DictionaryTypeGetPageDto
+public partial class DictTypeGetPageDto
 {
     /// <summary>
     /// 字典名称

+ 7 - 0
src/platform/ZhonTai.Admin/Domain/DictType/IDictTypeRepository.cs

@@ -0,0 +1,7 @@
+using ZhonTai.Admin.Core.Repositories;
+
+namespace ZhonTai.Admin.Domain.DictType;
+
+public interface IDictTypeRepository : IRepositoryBase<DictTypeEntity>
+{
+}

+ 0 - 7
src/platform/ZhonTai.Admin/Domain/Dictionary/IDictionaryRepository.cs

@@ -1,7 +0,0 @@
-using ZhonTai.Admin.Core.Repositories;
-
-namespace ZhonTai.Admin.Domain.Dictionary;
-
-public interface IDictionaryRepository : IRepositoryBase<DictionaryEntity>
-{
-}

+ 0 - 7
src/platform/ZhonTai.Admin/Domain/DictionaryType/IDictionaryTypeRepository.cs

@@ -1,7 +0,0 @@
-using ZhonTai.Admin.Core.Repositories;
-
-namespace ZhonTai.Admin.Domain.DictionaryType;
-
-public interface IDictionaryTypeRepository : IRepositoryBase<DictionaryTypeEntity>
-{
-}

+ 6 - 8
src/platform/ZhonTai.Admin/Repositories/CustomGenerateData.cs

@@ -2,8 +2,8 @@
 using System.Linq;
 using System.Threading.Tasks;
 using ZhonTai.Admin.Core.Db;
-using ZhonTai.Admin.Domain.DictionaryType;
-using ZhonTai.Admin.Domain.Dictionary;
+using ZhonTai.Admin.Domain.DictType;
+using ZhonTai.Admin.Domain.Dict;
 using ZhonTai.Admin.Domain.Api;
 using ZhonTai.Admin.Domain.Permission;
 using ZhonTai.Admin.Domain.User;
@@ -33,9 +33,9 @@ public class CustomGenerateData : GenerateData, IGenerateData
         //admin
         #region 数据字典
 
-        var dictionaryTypes = await db.Queryable<DictionaryTypeEntity>().ToListAsync();
+        var dictionaryTypes = await db.Queryable<DictTypeEntity>().ToListAsync();
 
-        var dictionaries = await db.Queryable<DictionaryEntity>().ToListAsync();
+        var dictionaries = await db.Queryable<DictEntity>().ToListAsync();
         #endregion
 
         #region 接口
@@ -182,8 +182,6 @@ public class CustomGenerateData : GenerateData, IGenerateData
 
         var isTenant = appConfig.Tenant;
 
-        SaveDataToJsonFile<DictionaryEntity>(dictionaries, isTenant);
-        SaveDataToJsonFile<DictionaryTypeEntity>(dictionaryTypes, isTenant);
         SaveDataToJsonFile<UserEntity>(users, isTenant);
         SaveDataToJsonFile<RoleEntity>(roles, isTenant);
         SaveDataToJsonFile<OrgEntity>(orgTree, isTenant);
@@ -191,8 +189,6 @@ public class CustomGenerateData : GenerateData, IGenerateData
         if (isTenant)
         {
             var tenantIds = tenants?.Select(a => a.Id)?.ToList();
-            SaveDataToJsonFile<DictionaryEntity>(dictionaries.Where(a => tenantIds.Contains(a.TenantId.Value)));
-            SaveDataToJsonFile<DictionaryTypeEntity>(dictionaryTypes.Where(a => tenantIds.Contains(a.TenantId.Value)));
             SaveDataToJsonFile<UserEntity>(users.Where(a => tenantIds.Contains(a.TenantId.Value)), false);
             SaveDataToJsonFile<RoleEntity>(roles.Where(a => tenantIds.Contains(a.TenantId.Value)));
             orgTree = orgs.Clone().Where(a => tenantIds.Contains(a.TenantId.Value)).ToList().ToTree((r, c) =>
@@ -211,6 +207,8 @@ public class CustomGenerateData : GenerateData, IGenerateData
             SaveDataToJsonFile<OrgEntity>(orgTree);
             SaveDataToJsonFile<UserStaffEntity>(staffs.Where(a => tenantIds.Contains(a.TenantId.Value)));
         }
+        SaveDataToJsonFile<DictEntity>(dictionaries);
+        SaveDataToJsonFile<DictTypeEntity>(dictionaryTypes);
         SaveDataToJsonFile<UserRoleEntity>(userRoles);
         SaveDataToJsonFile<UserOrgEntity>(userOrgs);
         SaveDataToJsonFile<ApiEntity>(apiTree);

+ 4 - 4
src/platform/ZhonTai.Admin/Repositories/CustomSyncData.cs

@@ -1,6 +1,6 @@
 using System.Threading.Tasks;
-using ZhonTai.Admin.Domain.DictionaryType;
-using ZhonTai.Admin.Domain.Dictionary;
+using ZhonTai.Admin.Domain.DictType;
+using ZhonTai.Admin.Domain.Dict;
 using ZhonTai.Admin.Domain.Api;
 using ZhonTai.Admin.Domain.Permission;
 using ZhonTai.Admin.Domain.User;
@@ -29,10 +29,10 @@ public class CustomSyncData : SyncData, ISyncData
         using var tran = uow.GetOrBeginTransaction();
         var isTenant = appConfig.Tenant;
 
-        var dictionaryTypes = GetData<DictionaryTypeEntity>(isTenant, dbConfig.SyncDataPath);
+        var dictionaryTypes = GetData<DictTypeEntity>(path: dbConfig.SyncDataPath);
         await InitDataAsync(db, uow, tran, dictionaryTypes, dbConfig);
 
-        var dictionaries = GetData<DictionaryEntity>(isTenant, dbConfig.SyncDataPath);
+        var dictionaries = GetData<DictEntity>(path: dbConfig.SyncDataPath);
         await InitDataAsync(db, uow, tran, dictionaries, dbConfig);
 
         var users = GetData<UserEntity>(isTenant, dbConfig.SyncDataPath);

+ 2 - 2
src/platform/ZhonTai.Admin/Repositories/Dictionary/DictionaryRepository.cs

@@ -1,9 +1,9 @@
 using ZhonTai.Admin.Core.Db.Transaction;
-using ZhonTai.Admin.Domain.Dictionary;
+using ZhonTai.Admin.Domain.Dict;
 
 namespace ZhonTai.Admin.Repositories;
 
-public class DictionaryRepository : AdminRepositoryBase<DictionaryEntity>, IDictionaryRepository
+public class DictionaryRepository : AdminRepositoryBase<DictEntity>, IDictRepository
 {
     public DictionaryRepository(UnitOfWorkManagerCloud uowm) : base(uowm)
     {

+ 2 - 2
src/platform/ZhonTai.Admin/Repositories/DictionaryType/DictionaryTypeRepository.cs

@@ -1,9 +1,9 @@
 using ZhonTai.Admin.Core.Db.Transaction;
-using ZhonTai.Admin.Domain.DictionaryType;
+using ZhonTai.Admin.Domain.DictType;
 
 namespace ZhonTai.Admin.Repositories;
 
-public class DictionaryTypeRepository : AdminRepositoryBase<DictionaryTypeEntity>, IDictionaryTypeRepository
+public class DictionaryTypeRepository : AdminRepositoryBase<DictTypeEntity>, IDictTypeRepository
 {
     public DictionaryTypeRepository(UnitOfWorkManagerCloud uowm) : base(uowm)
     {

+ 201 - 0
src/platform/ZhonTai.Admin/Services/Dict/DictService.cs

@@ -0,0 +1,201 @@
+using System.Threading.Tasks;
+using ZhonTai.Admin.Core.Dto;
+using ZhonTai.Admin.Domain.Dict;
+using ZhonTai.Admin.Services.Dict.Dto;
+using ZhonTai.Admin.Domain.Dict.Dto;
+using ZhonTai.DynamicApi;
+using ZhonTai.DynamicApi.Attributes;
+using Microsoft.AspNetCore.Mvc;
+using ZhonTai.Admin.Core.Consts;
+using System.Linq;
+using System.Collections.Generic;
+using Microsoft.AspNetCore.Authorization;
+
+namespace ZhonTai.Admin.Services.Dict;
+
+/// <summary>
+/// 数据字典服务
+/// </summary>
+[Order(60)]
+[DynamicApi(Area = AdminConsts.AreaName)]
+public class DictService : BaseService, IDictService, IDynamicApi
+{
+    private readonly IDictRepository _dictRepository;
+
+    public DictService(IDictRepository dictRepository)
+    {
+        _dictRepository = dictRepository;
+    }
+
+    /// <summary>
+    /// 查询
+    /// </summary>
+    /// <param name="id"></param>
+    /// <returns></returns>
+    public async Task<DictGetOutput> GetAsync(long id)
+    {
+        var result = await _dictRepository.GetAsync<DictGetOutput>(id);
+        return result;
+    }
+
+    /// <summary>
+    /// 查询分页
+    /// </summary>
+    /// <param name="input"></param>
+    /// <returns></returns>
+    [HttpPost]
+    public async Task<PageOutput<DictGetPageOutput>> GetPageAsync(PageInput<DictGetPageDto> input)
+    {
+        var key = input.Filter?.Name;
+        var dictTypeId = input.Filter?.DictTypeId;
+        var list = await _dictRepository.Select
+        .WhereDynamicFilter(input.DynamicFilter)
+        .WhereIf(dictTypeId.HasValue && dictTypeId.Value > 0, a => a.DictTypeId == dictTypeId)
+        .WhereIf(key.NotNull(), a => a.Name.Contains(key) || a.Code.Contains(key))
+        .Count(out var total)
+        .OrderByDescending(a => a.Sort)
+        .Page(input.CurrentPage, input.PageSize)
+        .ToListAsync<DictGetPageOutput>();
+
+        var data = new PageOutput<DictGetPageOutput>()
+        {
+            List = list,
+            Total = total
+        };
+
+        return data;
+    }
+
+    /// <summary>
+    /// 查询列表
+    /// </summary>
+    /// <param name="codes">编码列表</param>
+    /// <returns></returns>
+    [AllowAnonymous]
+    [HttpPost]
+    public async Task<Dictionary<string, List<DictGetListDto>>> GetListAsync(string[] codes)
+    {
+        var list = await _dictRepository.Select
+        .Where(a => codes.Contains(a.DictType.Code) && a.DictType.Enabled == true && a.Enabled == true)
+        .OrderBy(a => a.Sort)
+        .ToListAsync(a => new DictGetListDto { DictTypeCode = a.DictType.Code });
+
+        var dicts = new Dictionary<string, List<DictGetListDto>>();
+        foreach (var code in codes)
+        {
+            if (code.NotNull())
+                dicts[code] = list.Where(a => a.DictTypeCode == code).ToList();
+        }
+
+        return dicts;
+    }
+
+    /// <summary>
+    /// 新增
+    /// </summary>
+    /// <param name="input"></param>
+    /// <returns></returns>
+    public async Task<long> AddAsync(DictAddInput input)
+    {
+        if (await _dictRepository.Select.AnyAsync(a => a.DictTypeId == input.DictTypeId && a.Name == input.Name))
+        {
+            throw ResultOutput.Exception($"字典已存在");
+        }
+
+        if (input.Code.NotNull() && await _dictRepository.Select.AnyAsync(a => a.DictTypeId == input.DictTypeId && a.Code == input.Code))
+        {
+            throw ResultOutput.Exception($"字典编码已存在");
+        }
+
+        if (input.Code.NotNull() && await _dictRepository.Select.AnyAsync(a => a.DictTypeId == input.DictTypeId && a.Code == input.Code))
+        {
+            throw ResultOutput.Exception($"字典编码已存在");
+        }
+
+        if (input.Value.NotNull() && await _dictRepository.Select.AnyAsync(a => a.DictTypeId == input.DictTypeId && a.Value == input.Value))
+        {
+            throw ResultOutput.Exception($"字典值已存在");
+        }
+
+        var entity = Mapper.Map<DictEntity>(input);
+        if (entity.Sort == 0)
+        {
+            var sort = await _dictRepository.Select.Where(a => a.DictTypeId == input.DictTypeId).MaxAsync(a => a.Sort);
+            entity.Sort = sort + 1;
+        }
+        await _dictRepository.InsertAsync(entity);
+        return entity.Id;
+    }
+
+    /// <summary>
+    /// 修改
+    /// </summary>
+    /// <param name="input"></param>
+    /// <returns></returns>
+    public async Task UpdateAsync(DictUpdateInput input)
+    {
+        var entity = await _dictRepository.GetAsync(input.Id);
+        if (!(entity?.Id > 0))
+        {
+            throw ResultOutput.Exception("字典不存在");
+        }
+
+        if (await _dictRepository.Select.AnyAsync(a => a.Id != input.Id && a.DictTypeId == input.DictTypeId && a.Name == input.Name))
+        {
+            throw ResultOutput.Exception($"字典已存在");
+        }
+
+        if (input.Code.NotNull() && await _dictRepository.Select.AnyAsync(a => a.Id != input.Id && a.DictTypeId == input.DictTypeId && a.Code == input.Code))
+        {
+            throw ResultOutput.Exception($"字典编码已存在");
+        }
+
+        if (input.Value.NotNull() && await _dictRepository.Select.AnyAsync(a => a.Id != input.Id && a.DictTypeId == input.DictTypeId && a.Value == input.Value))
+        {
+            throw ResultOutput.Exception($"字典值已存在");
+        }
+
+        Mapper.Map(input, entity);
+        await _dictRepository.UpdateAsync(entity);
+    }
+
+    /// <summary>
+    /// 彻底删除
+    /// </summary>
+    /// <param name="id"></param>
+    /// <returns></returns>
+    public async Task DeleteAsync(long id)
+    {
+        await _dictRepository.DeleteAsync(m => m.Id == id);
+    }
+
+    /// <summary>
+    /// 批量彻底删除
+    /// </summary>
+    /// <param name="ids"></param>
+    /// <returns></returns>
+    public async Task BatchDeleteAsync(long[] ids)
+    {
+        await _dictRepository.DeleteAsync(a => ids.Contains(a.Id));
+    }
+
+    /// <summary>
+    /// 删除
+    /// </summary>
+    /// <param name="id"></param>
+    /// <returns></returns>
+    public async Task SoftDeleteAsync(long id)
+    {
+        await _dictRepository.SoftDeleteAsync(id);
+    }
+
+    /// <summary>
+    /// 批量删除
+    /// </summary>
+    /// <param name="ids"></param>
+    /// <returns></returns>
+    public async Task BatchSoftDeleteAsync(long[] ids)
+    {
+        await _dictRepository.SoftDeleteAsync(ids);
+    }
+}

+ 8 - 3
src/platform/ZhonTai.Admin/Services/Dictionary/Dto/DictionaryAddInput.cs → src/platform/ZhonTai.Admin/Services/Dict/Dto/DictAddInput.cs

@@ -1,18 +1,18 @@
 using System.ComponentModel.DataAnnotations;
 using ZhonTai.Admin.Core.Validators;
 
-namespace ZhonTai.Admin.Services.Dictionary.Dto;
+namespace ZhonTai.Admin.Services.Dict.Dto;
 
 /// <summary>
 /// 添加字典
 /// </summary>
-public class DictionaryAddInput
+public class DictAddInput
 {
     /// <summary>
     /// 字典类型Id
     /// </summary>
     [ValidateRequired(ErrorMessage = "请选择字典类型")]
-    public long DictionaryTypeId { get; set; }
+    public long DictTypeId { get; set; }
 
     /// <summary>
     /// 字典名称
@@ -39,4 +39,9 @@ public class DictionaryAddInput
     /// 启用
     /// </summary>
 	public bool Enabled { get; set; }
+
+    /// <summary>
+    /// 排序
+    /// </summary>
+    public int Sort { get; set; }
 }

+ 32 - 0
src/platform/ZhonTai.Admin/Services/Dict/Dto/DictGetListDto.cs

@@ -0,0 +1,32 @@
+using Newtonsoft.Json;
+
+namespace ZhonTai.Admin.Services.Dict.Dto;
+
+public class DictGetListDto
+{
+    /// <summary>
+    /// 字典类型编码
+    /// </summary>
+    [JsonIgnore]
+    public string DictTypeCode { get; set; }
+
+    /// <summary>
+    /// 主键Id
+    /// </summary>
+    public long Id { get; set; }
+
+    /// <summary>
+    /// 字典名称
+    /// </summary>
+    public string Name { get; set; }
+
+    /// <summary>
+    /// 字典编码
+    /// </summary>
+    public string Code { get; set; }
+
+    /// <summary>
+    /// 字典值
+    /// </summary>
+    public string Value { get; set; }
+}

+ 5 - 0
src/platform/ZhonTai.Admin/Services/Dict/Dto/DictGetOutput.cs

@@ -0,0 +1,5 @@
+namespace ZhonTai.Admin.Services.Dict.Dto;
+
+public class DictGetOutput : DictUpdateInput
+{
+}

+ 12 - 2
src/platform/ZhonTai.Admin/Services/DictionaryType/Dto/DictionaryTypeListOutput.cs → src/platform/ZhonTai.Admin/Services/Dict/Dto/DictGetPageOutput.cs

@@ -1,6 +1,6 @@
-namespace ZhonTai.Admin.Services.DictionaryType.Dto;
+namespace ZhonTai.Admin.Services.Dict.Dto;
 
-public class DictionaryTypeListOutput
+public class DictGetPageOutput
 {
     /// <summary>
     /// 主键Id
@@ -17,8 +17,18 @@ public class DictionaryTypeListOutput
     /// </summary>
     public string Code { get; set; }
 
+    /// <summary>
+    /// 字典值
+    /// </summary>
+    public string Value { get; set; }
+
     /// <summary>
     /// 启用
     /// </summary>
 	public bool Enabled { get; set; }
+
+    /// <summary>
+    /// 排序
+    /// </summary>
+    public int Sort { get; set; }
 }

+ 2 - 2
src/platform/ZhonTai.Admin/Services/Dictionary/Dto/DictionaryUpdateInput.cs → src/platform/ZhonTai.Admin/Services/Dict/Dto/DictUpdateInput.cs

@@ -1,12 +1,12 @@
 using System.ComponentModel.DataAnnotations;
 using ZhonTai.Admin.Core.Validators;
 
-namespace ZhonTai.Admin.Services.Dictionary.Dto;
+namespace ZhonTai.Admin.Services.Dict.Dto;
 
 /// <summary>
 /// 修改
 /// </summary>
-public class DictionaryUpdateInput : DictionaryAddInput
+public class DictUpdateInput : DictAddInput
 {
     /// <summary>
     /// 主键Id

+ 28 - 0
src/platform/ZhonTai.Admin/Services/Dict/IDictService.cs

@@ -0,0 +1,28 @@
+using ZhonTai.Admin.Core.Dto;
+using System.Threading.Tasks;
+using ZhonTai.Admin.Services.Dict.Dto;
+using ZhonTai.Admin.Domain.Dict.Dto;
+
+namespace ZhonTai.Admin.Services.Dict;
+
+/// <summary>
+/// 数据字典接口
+/// </summary>
+public partial interface IDictService
+{
+    Task<DictGetOutput> GetAsync(long id);
+
+    Task<PageOutput<DictGetPageOutput>> GetPageAsync(PageInput<DictGetPageDto> input);
+
+    Task<long> AddAsync(DictAddInput input);
+
+    Task UpdateAsync(DictUpdateInput input);
+
+    Task DeleteAsync(long id);
+
+    Task BatchDeleteAsync(long[] ids);
+
+    Task SoftDeleteAsync(long id);
+
+    Task BatchSoftDeleteAsync(long[] ids);
+}

+ 42 - 37
src/platform/ZhonTai.Admin/Services/DictionaryType/DictionaryTypeService.cs → src/platform/ZhonTai.Admin/Services/DictType/DictTypeService.cs

@@ -2,30 +2,30 @@
 using System.Threading.Tasks;
 using ZhonTai.Admin.Core.Attributes;
 using ZhonTai.Admin.Core.Dto;
-using ZhonTai.Admin.Services.DictionaryType.Dto;
-using ZhonTai.Admin.Domain.DictionaryType;
-using ZhonTai.Admin.Domain.Dictionary;
-using ZhonTai.Admin.Domain.DictionaryType.Dto;
+using ZhonTai.Admin.Services.DictType.Dto;
+using ZhonTai.Admin.Domain.DictType;
+using ZhonTai.Admin.Domain.Dict;
+using ZhonTai.Admin.Domain.DictType.Dto;
 using ZhonTai.DynamicApi;
 using ZhonTai.DynamicApi.Attributes;
 using Microsoft.AspNetCore.Mvc;
 using ZhonTai.Admin.Core.Consts;
 
-namespace ZhonTai.Admin.Services.DictionaryType;
+namespace ZhonTai.Admin.Services.DictType;
 
 /// <summary>
 /// 数据字典类型服务
 /// </summary>
 [Order(61)]
 [DynamicApi(Area = AdminConsts.AreaName)]
-public class DictionaryTypeService : BaseService, IDictionaryTypeService, IDynamicApi
+public class DictTypeService : BaseService, IDictTypeService, IDynamicApi
 {
-    private readonly IDictionaryTypeRepository _DictionaryTypeRepository;
-    private readonly IDictionaryRepository _dictionaryRepository;
-    public DictionaryTypeService(IDictionaryTypeRepository DictionaryTypeRepository, IDictionaryRepository dictionaryRepository)
+    private readonly IDictTypeRepository _dictTypeRepository;
+    private readonly IDictRepository _dictRepository;
+    public DictTypeService(IDictTypeRepository DictionaryTypeRepository, IDictRepository dictRepository)
     {
-        _DictionaryTypeRepository = DictionaryTypeRepository;
-        _dictionaryRepository = dictionaryRepository;
+        _dictTypeRepository = DictionaryTypeRepository;
+        _dictRepository = dictRepository;
     }
 
     /// <summary>
@@ -33,9 +33,9 @@ public class DictionaryTypeService : BaseService, IDictionaryTypeService, IDynam
     /// </summary>
     /// <param name="id"></param>
     /// <returns></returns>
-    public async Task<DictionaryTypeGetOutput> GetAsync(long id)
+    public async Task<DictTypeGetOutput> GetAsync(long id)
     {
-        var result = await _DictionaryTypeRepository.GetAsync<DictionaryTypeGetOutput>(id);
+        var result = await _dictTypeRepository.GetAsync<DictTypeGetOutput>(id);
         return result;
     }
 
@@ -45,19 +45,19 @@ public class DictionaryTypeService : BaseService, IDictionaryTypeService, IDynam
     /// <param name="input"></param>
     /// <returns></returns>
     [HttpPost]
-    public async Task<PageOutput<DictionaryTypeListOutput>> GetPageAsync(PageInput<DictionaryTypeGetPageDto> input)
+    public async Task<PageOutput<DictTypeGetPageOutput>> GetPageAsync(PageInput<DictTypeGetPageDto> input)
     {
         var key = input.Filter?.Name;
 
-        var list = await _DictionaryTypeRepository.Select
+        var list = await _dictTypeRepository.Select
         .WhereDynamicFilter(input.DynamicFilter)
         .WhereIf(key.NotNull(), a => a.Name.Contains(key) || a.Code.Contains(key))
         .Count(out var total)
-        .OrderByDescending(true, c => c.Id)
+        .OrderByDescending(a => a.Sort)
         .Page(input.CurrentPage, input.PageSize)
-        .ToListAsync<DictionaryTypeListOutput>();
+        .ToListAsync<DictTypeGetPageOutput>();
 
-        var data = new PageOutput<DictionaryTypeListOutput>()
+        var data = new PageOutput<DictTypeGetPageOutput>()
         {
             List = list,
             Total = total
@@ -71,21 +71,26 @@ public class DictionaryTypeService : BaseService, IDictionaryTypeService, IDynam
     /// </summary>
     /// <param name="input"></param>
     /// <returns></returns>
-    public async Task<long> AddAsync(DictionaryTypeAddInput input)
+    public async Task<long> AddAsync(DictTypeAddInput input)
     {
-        if (await _DictionaryTypeRepository.Select.AnyAsync(a => a.Name == input.Name))
+        if (await _dictTypeRepository.Select.AnyAsync(a => a.Name == input.Name))
         {
             throw ResultOutput.Exception($"字典类型已存在");
         }
 
-        if (input.Code.NotNull() && await _DictionaryTypeRepository.Select.AnyAsync(a => a.Code == input.Code))
+        if (input.Code.NotNull() && await _dictTypeRepository.Select.AnyAsync(a => a.Code == input.Code))
         {
             throw ResultOutput.Exception($"字典类型编码已存在");
         }
 
-        var DictionaryType = Mapper.Map<DictionaryTypeEntity>(input);
-        await _DictionaryTypeRepository.InsertAsync(DictionaryType);
-        return DictionaryType.Id;
+        var entity = Mapper.Map<DictTypeEntity>(input);
+        if (entity.Sort == 0)
+        {
+            var sort = await _dictRepository.Select.MaxAsync(a => a.Sort);
+            entity.Sort = sort + 1;
+        }
+        await _dictTypeRepository.InsertAsync(entity);
+        return entity.Id;
     }
 
     /// <summary>
@@ -93,26 +98,26 @@ public class DictionaryTypeService : BaseService, IDictionaryTypeService, IDynam
     /// </summary>
     /// <param name="input"></param>
     /// <returns></returns>
-    public async Task UpdateAsync(DictionaryTypeUpdateInput input)
+    public async Task UpdateAsync(DictTypeUpdateInput input)
     {
-        var entity = await _DictionaryTypeRepository.GetAsync(input.Id);
+        var entity = await _dictTypeRepository.GetAsync(input.Id);
         if (!(entity?.Id > 0))
         {
             throw ResultOutput.Exception("数据字典不存在");
         }
 
-        if (await _DictionaryTypeRepository.Select.AnyAsync(a => a.Id != input.Id && a.Name == input.Name))
+        if (await _dictTypeRepository.Select.AnyAsync(a => a.Id != input.Id && a.Name == input.Name))
         {
             throw ResultOutput.Exception($"字典类型已存在");
         }
 
-        if (input.Code.NotNull() && await _DictionaryTypeRepository.Select.AnyAsync(a => a.Id != input.Id && a.Code == input.Code))
+        if (input.Code.NotNull() && await _dictTypeRepository.Select.AnyAsync(a => a.Id != input.Id && a.Code == input.Code))
         {
             throw ResultOutput.Exception($"字典类型编码已存在");
         }
 
         Mapper.Map(input, entity);
-        await _DictionaryTypeRepository.UpdateAsync(entity);
+        await _dictTypeRepository.UpdateAsync(entity);
     }
 
     /// <summary>
@@ -124,10 +129,10 @@ public class DictionaryTypeService : BaseService, IDictionaryTypeService, IDynam
     public virtual async Task DeleteAsync(long id)
     {
         //删除字典数据
-        await _dictionaryRepository.DeleteAsync(a => a.DictionaryTypeId == id);
+        await _dictRepository.DeleteAsync(a => a.DictTypeId == id);
 
         //删除数据字典类型
-        await _DictionaryTypeRepository.DeleteAsync(a => a.Id == id);
+        await _dictTypeRepository.DeleteAsync(a => a.Id == id);
     }
 
     /// <summary>
@@ -139,10 +144,10 @@ public class DictionaryTypeService : BaseService, IDictionaryTypeService, IDynam
     public virtual async Task BatchDeleteAsync(long[] ids)
     {
         //删除字典数据
-        await _dictionaryRepository.DeleteAsync(a => ids.Contains(a.DictionaryTypeId));
+        await _dictRepository.DeleteAsync(a => ids.Contains(a.DictTypeId));
 
         //删除数据字典类型
-        await _DictionaryTypeRepository.DeleteAsync(a => ids.Contains(a.Id));
+        await _dictTypeRepository.DeleteAsync(a => ids.Contains(a.Id));
     }
 
     /// <summary>
@@ -153,8 +158,8 @@ public class DictionaryTypeService : BaseService, IDictionaryTypeService, IDynam
     [AdminTransaction]
     public virtual async Task SoftDeleteAsync(long id)
     {
-        await _dictionaryRepository.SoftDeleteAsync(a => a.DictionaryTypeId == id);
-        await _DictionaryTypeRepository.SoftDeleteAsync(id);
+        await _dictRepository.SoftDeleteAsync(a => a.DictTypeId == id);
+        await _dictTypeRepository.SoftDeleteAsync(id);
     }
 
     /// <summary>
@@ -165,7 +170,7 @@ public class DictionaryTypeService : BaseService, IDictionaryTypeService, IDynam
     [AdminTransaction]
     public virtual async Task BatchSoftDeleteAsync(long[] ids)
     {
-        await _dictionaryRepository.SoftDeleteAsync(a => ids.Contains(a.DictionaryTypeId));
-        await _DictionaryTypeRepository.SoftDeleteAsync(ids);
+        await _dictRepository.SoftDeleteAsync(a => ids.Contains(a.DictTypeId));
+        await _dictTypeRepository.SoftDeleteAsync(ids);
     }
 }

+ 7 - 2
src/platform/ZhonTai.Admin/Services/DictionaryType/Dto/DictionaryTypeAddInput.cs → src/platform/ZhonTai.Admin/Services/DictType/Dto/DictTypeAddInput.cs

@@ -1,11 +1,11 @@
 using System.ComponentModel.DataAnnotations;
 
-namespace ZhonTai.Admin.Services.DictionaryType.Dto;
+namespace ZhonTai.Admin.Services.DictType.Dto;
 
 /// <summary>
 /// 添加字典类型
 /// </summary>
-public class DictionaryTypeAddInput
+public class DictTypeAddInput
 {
     /// <summary>
     /// 字典类型名称
@@ -27,4 +27,9 @@ public class DictionaryTypeAddInput
     /// 启用
     /// </summary>
 	public bool Enabled { get; set; }
+
+    /// <summary>
+    /// 排序
+    /// </summary>
+    public int Sort { get; set; }
 }

+ 5 - 0
src/platform/ZhonTai.Admin/Services/DictType/Dto/DictTypeGetOutput.cs

@@ -0,0 +1,5 @@
+namespace ZhonTai.Admin.Services.DictType.Dto;
+
+public class DictTypeGetOutput : DictTypeUpdateInput
+{
+}

+ 6 - 6
src/platform/ZhonTai.Admin/Services/Dictionary/Dto/DictionaryListOutput.cs → src/platform/ZhonTai.Admin/Services/DictType/Dto/DictTypeGetPageOutput.cs

@@ -1,6 +1,6 @@
-namespace ZhonTai.Admin.Services.Dictionary.Dto;
+namespace ZhonTai.Admin.Services.DictType.Dto;
 
-public class DictionaryListOutput
+public class DictTypeGetPageOutput
 {
     /// <summary>
     /// 主键Id
@@ -18,12 +18,12 @@ public class DictionaryListOutput
     public string Code { get; set; }
 
     /// <summary>
-    /// 字典值
+    /// 启用
     /// </summary>
-    public string Value { get; set; }
+	public bool Enabled { get; set; }
 
     /// <summary>
-    /// 启用
+    /// 排序
     /// </summary>
-	public bool Enabled { get; set; }
+    public int Sort { get; set; }
 }

+ 2 - 2
src/platform/ZhonTai.Admin/Services/DictionaryType/Dto/DictionaryTypeUpdateInput.cs → src/platform/ZhonTai.Admin/Services/DictType/Dto/DictTypeUpdateInput.cs

@@ -1,12 +1,12 @@
 using System.ComponentModel.DataAnnotations;
 using ZhonTai.Admin.Core.Validators;
 
-namespace ZhonTai.Admin.Services.DictionaryType.Dto;
+namespace ZhonTai.Admin.Services.DictType.Dto;
 
 /// <summary>
 /// 修改
 /// </summary>
-public class DictionaryTypeUpdateInput : DictionaryTypeAddInput
+public class DictTypeUpdateInput : DictTypeAddInput
 {
     /// <summary>
     /// 主键Id

+ 28 - 0
src/platform/ZhonTai.Admin/Services/DictType/IDictTypeService.cs

@@ -0,0 +1,28 @@
+using ZhonTai.Admin.Core.Dto;
+using System.Threading.Tasks;
+using ZhonTai.Admin.Services.DictType.Dto;
+using ZhonTai.Admin.Domain.DictType.Dto;
+
+namespace ZhonTai.Admin.Services.DictType;
+
+/// <summary>
+/// 数据字典类型接口
+/// </summary>
+public partial interface IDictTypeService
+{
+    Task<DictTypeGetOutput> GetAsync(long id);
+
+    Task<PageOutput<DictTypeGetPageOutput>> GetPageAsync(PageInput<DictTypeGetPageDto> input);
+
+    Task<long> AddAsync(DictTypeAddInput input);
+
+    Task UpdateAsync(DictTypeUpdateInput input);
+
+    Task DeleteAsync(long id);
+
+    Task BatchDeleteAsync(long[] ids);
+
+    Task SoftDeleteAsync(long id);
+
+    Task BatchSoftDeleteAsync(long[] ids);
+}

+ 0 - 170
src/platform/ZhonTai.Admin/Services/Dictionary/DictionaryService.cs

@@ -1,170 +0,0 @@
-using System.Threading.Tasks;
-using ZhonTai.Admin.Core.Dto;
-using ZhonTai.Admin.Domain.Dictionary;
-using ZhonTai.Admin.Services.Dictionary.Dto;
-using ZhonTai.Admin.Domain.Dictionary.Dto;
-using ZhonTai.DynamicApi;
-using ZhonTai.DynamicApi.Attributes;
-using Microsoft.AspNetCore.Mvc;
-using ZhonTai.Admin.Core.Consts;
-using System.Linq;
-
-namespace ZhonTai.Admin.Services.Dictionary;
-
-/// <summary>
-/// 数据字典服务
-/// </summary>
-[Order(60)]
-[DynamicApi(Area = AdminConsts.AreaName)]
-public class DictionaryService : BaseService, IDictionaryService, IDynamicApi
-{
-    private readonly IDictionaryRepository _dictionaryRepository;
-
-    public DictionaryService(IDictionaryRepository dictionaryRepository)
-    {
-        _dictionaryRepository = dictionaryRepository;
-    }
-
-    /// <summary>
-    /// 查询
-    /// </summary>
-    /// <param name="id"></param>
-    /// <returns></returns>
-    public async Task<DictionaryGetOutput> GetAsync(long id)
-    {
-        var result = await _dictionaryRepository.GetAsync<DictionaryGetOutput>(id);
-        return result;
-    }
-
-    /// <summary>
-    /// 查询分页
-    /// </summary>
-    /// <param name="input"></param>
-    /// <returns></returns>
-    [HttpPost]
-    public async Task<PageOutput<DictionaryListOutput>> GetPageAsync(PageInput<DictionaryGetPageDto> input)
-    {
-        var key = input.Filter?.Name;
-        var dictionaryTypeId = input.Filter?.DictionaryTypeId;
-        var list = await _dictionaryRepository.Select
-        .WhereDynamicFilter(input.DynamicFilter)
-        .WhereIf(dictionaryTypeId.HasValue && dictionaryTypeId.Value > 0, a => a.DictionaryTypeId == dictionaryTypeId)
-        .WhereIf(key.NotNull(), a => a.Name.Contains(key) || a.Code.Contains(key))
-        .Count(out var total)
-        .OrderByDescending(true, c => c.Id)
-        .Page(input.CurrentPage, input.PageSize)
-        .ToListAsync<DictionaryListOutput>();
-
-        var data = new PageOutput<DictionaryListOutput>()
-        {
-            List = list,
-            Total = total
-        };
-
-        return data;
-    }
-
-    /// <summary>
-    /// 新增
-    /// </summary>
-    /// <param name="input"></param>
-    /// <returns></returns>
-    public async Task<long> AddAsync(DictionaryAddInput input)
-    {
-        if (await _dictionaryRepository.Select.AnyAsync(a => a.DictionaryTypeId == input.DictionaryTypeId && a.Name == input.Name))
-        {
-            throw ResultOutput.Exception($"字典已存在");
-        }
-
-        if (input.Code.NotNull() && await _dictionaryRepository.Select.AnyAsync(a => a.DictionaryTypeId == input.DictionaryTypeId && a.Code == input.Code))
-        {
-            throw ResultOutput.Exception($"字典编码已存在");
-        }
-
-        if (input.Code.NotNull() && await _dictionaryRepository.Select.AnyAsync(a => a.DictionaryTypeId == input.DictionaryTypeId && a.Code == input.Code))
-        {
-            throw ResultOutput.Exception($"字典编码已存在");
-        }
-
-        if (input.Value.NotNull() && await _dictionaryRepository.Select.AnyAsync(a => a.DictionaryTypeId == input.DictionaryTypeId && a.Value == input.Value))
-        {
-            throw ResultOutput.Exception($"字典值已存在");
-        }
-
-        var dictionary = Mapper.Map<DictionaryEntity>(input);
-        await _dictionaryRepository.InsertAsync(dictionary);
-        return dictionary.Id;
-    }
-
-    /// <summary>
-    /// 修改
-    /// </summary>
-    /// <param name="input"></param>
-    /// <returns></returns>
-    public async Task UpdateAsync(DictionaryUpdateInput input)
-    {
-        var entity = await _dictionaryRepository.GetAsync(input.Id);
-        if (!(entity?.Id > 0))
-        {
-            throw ResultOutput.Exception("字典不存在");
-        }
-
-        if (await _dictionaryRepository.Select.AnyAsync(a => a.Id != input.Id && a.DictionaryTypeId == input.DictionaryTypeId && a.Name == input.Name))
-        {
-            throw ResultOutput.Exception($"字典已存在");
-        }
-
-        if (input.Code.NotNull() && await _dictionaryRepository.Select.AnyAsync(a => a.Id != input.Id && a.DictionaryTypeId == input.DictionaryTypeId && a.Code == input.Code))
-        {
-            throw ResultOutput.Exception($"字典编码已存在");
-        }
-
-        if (input.Value.NotNull() && await _dictionaryRepository.Select.AnyAsync(a => a.Id != input.Id && a.DictionaryTypeId == input.DictionaryTypeId && a.Value == input.Value))
-        {
-            throw ResultOutput.Exception($"字典值已存在");
-        }
-
-        Mapper.Map(input, entity);
-        await _dictionaryRepository.UpdateAsync(entity);
-    }
-
-    /// <summary>
-    /// 彻底删除
-    /// </summary>
-    /// <param name="id"></param>
-    /// <returns></returns>
-    public async Task DeleteAsync(long id)
-    {
-        await _dictionaryRepository.DeleteAsync(m => m.Id == id);
-    }
-
-    /// <summary>
-    /// 批量彻底删除
-    /// </summary>
-    /// <param name="ids"></param>
-    /// <returns></returns>
-    public async Task BatchDeleteAsync(long[] ids)
-    {
-        await _dictionaryRepository.DeleteAsync(a => ids.Contains(a.Id));
-    }
-
-    /// <summary>
-    /// 删除
-    /// </summary>
-    /// <param name="id"></param>
-    /// <returns></returns>
-    public async Task SoftDeleteAsync(long id)
-    {
-        await _dictionaryRepository.SoftDeleteAsync(id);
-    }
-
-    /// <summary>
-    /// 批量删除
-    /// </summary>
-    /// <param name="ids"></param>
-    /// <returns></returns>
-    public async Task BatchSoftDeleteAsync(long[] ids)
-    {
-        await _dictionaryRepository.SoftDeleteAsync(ids);
-    }
-}

+ 0 - 5
src/platform/ZhonTai.Admin/Services/Dictionary/Dto/DictionaryGetOutput.cs

@@ -1,5 +0,0 @@
-namespace ZhonTai.Admin.Services.Dictionary.Dto;
-
-public class DictionaryGetOutput : DictionaryUpdateInput
-{
-}

+ 0 - 28
src/platform/ZhonTai.Admin/Services/Dictionary/IDictionaryService.cs

@@ -1,28 +0,0 @@
-using ZhonTai.Admin.Core.Dto;
-using System.Threading.Tasks;
-using ZhonTai.Admin.Services.Dictionary.Dto;
-using ZhonTai.Admin.Domain.Dictionary.Dto;
-
-namespace ZhonTai.Admin.Services.Dictionary;
-
-/// <summary>
-/// 数据字典接口
-/// </summary>
-public partial interface IDictionaryService
-{
-    Task<DictionaryGetOutput> GetAsync(long id);
-
-    Task<PageOutput<DictionaryListOutput>> GetPageAsync(PageInput<DictionaryGetPageDto> input);
-
-    Task<long> AddAsync(DictionaryAddInput input);
-
-    Task UpdateAsync(DictionaryUpdateInput input);
-
-    Task DeleteAsync(long id);
-
-    Task BatchDeleteAsync(long[] ids);
-
-    Task SoftDeleteAsync(long id);
-
-    Task BatchSoftDeleteAsync(long[] ids);
-}

+ 0 - 5
src/platform/ZhonTai.Admin/Services/DictionaryType/Dto/DictionaryTypeGetOutput.cs

@@ -1,5 +0,0 @@
-namespace ZhonTai.Admin.Services.DictionaryType.Dto;
-
-public class DictionaryTypeGetOutput : DictionaryTypeUpdateInput
-{
-}

+ 0 - 28
src/platform/ZhonTai.Admin/Services/DictionaryType/IDictionaryTypeService.cs

@@ -1,28 +0,0 @@
-using ZhonTai.Admin.Core.Dto;
-using System.Threading.Tasks;
-using ZhonTai.Admin.Services.DictionaryType.Dto;
-using ZhonTai.Admin.Domain.DictionaryType.Dto;
-
-namespace ZhonTai.Admin.Services.DictionaryType;
-
-/// <summary>
-/// 数据字典类型接口
-/// </summary>
-public partial interface IDictionaryTypeService
-{
-    Task<DictionaryTypeGetOutput> GetAsync(long id);
-
-    Task<PageOutput<DictionaryTypeListOutput>> GetPageAsync(PageInput<DictionaryTypeGetPageDto> input);
-
-    Task<long> AddAsync(DictionaryTypeAddInput input);
-
-    Task UpdateAsync(DictionaryTypeUpdateInput input);
-
-    Task DeleteAsync(long id);
-
-    Task BatchDeleteAsync(long[] ids);
-
-    Task SoftDeleteAsync(long id);
-
-    Task BatchSoftDeleteAsync(long[] ids);
-}

+ 115 - 63
src/platform/ZhonTai.Admin/ZhonTai.Admin.xml

@@ -2150,92 +2150,92 @@
             主键Id
             </summary>
         </member>
-        <member name="T:ZhonTai.Admin.Domain.DictionaryType.DictionaryTypeEntity">
+        <member name="T:ZhonTai.Admin.Domain.DictType.DictTypeEntity">
             <summary>
             数据字典类型
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Domain.DictionaryType.DictionaryTypeEntity.Name">
+        <member name="P:ZhonTai.Admin.Domain.DictType.DictTypeEntity.Name">
             <summary>
             名称
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Domain.DictionaryType.DictionaryTypeEntity.Code">
+        <member name="P:ZhonTai.Admin.Domain.DictType.DictTypeEntity.Code">
             <summary>
             编码
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Domain.DictionaryType.DictionaryTypeEntity.Description">
+        <member name="P:ZhonTai.Admin.Domain.DictType.DictTypeEntity.Description">
             <summary>
             描述
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Domain.DictionaryType.DictionaryTypeEntity.Enabled">
+        <member name="P:ZhonTai.Admin.Domain.DictType.DictTypeEntity.Enabled">
             <summary>
             启用
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Domain.DictionaryType.DictionaryTypeEntity.Sort">
+        <member name="P:ZhonTai.Admin.Domain.DictType.DictTypeEntity.Sort">
             <summary>
             排序
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Domain.DictionaryType.Dto.DictionaryTypeGetPageDto.Name">
+        <member name="P:ZhonTai.Admin.Domain.DictType.Dto.DictTypeGetPageDto.Name">
             <summary>
             字典名称
             </summary>
         </member>
-        <member name="T:ZhonTai.Admin.Domain.Dictionary.DictionaryEntity">
+        <member name="T:ZhonTai.Admin.Domain.Dict.DictEntity">
             <summary>
             数据字典
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Domain.Dictionary.DictionaryEntity.DictionaryTypeId">
+        <member name="P:ZhonTai.Admin.Domain.Dict.DictEntity.DictTypeId">
             <summary>
             字典类型Id
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Domain.Dictionary.DictionaryEntity.DictionaryType">
+        <member name="P:ZhonTai.Admin.Domain.Dict.DictEntity.DictType">
             <summary>
             字典类型
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Domain.Dictionary.DictionaryEntity.Name">
+        <member name="P:ZhonTai.Admin.Domain.Dict.DictEntity.Name">
             <summary>
             字典名称
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Domain.Dictionary.DictionaryEntity.Code">
+        <member name="P:ZhonTai.Admin.Domain.Dict.DictEntity.Code">
             <summary>
             字典编码
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Domain.Dictionary.DictionaryEntity.Value">
+        <member name="P:ZhonTai.Admin.Domain.Dict.DictEntity.Value">
             <summary>
             字典值
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Domain.Dictionary.DictionaryEntity.Description">
+        <member name="P:ZhonTai.Admin.Domain.Dict.DictEntity.Description">
             <summary>
             描述
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Domain.Dictionary.DictionaryEntity.Enabled">
+        <member name="P:ZhonTai.Admin.Domain.Dict.DictEntity.Enabled">
             <summary>
             启用
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Domain.Dictionary.DictionaryEntity.Sort">
+        <member name="P:ZhonTai.Admin.Domain.Dict.DictEntity.Sort">
             <summary>
             排序
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Domain.Dictionary.Dto.DictionaryGetPageDto.DictionaryTypeId">
+        <member name="P:ZhonTai.Admin.Domain.Dict.Dto.DictGetPageDto.DictTypeId">
             <summary>
             字典类型Id
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Domain.Dictionary.Dto.DictionaryGetPageDto.Name">
+        <member name="P:ZhonTai.Admin.Domain.Dict.Dto.DictGetPageDto.Name">
             <summary>
             字典名称
             </summary>
@@ -4188,259 +4188,311 @@
             滑动轨迹
             </summary>
         </member>
-        <member name="T:ZhonTai.Admin.Services.DictionaryType.DictionaryTypeService">
+        <member name="T:ZhonTai.Admin.Services.DictType.DictTypeService">
             <summary>
             数据字典类型服务
             </summary>
         </member>
-        <member name="M:ZhonTai.Admin.Services.DictionaryType.DictionaryTypeService.GetAsync(System.Int64)">
+        <member name="M:ZhonTai.Admin.Services.DictType.DictTypeService.GetAsync(System.Int64)">
             <summary>
             查询
             </summary>
             <param name="id"></param>
             <returns></returns>
         </member>
-        <member name="M:ZhonTai.Admin.Services.DictionaryType.DictionaryTypeService.GetPageAsync(ZhonTai.Admin.Core.Dto.PageInput{ZhonTai.Admin.Domain.DictionaryType.Dto.DictionaryTypeGetPageDto})">
+        <member name="M:ZhonTai.Admin.Services.DictType.DictTypeService.GetPageAsync(ZhonTai.Admin.Core.Dto.PageInput{ZhonTai.Admin.Domain.DictType.Dto.DictTypeGetPageDto})">
             <summary>
             查询分页
             </summary>
             <param name="input"></param>
             <returns></returns>
         </member>
-        <member name="M:ZhonTai.Admin.Services.DictionaryType.DictionaryTypeService.AddAsync(ZhonTai.Admin.Services.DictionaryType.Dto.DictionaryTypeAddInput)">
+        <member name="M:ZhonTai.Admin.Services.DictType.DictTypeService.AddAsync(ZhonTai.Admin.Services.DictType.Dto.DictTypeAddInput)">
             <summary>
             新增
             </summary>
             <param name="input"></param>
             <returns></returns>
         </member>
-        <member name="M:ZhonTai.Admin.Services.DictionaryType.DictionaryTypeService.UpdateAsync(ZhonTai.Admin.Services.DictionaryType.Dto.DictionaryTypeUpdateInput)">
+        <member name="M:ZhonTai.Admin.Services.DictType.DictTypeService.UpdateAsync(ZhonTai.Admin.Services.DictType.Dto.DictTypeUpdateInput)">
             <summary>
             修改
             </summary>
             <param name="input"></param>
             <returns></returns>
         </member>
-        <member name="M:ZhonTai.Admin.Services.DictionaryType.DictionaryTypeService.DeleteAsync(System.Int64)">
+        <member name="M:ZhonTai.Admin.Services.DictType.DictTypeService.DeleteAsync(System.Int64)">
             <summary>
             彻底删除
             </summary>
             <param name="id"></param>
             <returns></returns>
         </member>
-        <member name="M:ZhonTai.Admin.Services.DictionaryType.DictionaryTypeService.BatchDeleteAsync(System.Int64[])">
+        <member name="M:ZhonTai.Admin.Services.DictType.DictTypeService.BatchDeleteAsync(System.Int64[])">
             <summary>
             批量彻底删除
             </summary>
             <param name="ids"></param>
             <returns></returns>
         </member>
-        <member name="M:ZhonTai.Admin.Services.DictionaryType.DictionaryTypeService.SoftDeleteAsync(System.Int64)">
+        <member name="M:ZhonTai.Admin.Services.DictType.DictTypeService.SoftDeleteAsync(System.Int64)">
             <summary>
             删除
             </summary>
             <param name="id"></param>
             <returns></returns>
         </member>
-        <member name="M:ZhonTai.Admin.Services.DictionaryType.DictionaryTypeService.BatchSoftDeleteAsync(System.Int64[])">
+        <member name="M:ZhonTai.Admin.Services.DictType.DictTypeService.BatchSoftDeleteAsync(System.Int64[])">
             <summary>
             批量删除
             </summary>
             <param name="ids"></param>
             <returns></returns>
         </member>
-        <member name="T:ZhonTai.Admin.Services.DictionaryType.Dto.DictionaryTypeAddInput">
+        <member name="T:ZhonTai.Admin.Services.DictType.Dto.DictTypeAddInput">
             <summary>
             添加字典类型
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Services.DictionaryType.Dto.DictionaryTypeAddInput.Name">
+        <member name="P:ZhonTai.Admin.Services.DictType.Dto.DictTypeAddInput.Name">
             <summary>
             字典类型名称
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Services.DictionaryType.Dto.DictionaryTypeAddInput.Code">
+        <member name="P:ZhonTai.Admin.Services.DictType.Dto.DictTypeAddInput.Code">
             <summary>
             字典类型编码
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Services.DictionaryType.Dto.DictionaryTypeAddInput.Description">
+        <member name="P:ZhonTai.Admin.Services.DictType.Dto.DictTypeAddInput.Description">
             <summary>
             描述
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Services.DictionaryType.Dto.DictionaryTypeAddInput.Enabled">
+        <member name="P:ZhonTai.Admin.Services.DictType.Dto.DictTypeAddInput.Enabled">
             <summary>
             启用
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Services.DictionaryType.Dto.DictionaryTypeListOutput.Id">
+        <member name="P:ZhonTai.Admin.Services.DictType.Dto.DictTypeAddInput.Sort">
+            <summary>
+            排序
+            </summary>
+        </member>
+        <member name="P:ZhonTai.Admin.Services.DictType.Dto.DictTypeGetPageOutput.Id">
             <summary>
             主键Id
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Services.DictionaryType.Dto.DictionaryTypeListOutput.Name">
+        <member name="P:ZhonTai.Admin.Services.DictType.Dto.DictTypeGetPageOutput.Name">
             <summary>
             字典名称
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Services.DictionaryType.Dto.DictionaryTypeListOutput.Code">
+        <member name="P:ZhonTai.Admin.Services.DictType.Dto.DictTypeGetPageOutput.Code">
             <summary>
             字典编码
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Services.DictionaryType.Dto.DictionaryTypeListOutput.Enabled">
+        <member name="P:ZhonTai.Admin.Services.DictType.Dto.DictTypeGetPageOutput.Enabled">
             <summary>
             启用
             </summary>
         </member>
-        <member name="T:ZhonTai.Admin.Services.DictionaryType.Dto.DictionaryTypeUpdateInput">
+        <member name="P:ZhonTai.Admin.Services.DictType.Dto.DictTypeGetPageOutput.Sort">
+            <summary>
+            排序
+            </summary>
+        </member>
+        <member name="T:ZhonTai.Admin.Services.DictType.Dto.DictTypeUpdateInput">
             <summary>
             修改
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Services.DictionaryType.Dto.DictionaryTypeUpdateInput.Id">
+        <member name="P:ZhonTai.Admin.Services.DictType.Dto.DictTypeUpdateInput.Id">
             <summary>
             主键Id
             </summary>
         </member>
-        <member name="T:ZhonTai.Admin.Services.DictionaryType.IDictionaryTypeService">
+        <member name="T:ZhonTai.Admin.Services.DictType.IDictTypeService">
             <summary>
             数据字典类型接口
             </summary>
         </member>
-        <member name="T:ZhonTai.Admin.Services.Dictionary.DictionaryService">
+        <member name="T:ZhonTai.Admin.Services.Dict.DictService">
             <summary>
             数据字典服务
             </summary>
         </member>
-        <member name="M:ZhonTai.Admin.Services.Dictionary.DictionaryService.GetAsync(System.Int64)">
+        <member name="M:ZhonTai.Admin.Services.Dict.DictService.GetAsync(System.Int64)">
             <summary>
             查询
             </summary>
             <param name="id"></param>
             <returns></returns>
         </member>
-        <member name="M:ZhonTai.Admin.Services.Dictionary.DictionaryService.GetPageAsync(ZhonTai.Admin.Core.Dto.PageInput{ZhonTai.Admin.Domain.Dictionary.Dto.DictionaryGetPageDto})">
+        <member name="M:ZhonTai.Admin.Services.Dict.DictService.GetPageAsync(ZhonTai.Admin.Core.Dto.PageInput{ZhonTai.Admin.Domain.Dict.Dto.DictGetPageDto})">
             <summary>
             查询分页
             </summary>
             <param name="input"></param>
             <returns></returns>
         </member>
-        <member name="M:ZhonTai.Admin.Services.Dictionary.DictionaryService.AddAsync(ZhonTai.Admin.Services.Dictionary.Dto.DictionaryAddInput)">
+        <member name="M:ZhonTai.Admin.Services.Dict.DictService.GetListAsync(System.String[])">
+            <summary>
+            查询列表
+            </summary>
+            <param name="codes">编码列表</param>
+            <returns></returns>
+        </member>
+        <member name="M:ZhonTai.Admin.Services.Dict.DictService.AddAsync(ZhonTai.Admin.Services.Dict.Dto.DictAddInput)">
             <summary>
             新增
             </summary>
             <param name="input"></param>
             <returns></returns>
         </member>
-        <member name="M:ZhonTai.Admin.Services.Dictionary.DictionaryService.UpdateAsync(ZhonTai.Admin.Services.Dictionary.Dto.DictionaryUpdateInput)">
+        <member name="M:ZhonTai.Admin.Services.Dict.DictService.UpdateAsync(ZhonTai.Admin.Services.Dict.Dto.DictUpdateInput)">
             <summary>
             修改
             </summary>
             <param name="input"></param>
             <returns></returns>
         </member>
-        <member name="M:ZhonTai.Admin.Services.Dictionary.DictionaryService.DeleteAsync(System.Int64)">
+        <member name="M:ZhonTai.Admin.Services.Dict.DictService.DeleteAsync(System.Int64)">
             <summary>
             彻底删除
             </summary>
             <param name="id"></param>
             <returns></returns>
         </member>
-        <member name="M:ZhonTai.Admin.Services.Dictionary.DictionaryService.BatchDeleteAsync(System.Int64[])">
+        <member name="M:ZhonTai.Admin.Services.Dict.DictService.BatchDeleteAsync(System.Int64[])">
             <summary>
             批量彻底删除
             </summary>
             <param name="ids"></param>
             <returns></returns>
         </member>
-        <member name="M:ZhonTai.Admin.Services.Dictionary.DictionaryService.SoftDeleteAsync(System.Int64)">
+        <member name="M:ZhonTai.Admin.Services.Dict.DictService.SoftDeleteAsync(System.Int64)">
             <summary>
             删除
             </summary>
             <param name="id"></param>
             <returns></returns>
         </member>
-        <member name="M:ZhonTai.Admin.Services.Dictionary.DictionaryService.BatchSoftDeleteAsync(System.Int64[])">
+        <member name="M:ZhonTai.Admin.Services.Dict.DictService.BatchSoftDeleteAsync(System.Int64[])">
             <summary>
             批量删除
             </summary>
             <param name="ids"></param>
             <returns></returns>
         </member>
-        <member name="T:ZhonTai.Admin.Services.Dictionary.Dto.DictionaryAddInput">
+        <member name="T:ZhonTai.Admin.Services.Dict.Dto.DictAddInput">
             <summary>
             添加字典
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Services.Dictionary.Dto.DictionaryAddInput.DictionaryTypeId">
+        <member name="P:ZhonTai.Admin.Services.Dict.Dto.DictAddInput.DictTypeId">
             <summary>
             字典类型Id
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Services.Dictionary.Dto.DictionaryAddInput.Name">
+        <member name="P:ZhonTai.Admin.Services.Dict.Dto.DictAddInput.Name">
             <summary>
             字典名称
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Services.Dictionary.Dto.DictionaryAddInput.Code">
+        <member name="P:ZhonTai.Admin.Services.Dict.Dto.DictAddInput.Code">
             <summary>
             字典编码
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Services.Dictionary.Dto.DictionaryAddInput.Value">
+        <member name="P:ZhonTai.Admin.Services.Dict.Dto.DictAddInput.Value">
             <summary>
             字典值
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Services.Dictionary.Dto.DictionaryAddInput.Description">
+        <member name="P:ZhonTai.Admin.Services.Dict.Dto.DictAddInput.Description">
             <summary>
             描述
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Services.Dictionary.Dto.DictionaryAddInput.Enabled">
+        <member name="P:ZhonTai.Admin.Services.Dict.Dto.DictAddInput.Enabled">
             <summary>
             启用
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Services.Dictionary.Dto.DictionaryListOutput.Id">
+        <member name="P:ZhonTai.Admin.Services.Dict.Dto.DictAddInput.Sort">
+            <summary>
+            排序
+            </summary>
+        </member>
+        <member name="P:ZhonTai.Admin.Services.Dict.Dto.DictGetListDto.DictTypeCode">
+            <summary>
+            字典类型编码
+            </summary>
+        </member>
+        <member name="P:ZhonTai.Admin.Services.Dict.Dto.DictGetListDto.Id">
             <summary>
             主键Id
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Services.Dictionary.Dto.DictionaryListOutput.Name">
+        <member name="P:ZhonTai.Admin.Services.Dict.Dto.DictGetListDto.Name">
             <summary>
             字典名称
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Services.Dictionary.Dto.DictionaryListOutput.Code">
+        <member name="P:ZhonTai.Admin.Services.Dict.Dto.DictGetListDto.Code">
             <summary>
             字典编码
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Services.Dictionary.Dto.DictionaryListOutput.Value">
+        <member name="P:ZhonTai.Admin.Services.Dict.Dto.DictGetListDto.Value">
             <summary>
             字典值
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Services.Dictionary.Dto.DictionaryListOutput.Enabled">
+        <member name="P:ZhonTai.Admin.Services.Dict.Dto.DictGetPageOutput.Id">
+            <summary>
+            主键Id
+            </summary>
+        </member>
+        <member name="P:ZhonTai.Admin.Services.Dict.Dto.DictGetPageOutput.Name">
+            <summary>
+            字典名称
+            </summary>
+        </member>
+        <member name="P:ZhonTai.Admin.Services.Dict.Dto.DictGetPageOutput.Code">
+            <summary>
+            字典编码
+            </summary>
+        </member>
+        <member name="P:ZhonTai.Admin.Services.Dict.Dto.DictGetPageOutput.Value">
+            <summary>
+            字典值
+            </summary>
+        </member>
+        <member name="P:ZhonTai.Admin.Services.Dict.Dto.DictGetPageOutput.Enabled">
             <summary>
             启用
             </summary>
         </member>
-        <member name="T:ZhonTai.Admin.Services.Dictionary.Dto.DictionaryUpdateInput">
+        <member name="P:ZhonTai.Admin.Services.Dict.Dto.DictGetPageOutput.Sort">
+            <summary>
+            排序
+            </summary>
+        </member>
+        <member name="T:ZhonTai.Admin.Services.Dict.Dto.DictUpdateInput">
             <summary>
             修改
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Services.Dictionary.Dto.DictionaryUpdateInput.Id">
+        <member name="P:ZhonTai.Admin.Services.Dict.Dto.DictUpdateInput.Id">
             <summary>
             主键Id
             </summary>
         </member>
-        <member name="T:ZhonTai.Admin.Services.Dictionary.IDictionaryService">
+        <member name="T:ZhonTai.Admin.Services.Dict.IDictService">
             <summary>
             数据字典接口
             </summary>

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно