adtec-core-package 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adtec-core-package",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -0,0 +1,28 @@
1
+ import request from '../utils/request'
2
+ import type { ISysDictDataCacheVo } from '../interface/ISysDictDataCacheVo'
3
+
4
+ /**
5
+ * Create by丁盼
6
+ * 说明: DictCacheApi
7
+ * 创建时间: 2024/11/3 上午9:11
8
+ * 修改时间: 2024/11/3 上午9:11
9
+ */
10
+ // 定义包含map的整体类型
11
+ interface dictMapType {
12
+ [key: string]: ISysDictDataCacheVo[]
13
+ }
14
+ const basePath = '/api/system/dict/data/'
15
+ export default {
16
+ /**
17
+ * 获取字典数据
18
+ */
19
+ getSysDictDataCacheVo(dictType: string) {
20
+ return request.get<ISysDictDataCacheVo[]>(basePath + 'getSysDictDataCacheVo/' + dictType)
21
+ },
22
+ /**
23
+ * 批量获取字典数据
24
+ */
25
+ batchGetSysDictDataCacheVo(dictTypes: string[]): Promise<dictMapType> {
26
+ return request.post<dictMapType>(basePath + 'batchGetSysDictDataCacheVo', dictTypes)
27
+ },
28
+ }
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Create by丁盼
3
+ * 说明: ISysDictDataCacheVo
4
+ * 创建时间: 2025/1/14 20:40
5
+ * 修改时间: 2025/1/14 20:40
6
+ */
7
+ /**
8
+ * Create by丁盼
9
+ * 说明: ISysDictDataCacheVo
10
+ * 创建时间: 2024/11/3 上午9:08
11
+ * 修改时间: 2024/11/3 上午9:08
12
+ */
13
+ export interface ISysDictDataCacheVo {
14
+ // 字典编码,对应原Java代码中的 @TableId注解的字段,这里假设在TypeScript环境中它就是一个普通的字符串类型主键
15
+ id: string
16
+
17
+ // 排序号,排序号自增长且可修改,为整数类型
18
+ orderNum: string
19
+
20
+ typeCode: string
21
+
22
+ // 父字典ID,字符串类型
23
+ parentId?: string
24
+
25
+ // 字典标签,字符串类型
26
+ label: string
27
+
28
+ // 字典键值,字符串类型
29
+ value: string
30
+
31
+ // 备注,字符串类型
32
+ remark: string
33
+
34
+ // 是否默认,1表示是,0表示否,这里使用数字类型(也可根据具体需求定义为更明确的枚举类型等)
35
+ isDefault: string
36
+
37
+ // 是否有效,1表示是,0表示否,同样使用数字类型
38
+ isValid: string
39
+
40
+ // 字典类型表id,字符串类型
41
+ sysDictTypeId: string
42
+ /**
43
+ * 下级节点
44
+ */
45
+ children?: ISysDictDataCacheVo[]
46
+ }