|
|
@@ -0,0 +1,28 @@ |
|
|
|
package implement |
|
|
|
|
|
|
|
import ( |
|
|
|
"code.fnuoos.com/EggPlanet/egg_models.git/src/dao" |
|
|
|
"code.fnuoos.com/EggPlanet/egg_models.git/src/model" |
|
|
|
zhios_order_relate_logx "code.fnuoos.com/EggPlanet/egg_models.git/utils/logx" |
|
|
|
"xorm.io/xorm" |
|
|
|
) |
|
|
|
|
|
|
|
func NewEggFriendCircleUserBlackListDb(engine *xorm.Engine) dao.EggFriendCircleUserBlackListDao { |
|
|
|
return &EggFriendCircleUserBlackListDb{Db: engine} |
|
|
|
} |
|
|
|
|
|
|
|
type EggFriendCircleUserBlackListDb struct { |
|
|
|
Db *xorm.Engine |
|
|
|
} |
|
|
|
|
|
|
|
func (e EggFriendCircleUserBlackListDb) EggFriendCircleUserBlackListGet(uid int64) (*model.EggFriendCircleUserBlackList, error) { |
|
|
|
var m model.EggFriendCircleUserBlackList |
|
|
|
has, err := e.Db.Where("uid >= ?", uid).Get(&m) |
|
|
|
if err != nil { |
|
|
|
return nil, zhios_order_relate_logx.Error(err.Error()) |
|
|
|
} |
|
|
|
if !has { |
|
|
|
return nil, nil |
|
|
|
} |
|
|
|
return &m, nil |
|
|
|
} |