Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.12.1^2
zouap 3 years ago
parent
commit
42acb4ce08
2 changed files with 4 additions and 14 deletions
  1. +4
    -0
      models/ai_model_manage.go
  2. +0
    -14
      routers/repo/ai_model_manage.go

+ 4
- 0
models/ai_model_manage.go View File

@@ -427,6 +427,10 @@ func QueryModel(opts *AiModelQueryOptions) ([]*AiModelManage, int64, error) {
builder.Eq{"ai_model_manage.status": opts.Status},
)
}
orCon := builder.NewCond()
orCon = orCon.And(builder.Eq{"ai_model_manage.is_private": false})

cond = cond.Or(orCon)

count, err := sess.Where(cond).Count(new(AiModelManage))
if err != nil {


+ 0
- 14
routers/repo/ai_model_manage.go View File

@@ -557,20 +557,6 @@ func deleteModelByID(ctx *context.Context, id string) error {
return err
}

func QueryModelByParameters(repoId int64, page int) ([]*models.AiModelManage, int64, error) {

return models.QueryModel(&models.AiModelQueryOptions{
ListOptions: models.ListOptions{
Page: page,
PageSize: setting.UI.IssuePagingNum,
},
RepoID: repoId,
Type: -1,
New: MODEL_LATEST,
Status: -1,
})
}

func DownloadMultiModelFile(ctx *context.Context) {
log.Info("DownloadMultiModelFile start.")
id := ctx.Query("id")


Loading…
Cancel
Save