fix!: Update peer to use ID instead of UUID
This commit is contained in:
1 parent
07dfba9d59
commit
a7c087afbb
3 files changed
+7
-7
No files matched your search
+3
-3
@@ -395,10 +395,10 @@ func (us *UserService) UserThirdInfo(userId uint, op string) *model.UserThird {
|
||||
return ut
|
||||
}
|
||||
|
||||
// FindLatestUserIdFromLoginLogByUuid 根据uuid查找最后登录的用户id
|
||||
func (us *UserService) FindLatestUserIdFromLoginLogByUuid(uuid string) uint {
|
||||
// FindLatestUserIdFromLoginLogByUuid 根据uuid和设备id查找最后登录的用户id
|
||||
func (us *UserService) FindLatestUserIdFromLoginLogByUuid(uuid string, deviceId string) uint {
|
||||
llog := &model.LoginLog{}
|
||||
DB.Where("uuid = ?", uuid).Order("id desc").First(llog)
|
||||
DB.Where("uuid = ? and device_id = ?", uuid, deviceId).Order("id desc").First(llog)
|
||||
return llog.UserId
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user