正在显示
49 个修改的文件
包含
403 行增加
和
123 行删除
@@ -4,38 +4,16 @@ metadata: | @@ -4,38 +4,16 @@ metadata: | ||
4 | name: companyInfo | 4 | name: companyInfo |
5 | description: 公司信息 | 5 | description: 公司信息 |
6 | attributes: | 6 | attributes: |
7 | - - name: companyName | ||
8 | - description: 公司名称 | ||
9 | - type: | ||
10 | - primitive: string | ||
11 | - - name: scale | ||
12 | - description: 规模 | ||
13 | - type: | ||
14 | - primitive: string | ||
15 | - - name: logo | ||
16 | - description: 公司Logo地址 | ||
17 | - type: | ||
18 | - primitive: string | ||
19 | - - name: address | ||
20 | - description: 公司地址 | ||
21 | - type: | ||
22 | - primitive: string | ||
23 | - - name: taxpayerCode | ||
24 | - description: 纳税人识别号 | ||
25 | - type: | ||
26 | - primitive: string | ||
27 | - - name: businessLicense | ||
28 | - description: 营业执照 | ||
29 | - type: | ||
30 | - primitive: string | ||
31 | - - name: industryCategory | ||
32 | - description: 所属行业 | ||
33 | - type: | ||
34 | - primitive: string | ||
35 | - - name: contacts | ||
36 | - description: 联系人 | ||
37 | - type: | ||
38 | - primitive: string | 7 | + - ref: companyName |
8 | + required: true | ||
9 | + - ref: scale | ||
10 | + required: true | ||
11 | + - ref: logo | ||
12 | + required: true | ||
13 | + - ref: industryCategory | ||
14 | + required: true | ||
15 | + - ref: contacts | ||
16 | + required: true | ||
39 | - name: registTime | 17 | - name: registTime |
40 | description: 注册时间 | 18 | description: 注册时间 |
41 | type: | 19 | type: |
@@ -8,11 +8,7 @@ metadata: | @@ -8,11 +8,7 @@ metadata: | ||
8 | required: true | 8 | required: true |
9 | - ref: orgName | 9 | - ref: orgName |
10 | required: true | 10 | required: true |
11 | - - name: phone | ||
12 | - description: 手机号 | ||
13 | - type: | ||
14 | - primitive: string | ||
15 | - - name: depName | ||
16 | - description: 部门名称 | ||
17 | - type: | ||
18 | - primitive: string | 11 | + - ref: phone |
12 | + required: true | ||
13 | + - ref: depName | ||
14 | + required: true |
@@ -6,38 +6,22 @@ metadata: | @@ -6,38 +6,22 @@ metadata: | ||
6 | attributes: | 6 | attributes: |
7 | - ref: menuId | 7 | - ref: menuId |
8 | required: true | 8 | required: true |
9 | - - name: parentId | ||
10 | - description: 父级id | ||
11 | - type: | ||
12 | - primitive: int64 | ||
13 | - - name: menuName | ||
14 | - description: 菜单名称 | ||
15 | - type: | ||
16 | - primitive: string | ||
17 | - - name: code | ||
18 | - description: 菜单编码 SYSTEM_USER_EDIT / 100101 (字符编码) | ||
19 | - type: | ||
20 | - primitive: string | ||
21 | - - name: accessCode | ||
22 | - description: 权限编码 users:edit | ||
23 | - type: | ||
24 | - primitive: string | ||
25 | - - name: menuType | ||
26 | - description: 菜单类型 (目录catalog、菜单menu、按钮button) | ||
27 | - type: | ||
28 | - primitive: string | ||
29 | - - name: icon | ||
30 | - description: 菜单图标 | ||
31 | - type: | ||
32 | - primitive: string | ||
33 | - - name: sort | ||
34 | - description: 排序 | ||
35 | - type: | ||
36 | - primitive: int | ||
37 | - - name: remark | ||
38 | - description: 菜单说明 | ||
39 | - type: | ||
40 | - primitive: string | 9 | + - ref: parentId |
10 | + required: true | ||
11 | + - ref: menuName | ||
12 | + required: true | ||
13 | + - ref: code | ||
14 | + required: true | ||
15 | + - ref: accessCode | ||
16 | + required: true | ||
17 | + - ref: menuType | ||
18 | + required: true | ||
19 | + - ref: icon | ||
20 | + required: true | ||
21 | + - ref: sort | ||
22 | + required: true | ||
23 | + - ref: remark | ||
24 | + required: true | ||
41 | - name: category | 25 | - name: category |
42 | description: 菜单类别 (web:1、app:2) | 26 | description: 菜单类别 (web:1、app:2) |
43 | type: | 27 | type: |
@@ -46,7 +30,5 @@ metadata: | @@ -46,7 +30,5 @@ metadata: | ||
46 | description: 父级节点路径("0,11,12,") | 30 | description: 父级节点路径("0,11,12,") |
47 | type: | 31 | type: |
48 | primitive: string | 32 | primitive: string |
49 | - - name: isPublish | ||
50 | - description: 菜单是否公开状态,[0:隐藏],[1:显示],默认显示 | ||
51 | - type: | ||
52 | - primitive: int | 33 | + - ref: isPublish |
34 | + required: true |
@@ -19,10 +19,6 @@ metadata: | @@ -19,10 +19,6 @@ metadata: | ||
19 | - ref: orgName | 19 | - ref: orgName |
20 | required: true | 20 | required: true |
21 | - name: isOrg | 21 | - name: isOrg |
22 | - description: 是否是组织 | ||
23 | - type: | ||
24 | - primitive: int | ||
25 | - - name: parentId | ||
26 | - description: 父级ID | ||
27 | - type: | ||
28 | - primitive: int64 | 22 | + required: true |
23 | + - ref: parentId | ||
24 | + required: true |
@@ -4,11 +4,7 @@ metadata: | @@ -4,11 +4,7 @@ metadata: | ||
4 | name: phoneAuth | 4 | name: phoneAuth |
5 | description: 手机认证 (base) | 5 | description: 手机认证 (base) |
6 | attributes: | 6 | attributes: |
7 | - - name: phone | ||
8 | - description: 手机号 | ||
9 | - type: | ||
10 | - primitive: string | ||
11 | - - name: password | ||
12 | - description: 密码 | ||
13 | - type: | ||
14 | - primitive: string | 7 | + - ref: phone |
8 | + required: true | ||
9 | + - ref: password | ||
10 | + required: true |
@@ -12,14 +12,10 @@ metadata: | @@ -12,14 +12,10 @@ metadata: | ||
12 | required: true | 12 | required: true |
13 | - ref: roleName | 13 | - ref: roleName |
14 | required: true | 14 | required: true |
15 | - - name: menuAccess | ||
16 | - description: 菜单权限列表 | ||
17 | - type: | ||
18 | - array: int64 | ||
19 | - - name: desc | ||
20 | - description: 角色描述 | ||
21 | - type: | ||
22 | - primitive: string | 15 | + - ref: accessMenus |
16 | + required: true | ||
17 | + - ref: desc | ||
18 | + required: true | ||
23 | - name: ext | 19 | - name: ext |
24 | description: 扩展数据 | 20 | description: 扩展数据 |
25 | type: | 21 | type: |
@@ -6,15 +6,9 @@ metadata: | @@ -6,15 +6,9 @@ metadata: | ||
6 | attributes: | 6 | attributes: |
7 | - ref: usersName | 7 | - ref: usersName |
8 | required: true | 8 | required: true |
9 | - - name: phone | ||
10 | - description: 手机号码 | ||
11 | - type: | ||
12 | - primitive: string | ||
13 | - - name: avator | ||
14 | - description: 头像 | ||
15 | - type: | ||
16 | - primitive: string | ||
17 | - - name: email | ||
18 | - description: 邮箱 | ||
19 | - type: | ||
20 | - primitive: string | 9 | + - ref: phone |
10 | + required: true | ||
11 | + - ref: avator | ||
12 | + required: true | ||
13 | + - ref: email | ||
14 | + required: true |
1 | +version: v1 | ||
2 | +kind: Method | ||
3 | +metadata: | ||
4 | + name: createUsers | ||
5 | + type: command | ||
6 | + description: 创建用户信息 | ||
7 | + payload: | ||
8 | + - ref: usersCode | ||
9 | + required: true | ||
10 | + - name: organizationId | ||
11 | + description: 组织机构 | ||
12 | + type: | ||
13 | + primitive: int64 | ||
14 | + required: true | ||
15 | + - name: departmentId | ||
16 | + description: 所属部门 | ||
17 | + type: | ||
18 | + primitive: int64 | ||
19 | + required: true | ||
20 | + - name: usersOrg | ||
21 | + description: 用户关联的组织 | ||
22 | + type: | ||
23 | + array: int64 | ||
24 | + required: false | ||
25 | + - name: usersRole | ||
26 | + description: 用户关联的角色 | ||
27 | + type: | ||
28 | + array: int64 | ||
29 | + required: false | ||
30 | + - ref: enableStatus | ||
31 | + required: true | ||
32 | + - ref: usersName | ||
33 | + required: true | ||
34 | + - ref: phone | ||
35 | + required: true | ||
36 | + - ref: avator | ||
37 | + required: false | ||
38 | + - ref: email | ||
39 | + required: false | ||
40 | + result: | ||
41 | + - name: users | ||
42 | + type: | ||
43 | + schema: users | ||
44 | + required: true |
1 | +version: v1 | ||
2 | +kind: Method | ||
3 | +metadata: | ||
4 | + name: listUsers | ||
5 | + type: query | ||
6 | + description: 返回用户信息列表 | ||
7 | + payload: | ||
8 | + - ref: offset | ||
9 | + required: true | ||
10 | + - ref: limit | ||
11 | + required: true | ||
12 | + result: | ||
13 | + - ref: count | ||
14 | + required: true | ||
15 | + - name: userss | ||
16 | + type: | ||
17 | + array: users | ||
18 | + required: true |
1 | +version: v1 | ||
2 | +kind: Method | ||
3 | +metadata: | ||
4 | + name: updateUsers | ||
5 | + type: command | ||
6 | + description: 更新用户信息 | ||
7 | + payload: | ||
8 | + - ref: usersId | ||
9 | + required: true | ||
10 | + - name: organizationId | ||
11 | + description: 组织机构 | ||
12 | + type: | ||
13 | + primitive: int64 | ||
14 | + required: true | ||
15 | + - name: departmentId | ||
16 | + description: 所属部门 | ||
17 | + type: | ||
18 | + primitive: int64 | ||
19 | + required: true | ||
20 | + - name: usersOrg | ||
21 | + description: 用户关联的组织 | ||
22 | + type: | ||
23 | + array: int64 | ||
24 | + required: false | ||
25 | + - name: usersRole | ||
26 | + description: 用户关联的角色 | ||
27 | + type: | ||
28 | + array: int64 | ||
29 | + required: false | ||
30 | + - ref: enableStatus | ||
31 | + required: true | ||
32 | + - ref: usersName | ||
33 | + required: true | ||
34 | + - ref: phone | ||
35 | + required: true | ||
36 | + - ref: avator | ||
37 | + required: false | ||
38 | + - ref: email | ||
39 | + required: false | ||
40 | + result: | ||
41 | + - name: users | ||
42 | + type: | ||
43 | + schema: users | ||
44 | + required: true |
@@ -69,7 +69,7 @@ func (repository *MenuRepository) Save(menu *domain.Menu) (*domain.Menu, error) | @@ -69,7 +69,7 @@ func (repository *MenuRepository) Save(menu *domain.Menu) (*domain.Menu, error) | ||
69 | &menu.IsPublish, | 69 | &menu.IsPublish, |
70 | &menu.IsSystem, | 70 | &menu.IsSystem, |
71 | ), | 71 | ), |
72 | - fmt.Sprintf("INSERT INTO base.menu (%s) VALUES (%s) RETURNING %s", insertFieldsSnippet, insertPlaceHoldersSnippet, returningFieldsSnippet), | 72 | + fmt.Sprintf("INSERT INTO users.menu (%s) VALUES (%s) RETURNING %s", insertFieldsSnippet, insertPlaceHoldersSnippet, returningFieldsSnippet), |
73 | menu.ParentId, | 73 | menu.ParentId, |
74 | menu.MenuName, | 74 | menu.MenuName, |
75 | menu.Code, | 75 | menu.Code, |
@@ -102,7 +102,7 @@ func (repository *MenuRepository) Save(menu *domain.Menu) (*domain.Menu, error) | @@ -102,7 +102,7 @@ func (repository *MenuRepository) Save(menu *domain.Menu) (*domain.Menu, error) | ||
102 | &menu.IsPublish, | 102 | &menu.IsPublish, |
103 | &menu.IsSystem, | 103 | &menu.IsSystem, |
104 | ), | 104 | ), |
105 | - fmt.Sprintf("UPDATE base.menu SET %s WHERE menu_id=? RETURNING %s", updateFieldsSnippet, returningFieldsSnippet), | 105 | + fmt.Sprintf("UPDATE users.menu SET %s WHERE menu_id=? RETURNING %s", updateFieldsSnippet, returningFieldsSnippet), |
106 | menu.ParentId, | 106 | menu.ParentId, |
107 | menu.MenuName, | 107 | menu.MenuName, |
108 | menu.Code, | 108 | menu.Code, |
@@ -39,7 +39,7 @@ var _ = Describe("创建菜单服务", func() { | @@ -39,7 +39,7 @@ var _ = Describe("创建菜单服务", func() { | ||
39 | }) | 39 | }) |
40 | }) | 40 | }) |
41 | AfterEach(func() { | 41 | AfterEach(func() { |
42 | - _, err := pG.DB.Exec("DELETE FROM base.menu WHERE true") | 42 | + _, err := pG.DB.Exec("DELETE FROM users.menu WHERE true") |
43 | Expect(err).NotTo(HaveOccurred()) | 43 | Expect(err).NotTo(HaveOccurred()) |
44 | }) | 44 | }) |
45 | }) | 45 | }) |
@@ -15,7 +15,7 @@ var _ = Describe("返回菜单服务", func() { | @@ -15,7 +15,7 @@ var _ = Describe("返回菜单服务", func() { | ||
15 | BeforeEach(func() { | 15 | BeforeEach(func() { |
16 | _, err := pG.DB.QueryOne( | 16 | _, err := pG.DB.QueryOne( |
17 | pg.Scan(&menuId), | 17 | pg.Scan(&menuId), |
18 | - "INSERT INTO base.menu (menu_id, parent_id, menu_name, code, access_code, menu_type, icon, sort, remark, category, parent_path, is_publish, is_system) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING menu_id", | 18 | + "INSERT INTO users.menu (menu_id, parent_id, menu_name, code, access_code, menu_type, icon, sort, remark, category, parent_path, is_publish, is_system) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING menu_id", |
19 | 1, 0, "testMenuName", "testCode", "testAccessCode", "testMenuType", "testIcon", 1, "testDesc", "testCategory", "testParentPath", 1, 1) | 19 | 1, 0, "testMenuName", "testCode", "testAccessCode", "testMenuType", "testIcon", 1, "testDesc", "testCategory", "testParentPath", 1, 1) |
20 | Expect(err).NotTo(HaveOccurred()) | 20 | Expect(err).NotTo(HaveOccurred()) |
21 | }) | 21 | }) |
@@ -36,7 +36,7 @@ var _ = Describe("返回菜单服务", func() { | @@ -36,7 +36,7 @@ var _ = Describe("返回菜单服务", func() { | ||
36 | }) | 36 | }) |
37 | }) | 37 | }) |
38 | AfterEach(func() { | 38 | AfterEach(func() { |
39 | - _, err := pG.DB.Exec("DELETE FROM base.menu WHERE true") | 39 | + _, err := pG.DB.Exec("DELETE FROM users.menu WHERE true") |
40 | Expect(err).NotTo(HaveOccurred()) | 40 | Expect(err).NotTo(HaveOccurred()) |
41 | }) | 41 | }) |
42 | }) | 42 | }) |
@@ -15,7 +15,7 @@ var _ = Describe("返回菜单服务列表", func() { | @@ -15,7 +15,7 @@ var _ = Describe("返回菜单服务列表", func() { | ||
15 | BeforeEach(func() { | 15 | BeforeEach(func() { |
16 | _, err := pG.DB.QueryOne( | 16 | _, err := pG.DB.QueryOne( |
17 | pg.Scan(&menuId), | 17 | pg.Scan(&menuId), |
18 | - "INSERT INTO base.menu (menu_id, parent_id, menu_name, code, access_code, menu_type, icon, sort, remark, category, parent_path, is_publish, is_system) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING menu_id", | 18 | + "INSERT INTO users.menu (menu_id, parent_id, menu_name, code, access_code, menu_type, icon, sort, remark, category, parent_path, is_publish, is_system) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING menu_id", |
19 | 1, 0, "testMenuName", "testCode", "testAccessCode", "testMenuType", "testIcon", 1, "testDesc", "testCategory", "testfullPath", 1, 1) | 19 | 1, 0, "testMenuName", "testCode", "testAccessCode", "testMenuType", "testIcon", 1, "testDesc", "testCategory", "testfullPath", 1, 1) |
20 | Expect(err).NotTo(HaveOccurred()) | 20 | Expect(err).NotTo(HaveOccurred()) |
21 | }) | 21 | }) |
@@ -40,7 +40,7 @@ var _ = Describe("返回菜单服务列表", func() { | @@ -40,7 +40,7 @@ var _ = Describe("返回菜单服务列表", func() { | ||
40 | }) | 40 | }) |
41 | }) | 41 | }) |
42 | AfterEach(func() { | 42 | AfterEach(func() { |
43 | - _, err := pG.DB.Exec("DELETE FROM base.menu WHERE true") | 43 | + _, err := pG.DB.Exec("DELETE FROM users.menu WHERE true") |
44 | Expect(err).NotTo(HaveOccurred()) | 44 | Expect(err).NotTo(HaveOccurred()) |
45 | }) | 45 | }) |
46 | }) | 46 | }) |
@@ -15,7 +15,7 @@ var _ = Describe("移除菜单服务", func() { | @@ -15,7 +15,7 @@ var _ = Describe("移除菜单服务", func() { | ||
15 | BeforeEach(func() { | 15 | BeforeEach(func() { |
16 | _, err := pG.DB.QueryOne( | 16 | _, err := pG.DB.QueryOne( |
17 | pg.Scan(&menuId), | 17 | pg.Scan(&menuId), |
18 | - "INSERT INTO base.menu (menu_id, parent_id, menu_name, code, access_code, menu_type, icon, sort, remark, category, parent_path, is_publish, is_system) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING menu_id", | 18 | + "INSERT INTO users.menu (menu_id, parent_id, menu_name, code, access_code, menu_type, icon, sort, remark, category, parent_path, is_publish, is_system) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING menu_id", |
19 | 1, 0, "testMenuName", "testCode", "testAccessCode", "testMenuType", "testIcon", 1, "testDesc", "testCategory", "testfullPath", 1, 1) | 19 | 1, 0, "testMenuName", "testCode", "testAccessCode", "testMenuType", "testIcon", 1, "testDesc", "testCategory", "testfullPath", 1, 1) |
20 | Expect(err).NotTo(HaveOccurred()) | 20 | Expect(err).NotTo(HaveOccurred()) |
21 | }) | 21 | }) |
@@ -36,7 +36,7 @@ var _ = Describe("移除菜单服务", func() { | @@ -36,7 +36,7 @@ var _ = Describe("移除菜单服务", func() { | ||
36 | }) | 36 | }) |
37 | }) | 37 | }) |
38 | AfterEach(func() { | 38 | AfterEach(func() { |
39 | - _, err := pG.DB.Exec("DELETE FROM base.menu WHERE true") | 39 | + _, err := pG.DB.Exec("DELETE FROM users.menu WHERE true") |
40 | Expect(err).NotTo(HaveOccurred()) | 40 | Expect(err).NotTo(HaveOccurred()) |
41 | }) | 41 | }) |
42 | }) | 42 | }) |
@@ -15,7 +15,7 @@ var _ = Describe("更新菜单服务", func() { | @@ -15,7 +15,7 @@ var _ = Describe("更新菜单服务", func() { | ||
15 | BeforeEach(func() { | 15 | BeforeEach(func() { |
16 | _, err := pG.DB.QueryOne( | 16 | _, err := pG.DB.QueryOne( |
17 | pg.Scan(&menuId), | 17 | pg.Scan(&menuId), |
18 | - "INSERT INTO base.menu (menu_id, parent_id, menu_name, code, access_code, menu_type, icon, sort, remark, category, parent_path, is_publish, is_system) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING menu_id", | 18 | + "INSERT INTO users.menu (menu_id, parent_id, menu_name, code, access_code, menu_type, icon, sort, remark, category, parent_path, is_publish, is_system) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING menu_id", |
19 | 1, 0, "testMenuName", "testCode", "testAccessCode", "testMenuType", "testIcon", 1, "testDesc", "testCategory", "testfullPath", 1, 1) | 19 | 1, 0, "testMenuName", "testCode", "testAccessCode", "testMenuType", "testIcon", 1, "testDesc", "testCategory", "testfullPath", 1, 1) |
20 | Expect(err).NotTo(HaveOccurred()) | 20 | Expect(err).NotTo(HaveOccurred()) |
21 | }) | 21 | }) |
@@ -48,7 +48,7 @@ var _ = Describe("更新菜单服务", func() { | @@ -48,7 +48,7 @@ var _ = Describe("更新菜单服务", func() { | ||
48 | }) | 48 | }) |
49 | }) | 49 | }) |
50 | AfterEach(func() { | 50 | AfterEach(func() { |
51 | - _, err := pG.DB.Exec("DELETE FROM base.menu WHERE true") | 51 | + _, err := pG.DB.Exec("DELETE FROM users.menu WHERE true") |
52 | Expect(err).NotTo(HaveOccurred()) | 52 | Expect(err).NotTo(HaveOccurred()) |
53 | }) | 53 | }) |
54 | }) | 54 | }) |
-
请 注册 或 登录 后发表评论