From cabf4ae850c3436631d7bf72e6ff09fff2e42cbb Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Tue, 3 Dec 2024 16:30:21 +0800 Subject: [PATCH] update --- src/implement/egg_friend_circle_basic_implement.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/implement/egg_friend_circle_basic_implement.go b/src/implement/egg_friend_circle_basic_implement.go index 82f08b5..b5fd2ad 100644 --- a/src/implement/egg_friend_circle_basic_implement.go +++ b/src/implement/egg_friend_circle_basic_implement.go @@ -17,10 +17,13 @@ type EggFriendCircleBasicDb struct { func (e EggFriendCircleBasicDb) EggFriendCircleBasicGetOne() (*model.EggFriendCircleBasic, error) { var m model.EggFriendCircleBasic - _, err := e.Db.Where("id >= ?", 1).Get(&m) + has, err := e.Db.Where("id >= ?", 1).Get(&m) if err != nil { return nil, zhios_order_relate_logx.Error(err.Error()) } + if has == false { + return nil, nil + } return &m, nil }