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
cb79b1aea5
commit
7c3e429f22
@ -24,7 +24,6 @@ func UpdateGroupRequest(groupRequest GroupRequest) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
groupRequest.ReqTime = time.Now()
|
||||
|
||||
if groupRequest.HandledTime.Unix() < 0 {
|
||||
groupRequest.HandledTime = utils.UnixSecondToTime(0)
|
||||
@ -43,7 +42,12 @@ func InsertIntoGroupRequest(toInsertInfo GroupRequest) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
toInsertInfo.HandledTime = time.Now()
|
||||
|
||||
toInsertInfo.ReqTime = time.Now()
|
||||
if toInsertInfo.HandledTime.Unix() < 0 {
|
||||
toInsertInfo.HandledTime = utils.UnixSecondToTime(0)
|
||||
}
|
||||
|
||||
err = dbConn.Table("group_request").Create(&toInsertInfo).Error
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
x
Reference in New Issue
Block a user