This commit is contained in:
eson 2023-10-26 11:43:19 +08:00
parent 21196c62ee
commit aef2ee18dd

View File

@ -91,7 +91,7 @@ func (m *FsUserInfoModel) GetProfile(ctx context.Context, pkey string, userId in
} }
rawsql := fmt.Sprintf("select JSON_EXTRACT(metadata,'$%s') as query from %s where %s and module = 'profile' order by ctime DESC limit 1", pkey, tname, condUser) rawsql := fmt.Sprintf("select JSON_EXTRACT(metadata,'$%s') as query from %s where %s and module = 'profile' order by ctime DESC limit 1", pkey, tname, condUser)
err := m.db.WithContext(ctx).Raw(rawsql, userId).Take(&baseinfo).Error err := m.db.WithContext(ctx).Raw(rawsql).Take(&baseinfo).Error
if err != nil { if err != nil {
return nil, err return nil, err
} }