This commit is contained in:
laodaming
2023-06-20 18:05:29 +08:00
parent d4d11db732
commit 313e8a9457
5 changed files with 57 additions and 141 deletions

View File

@@ -1,2 +1,10 @@
package gmodel
// TODO: 使用model的属性做你想做的
import "context"
// TODO: 使用model的属性做你想做的
func (g *FsGerentModel) Find(ctx context.Context, authKey string) (resp FsGerent, err error) {
err = g.db.WithContext(ctx).Model(&FsGerent{}).Where("`auth_key` = ?", authKey).Take(&resp).Error
return resp, err
}