作者 yangfu

fix : 版本升级修改

... ... @@ -13,6 +13,7 @@ type GetLatestVersionQuery struct {
DeviceType string `json:"-"`
VersionNo int `json:"versionNo,string"`
Channel int `json:"channel"`
AppName string `json:"appName"`
Request *http.Request `json:"-"`
}
... ...
... ... @@ -51,6 +51,21 @@ func (srv *CommonService) GetDictionaryByCode(getDictionaryQuery *query.GetDicti
//LatestVersionInfo 版本升级
func (srv *CommonService) LatestVersionInfo(q *query.GetLatestVersionQuery) (interface{}, error) {
vs := version_server.NewHttpLibVersionServer()
// TODO:版本管理系统按应用名称查询相应版本信息,目前维护人没在,此处先写死手动维护
if len(q.AppName) != 0 && q.AppName == "com.mmm.manufacture-weigh.pad" {
return map[string]interface{}{
"version": map[string]interface{}{
"versionName": "版本 v1.0.1",
"content": "版本升级",
"title": "版本升级",
"versionNo": "100001",
"downloadFile": "upgrade",
"downloadPage": "http://fir.fjmaimaimai.com/ben1",
"updateType": 0,
"channel": 1,
},
}, nil
}
data, err := vs.GetLatestVersion(q.Request, version_server.ReqLatestVersion{
VersionNo: q.VersionNo,
Channel: q.Channel,
... ...