|
@@ -5,7 +5,6 @@ import ( |
|
@@ -5,7 +5,6 @@ import ( |
5
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/common/command"
|
5
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/common/command"
|
6
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/common/query"
|
6
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/common/query"
|
7
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
|
7
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
|
8
|
- "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_basic"
|
|
|
9
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user"
|
8
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user"
|
10
|
)
|
9
|
)
|
11
|
|
10
|
|
|
@@ -18,14 +17,53 @@ func NewCommonService(options map[string]interface{}) *CommonService { |
|
@@ -18,14 +17,53 @@ func NewCommonService(options map[string]interface{}) *CommonService { |
18
|
|
17
|
|
19
|
//GetDictionaryByCode 根据code获取字典数据
|
18
|
//GetDictionaryByCode 根据code获取字典数据
|
20
|
func (srv *CommonService) GetDictionaryByCode(getDictionaryQuery *query.GetDictionaryByCodeQuery) (interface{}, error) {
|
19
|
func (srv *CommonService) GetDictionaryByCode(getDictionaryQuery *query.GetDictionaryByCodeQuery) (interface{}, error) {
|
21
|
- creationBasicGateway := allied_creation_basic.NewHttplibAlliedCreationBasic(domain.Operator{})
|
|
|
22
|
- result, err := creationBasicGateway.GetDictionarysByCode(allied_creation_basic.ReqGetDictionaryByCode{
|
|
|
23
|
- DictCode: getDictionaryQuery.DictCode,
|
|
|
24
|
- })
|
|
|
25
|
- if err != nil {
|
|
|
26
|
- return nil, err
|
20
|
+ //creationBasicGateway := allied_creation_basic.NewHttplibAlliedCreationBasic(domain.Operator{})
|
|
|
21
|
+ //result, err := creationBasicGateway.GetDictionarysByCode(allied_creation_basic.ReqGetDictionaryByCode{
|
|
|
22
|
+ // DictCode: getDictionaryQuery.DictCode,
|
|
|
23
|
+ //})
|
|
|
24
|
+ //if err != nil {
|
|
|
25
|
+ // return nil, err
|
|
|
26
|
+ //}
|
|
|
27
|
+ //return result, nil
|
|
|
28
|
+ // TODO:测试使用,后期移除掉
|
|
|
29
|
+ type dictItem struct {
|
|
|
30
|
+ ItemCode string `json:"itemCode"`
|
|
|
31
|
+ ItemValue string `json:"itemValue"`
|
|
|
32
|
+ }
|
|
|
33
|
+ dictionaries := make([]interface{}, 0)
|
|
|
34
|
+ for i := range getDictionaryQuery.DictCode {
|
|
|
35
|
+ switch getDictionaryQuery.DictCode[i] {
|
|
|
36
|
+ case "MenuType":
|
|
|
37
|
+ dictionaries = append(dictionaries, map[string]interface{}{
|
|
|
38
|
+ "dictName": "菜单类型",
|
|
|
39
|
+ "dictItems": []dictItem{
|
|
|
40
|
+ {"目录", "catalog"},
|
|
|
41
|
+ {"菜单", "menu"},
|
|
|
42
|
+ {"按钮", "button"},
|
|
|
43
|
+ },
|
|
|
44
|
+ })
|
|
|
45
|
+ case "scale":
|
|
|
46
|
+ dictionaries = append(dictionaries, map[string]interface{}{
|
|
|
47
|
+ "dictName": "规模",
|
|
|
48
|
+ "dictItems": []dictItem{
|
|
|
49
|
+ {"50~100人", "50~100人"},
|
|
|
50
|
+ {"100~500人", "100~500人"},
|
|
|
51
|
+ {"500人以上", "500人以上"},
|
|
|
52
|
+ },
|
|
|
53
|
+ })
|
|
|
54
|
+ case "industry":
|
|
|
55
|
+ dictionaries = append(dictionaries, map[string]interface{}{
|
|
|
56
|
+ "dictName": "产业类型",
|
|
|
57
|
+ "dictItems": []dictItem{
|
|
|
58
|
+ {"食品行业", "食品行业"},
|
|
|
59
|
+ {"金融行业", "金融行业"},
|
|
|
60
|
+ {"保险行业", "保险行业"},
|
|
|
61
|
+ {"计算机行业", "计算机行业"},
|
|
|
62
|
+ },
|
|
|
63
|
+ })
|
|
|
64
|
+ }
|
27
|
}
|
65
|
}
|
28
|
- return result, nil
|
66
|
+ return map[string]interface{}{"dictionarys": dictionaries}, nil
|
29
|
}
|
67
|
}
|
30
|
|
68
|
|
31
|
//CompanySignUp 公司注册
|
69
|
//CompanySignUp 公司注册
|