|
|
@@ -48,3 +48,14 @@ func (c CloudBundleDb) GetCloudBundleLast(os string) (m *model.CloudBundle, err |
|
|
|
} |
|
|
|
return m, nil |
|
|
|
} |
|
|
|
func (c CloudBundleDb) GetCloudBundleVersion(os, version string) (m *model.CloudBundle, err error) { |
|
|
|
m = new(model.CloudBundle) |
|
|
|
has, err := c.Db.Where("os=? and version=?", os, version).Desc("id").Get(m) |
|
|
|
if err != nil { |
|
|
|
return nil, zhios_order_relate_logx.Error(err) |
|
|
|
} |
|
|
|
if has == false { |
|
|
|
return nil, nil |
|
|
|
} |
|
|
|
return m, nil |
|
|
|
} |