Browse Source

增加代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
pull/1406/head
zouap 3 years ago
parent
commit
01c94e7c87
2 changed files with 3 additions and 0 deletions
  1. +1
    -0
      models/ai_model_manage.go
  2. +2
    -0
      routers/repo/ai_model_manage.go

+ 1
- 0
models/ai_model_manage.go View File

@@ -36,6 +36,7 @@ type AiModelManage struct {
CreatedUnix timeutil.TimeStamp `xorm:"created"`
UpdatedUnix timeutil.TimeStamp `xorm:"updated"`
IsCanOper bool
IsCanDelete bool
}

type AiModelQueryOptions struct {


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

@@ -436,6 +436,7 @@ func ShowSingleModel(ctx *context.Context) {
userIds := make([]int64, len(models))
for i, model := range models {
model.IsCanOper = isOper(ctx, model.UserId)
model.IsCanDelete = isCanDelete(ctx, model)
userIds[i] = model.UserId
}
userNameMap := queryUserName(userIds)
@@ -478,6 +479,7 @@ func ShowOneVersionOtherModel(ctx *context.Context) {
userIds := make([]int64, len(aimodels))
for i, model := range aimodels {
model.IsCanOper = isOper(ctx, model.UserId)
model.IsCanDelete = isCanDelete(ctx, model)
userIds[i] = model.UserId
}
userNameMap := queryUserName(userIds)


Loading…
Cancel
Save