优化
This commit is contained in:
parent
ab72563523
commit
bf46f423c1
|
@ -75,15 +75,15 @@ func (l *UserInfoSetLogic) UserInfoSet(req *types.UserInfoSetReq, userinfo *auth
|
|||
BuilderDB := fsUserInfoModel.BuilderDB(l.ctx, nil).Model(&gmodel.FsUserInfo{})
|
||||
BuilderDB1 := fsUserInfoModel.BuilderDB(l.ctx, nil).Model(&gmodel.FsUserInfo{})
|
||||
if req.Module == "merchant_category" {
|
||||
BuilderDB1.Where("module = ?", "profile")
|
||||
BuilderDB1 = BuilderDB1.Where("module = ?", "profile")
|
||||
} else {
|
||||
BuilderDB1.Where("module = ?", req.Module)
|
||||
BuilderDB1 = BuilderDB1.Where("module = ?", req.Module)
|
||||
}
|
||||
//.Where("user_id=?", userId).Where("guest_id=?", guestId)
|
||||
if userId > 0 {
|
||||
BuilderDB1.Where("user_id=?", userId)
|
||||
BuilderDB1 = BuilderDB1.Where("user_id=?", userId)
|
||||
} else {
|
||||
BuilderDB1.Where("guest_id=?", guestId)
|
||||
BuilderDB1 = BuilderDB1.Where("guest_id=?", guestId)
|
||||
}
|
||||
userInfo, err = fsUserInfoModel.FindOne(BuilderDB1, nil)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue
Block a user