|
@@ -6,6 +6,7 @@ import ( |
|
@@ -6,6 +6,7 @@ import ( |
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"
|
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/version_server"
|
9
|
)
|
10
|
)
|
10
|
|
11
|
|
11
|
const IOSPage = "http://fir.fjmaimaimai.com/pdvn"
|
12
|
const IOSPage = "http://fir.fjmaimaimai.com/pdvn"
|
|
@@ -28,95 +29,32 @@ func (srv *CommonService) GetDictionaryByCode(getDictionaryQuery *query.GetDicti |
|
@@ -28,95 +29,32 @@ func (srv *CommonService) GetDictionaryByCode(getDictionaryQuery *query.GetDicti |
28
|
return nil, err
|
29
|
return nil, err
|
29
|
}
|
30
|
}
|
30
|
return result, nil
|
31
|
return result, nil
|
31
|
- //type dictItem struct {
|
|
|
32
|
- // ItemCode string `json:"itemCode"`
|
|
|
33
|
- // ItemValue string `json:"itemValue"`
|
|
|
34
|
- //}
|
|
|
35
|
- //dictionaries := make([]interface{}, 0)
|
|
|
36
|
- //for i := range getDictionaryQuery.DictCode {
|
|
|
37
|
- // switch getDictionaryQuery.DictCode[i] {
|
|
|
38
|
- // case "MenuType":
|
|
|
39
|
- // dictionaries = append(dictionaries, map[string]interface{}{
|
|
|
40
|
- // "dictName": "菜单类型",
|
|
|
41
|
- // "dictItems": []dictItem{
|
|
|
42
|
- // {"目录", "catalog"},
|
|
|
43
|
- // {"菜单", "menu"},
|
|
|
44
|
- // {"按钮", "button"},
|
|
|
45
|
- // },
|
|
|
46
|
- // "dictCode": "MenuType",
|
|
|
47
|
- // })
|
|
|
48
|
- // case "XTZD-001":
|
|
|
49
|
- // dictionaries = append(dictionaries, map[string]interface{}{
|
|
|
50
|
- // "dictName": "规模",
|
|
|
51
|
- // "dictItems": []dictItem{
|
|
|
52
|
- // {"1", "0~100人"},
|
|
|
53
|
- // {"2", "101~200人"},
|
|
|
54
|
- // {"3", "201~500人"},
|
|
|
55
|
- // {"4", "501~1000人"},
|
|
|
56
|
- // {"5", "1000人以上"},
|
|
|
57
|
- // },
|
|
|
58
|
- // "dictCode": "XTZD-001",
|
|
|
59
|
- // })
|
|
|
60
|
- // case "XTZD-002":
|
|
|
61
|
- // dictionaries = append(dictionaries, map[string]interface{}{
|
|
|
62
|
- // "dictName": "产业类型",
|
|
|
63
|
- // "dictItems": []dictItem{
|
|
|
64
|
- // {"1", "食品行业"},
|
|
|
65
|
- // {"2", "电子行业"},
|
|
|
66
|
- // {"3", "纺织业"},
|
|
|
67
|
- // },
|
|
|
68
|
- // "dictCode": "XTZD-002",
|
|
|
69
|
- // })
|
|
|
70
|
- // }
|
|
|
71
|
- //}
|
|
|
72
|
- //return map[string]interface{}{"dictionarys": dictionaries}, nil
|
|
|
73
|
}
|
32
|
}
|
74
|
|
33
|
|
75
|
//LatestVersionInfo 版本升级
|
34
|
//LatestVersionInfo 版本升级
|
76
|
func (srv *CommonService) LatestVersionInfo(q *query.GetLatestVersionQuery) (interface{}, error) {
|
35
|
func (srv *CommonService) LatestVersionInfo(q *query.GetLatestVersionQuery) (interface{}, error) {
|
77
|
- page := IOSPage
|
|
|
78
|
- if q.DeviceType == "1" { // 安卓
|
|
|
79
|
- page = ANDPage
|
36
|
+ vs := version_server.NewHttpLibVersionServer()
|
|
|
37
|
+ data, err := vs.GetLatestVersion(q.Request, version_server.ReqLatestVersion{
|
|
|
38
|
+ VersionNo: q.VersionNo,
|
|
|
39
|
+ Channel: q.Channel,
|
|
|
40
|
+ })
|
|
|
41
|
+ if err != nil {
|
|
|
42
|
+ return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
80
|
}
|
43
|
}
|
81
|
- return map[string]interface{}{
|
|
|
82
|
- "version": map[string]interface{}{
|
|
|
83
|
- "downloadPage": page,
|
|
|
84
|
- "downloadFile": "",
|
|
|
85
|
- "updateType": 0,
|
|
|
86
|
- },
|
|
|
87
|
- }, nil
|
|
|
88
|
- //vs:= version_server.NewHttpLibVersionServer()
|
|
|
89
|
- //data,err:= vs.GetLatestVersion(q.Request,version_server.ReqLatestVersion{
|
|
|
90
|
- // VersionNo: q.VersionNo,
|
|
|
91
|
- // Channel: q.Channel,
|
|
|
92
|
- //})
|
|
|
93
|
- //if err != nil {
|
|
|
94
|
- // return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
|
|
95
|
- //}
|
|
|
96
|
- //return data, nil
|
44
|
+ return data, nil
|
97
|
}
|
45
|
}
|
98
|
|
46
|
|
99
|
//AppSharing 获取分享链接地址
|
47
|
//AppSharing 获取分享链接地址
|
100
|
func (srv *CommonService) AppSharing(q *query.GetLatestVersionQuery) (interface{}, error) {
|
48
|
func (srv *CommonService) AppSharing(q *query.GetLatestVersionQuery) (interface{}, error) {
|
101
|
- page := IOSPage
|
|
|
102
|
- if q.DeviceType == "1" { // 安卓
|
|
|
103
|
- page = ANDPage
|
49
|
+ vs := version_server.NewHttpLibVersionServer()
|
|
|
50
|
+ data, err := vs.GetLatestVersion(q.Request, version_server.ReqLatestVersion{
|
|
|
51
|
+ VersionNo: q.VersionNo,
|
|
|
52
|
+ Channel: q.Channel,
|
|
|
53
|
+ })
|
|
|
54
|
+ if err != nil {
|
|
|
55
|
+ return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
104
|
}
|
56
|
}
|
105
|
- return map[string]interface{}{
|
|
|
106
|
- "version": map[string]interface{}{
|
|
|
107
|
- "downloadPage": page,
|
|
|
108
|
- "downloadFile": "",
|
|
|
109
|
- },
|
|
|
110
|
- }, nil
|
|
|
111
|
- //vs:= version_server.NewHttpLibVersionServer()
|
|
|
112
|
- //data,err:= vs.GetLatestVersion(q.Request,version_server.ReqLatestVersion{
|
|
|
113
|
- // VersionNo: q.VersionNo,
|
|
|
114
|
- // Channel: q.Channel,
|
|
|
115
|
- //})
|
|
|
116
|
- //if err != nil {
|
|
|
117
|
- // return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
|
|
118
|
- //}
|
|
|
119
|
- //return data, nil
|
57
|
+ return data, nil
|
120
|
}
|
58
|
}
|
121
|
|
59
|
|
122
|
// AdvancedSetting 高级查询 配置
|
60
|
// AdvancedSetting 高级查询 配置
|