修复 AuthKey为空的时候 也可以过.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user