修复单词拼写错误的问题

This commit is contained in:
dushixiang
2022-03-05 16:39:40 +08:00
parent 1ef84efaa9
commit 4baaeea3fd
14 changed files with 40 additions and 13 deletions

View File

@ -345,3 +345,8 @@ func (r assetRepository) FindAssetAttrMapByAssetId(c context.Context, assetId st
}
return attributeMap, nil
}
func (r assetRepository) UpdateAttrs(c context.Context, name, value, newValue string) error {
sql := "update asset_attributes set value = ? where name = ? and value = ?"
return r.GetDB(c).Exec(sql, newValue, name, value).Error
}

View File

@ -168,3 +168,8 @@ func (r sessionRepository) FindAllUnReviewed(c context.Context) (o []model.Sessi
err = r.GetDB(c).Where("reviewed = false or reviewed is null").Find(&o).Error
return
}
func (r sessionRepository) UpdateMode(c context.Context) error {
sql := "update sessions set mode = 'native' where mode = 'naive'"
return r.GetDB(c).Exec(sql).Error
}