fixed get user profile error when this user not have tweets yet

pull/393/head
Michael Li 9 months ago
parent fdd0a8bb0b
commit a2a9731dce
No known key found for this signature in database

@ -36,7 +36,7 @@ func newUserManageService(db *gorm.DB, ums core.UserMetricServantA) core.UserMan
return &userManageSrv{ return &userManageSrv{
db: db, db: db,
ums: ums, ums: ums,
_userProfileJoins: fmt.Sprintf("JOIN %s m ON %s.id=m.user_id", _userMetric_, _user_), _userProfileJoins: fmt.Sprintf("LEFT JOIN %s m ON %s.id=m.user_id", _userMetric_, _user_),
_userProfileWhere: fmt.Sprintf("%s.username=? AND %s.is_del=0", _user_, _user_), _userProfileWhere: fmt.Sprintf("%s.username=? AND %s.is_del=0", _user_, _user_),
_userProfileColoumns: []string{ _userProfileColoumns: []string{
fmt.Sprintf("%s.id", _user_), fmt.Sprintf("%s.id", _user_),

Loading…
Cancel
Save