|
|
@@ -118,9 +118,8 @@ func ModifyModelNewProperty(id string, new int, versioncount int) error { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func ModifyModelDownloadCount(id string) error { |
|
|
func ModifyModelDownloadCount(id string) error { |
|
|
var sess *xorm.Session |
|
|
|
|
|
|
|
|
sess := x.NewSession() |
|
|
defer sess.Close() |
|
|
defer sess.Close() |
|
|
|
|
|
|
|
|
if _, err := sess.Exec("UPDATE `ai_model_manage` SET download_count = download_count + 1 WHERE id = ?", id); err != nil { |
|
|
if _, err := sess.Exec("UPDATE `ai_model_manage` SET download_count = download_count + 1 WHERE id = ?", id); err != nil { |
|
|
return err |
|
|
return err |
|
|
} |
|
|
} |
|
|
|