修复 AuthKey为空的时候 也可以过.

This commit is contained in:
eson
2023-06-25 11:26:47 +08:00
parent 8bd6f019ba
commit efe02a0355
23 changed files with 267 additions and 125 deletions

View File

@@ -1,2 +1,10 @@
package gmodel
// TODO: 使用model的属性做你想做的
import "context"
// TODO: 使用model的属性做你想做的
func (m *FsWebSetModel) FindValueByKey(ctx context.Context, keyType string) (data FsWebSet, err error) {
err = m.db.WithContext(ctx).Model(&data).Select("value").Where("`key` = ?", keyType).Take(&data).Error
return data, err
}