pull/141/head
skiffer-git 3 years ago
parent 6f1a5eb79c
commit 1ca8d2b2db

@ -106,7 +106,8 @@ func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq
// {openIM001 openIM002 0 test add friend 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC }] // {openIM001 openIM002 0 test add friend 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC }]
log.NewDebug(req.CommID.OperationID, "UpdateFriendApplication args ", friendRequest) log.NewDebug(req.CommID.OperationID, "UpdateFriendApplication args ", friendRequest)
//err := imdb.InsertFriendApplication(&friendRequest) //err := imdb.InsertFriendApplication(&friendRequest)
err := imdb.InsertFriendApplication(&friendRequest, map[string]interface{}{"handle_result": 0}) err := imdb.InsertFriendApplication(&friendRequest,
map[string]interface{}{"handle_result": 0, "req_msg": friendRequest.ReqMsg, "create_time": friendRequest.CreateTime})
if err != nil { if err != nil {
log.NewError(req.CommID.OperationID, "UpdateFriendApplication failed ", err.Error(), friendRequest) log.NewError(req.CommID.OperationID, "UpdateFriendApplication failed ", err.Error(), friendRequest)
return &pbFriend.AddFriendResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil return &pbFriend.AddFriendResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil

@ -44,7 +44,7 @@ func UserRegister(user db.User) error {
if user.Birth.Unix() < 0 { if user.Birth.Unix() < 0 {
user.Birth = utils.UnixSecondToTime(0) user.Birth = utils.UnixSecondToTime(0)
} }
err = dbConn.Debug().Table("users").Create(&user).Error err = dbConn.Table("users").Create(&user).Error
if err != nil { if err != nil {
return err return err
} }

Loading…
Cancel
Save