update app

This commit is contained in:
wangchuxiao
2022-05-10 17:39:27 +08:00
parent c998bce34f
commit 7137924baa
3 changed files with 47 additions and 96 deletions
@@ -11,14 +11,13 @@ func UpdateAppVersion(appType int, version string, forceUpdate bool, fileName, y
return err
}
app := db.AppVersion{
Version: version,
Type: appType,
UpdateTime: int(time.Now().Unix()),
ForceUpdate: forceUpdate,
FileName: fileName,
YamlName: yamlName,
Version: version,
Type: appType,
UpdateTime: int(time.Now().Unix()),
FileName: fileName,
YamlName: yamlName,
}
result := dbConn.Model(db.AppVersion{}).Where("type = ?", appType).Updates(&app)
result := dbConn.Model(db.AppVersion{}).Where("type = ?", appType).Updates(&app).Update(map[string]interface{}{"force_update": forceUpdate})
if result.Error != nil {
return result.Error
}