mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
Refactor code
This commit is contained in:
parent
c312f079fb
commit
2fcd21ae94
@ -2,6 +2,7 @@ package im_mysql_model
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/db"
|
||||
"Open_IM/pkg/utils"
|
||||
"time"
|
||||
)
|
||||
|
||||
@ -82,7 +83,7 @@ func InsertFriendApplication(friendRequest *FriendRequest) error {
|
||||
friendRequest.CreateTime = time.Now()
|
||||
}
|
||||
if friendRequest.HandleTime.Unix() < 0 {
|
||||
friendRequest.HandleTime = time.Now()
|
||||
friendRequest.HandleTime = utils.UnixSecondToTime(0)
|
||||
}
|
||||
err = dbConn.Table("friend_request").Create(friendRequest).Error
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user