This commit is contained in:
momo 2023-11-24 16:47:09 +08:00
parent ab72563523
commit bf46f423c1

View File

@ -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 {