Save
This commit is contained in:
parent
b053e583d8
commit
ea732fd78d
@ -23,8 +23,8 @@ UNIQUE KEY `friendship` (`account1_id`,`account2_id`)
|
||||
COMMENT "已经成为好友"
|
||||
;
|
||||
|
||||
drop table if exists `t_pending_friend_requests`;
|
||||
CREATE TABLE t_pending_friend_requests (
|
||||
drop table if exists `t_friend_pending_requests`;
|
||||
CREATE TABLE t_friend_pending_requests (
|
||||
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
|
||||
sender_account_id varchar(60) NOT NULL DEFAULT '',
|
||||
receiver_account_id varchar(60) NOT NULL DEFAULT '',
|
||||
|
@ -269,8 +269,8 @@ func (fm *FriendsMgr) listFriend(accountId string) []*User {
|
||||
}
|
||||
|
||||
func (fm *FriendsMgr) acceptFriendRequestToDB(account1Id string, account2Id string) error {
|
||||
// step1. UPDATE t_pending_friend_requests
|
||||
_, err := friendDBStore.Exec("UPDATE t_pending_friend_requests SET flag=1 WHERE sender_account_id = ? AND receiver_account_id = ?", account1Id, account2Id)
|
||||
// step1. UPDATE t_friend_pending_requests
|
||||
_, err := friendDBStore.Exec("UPDATE t_friend_pending_requests SET flag=1 WHERE sender_account_id = ? AND receiver_account_id = ?", account1Id, account2Id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -334,7 +334,7 @@ func (fm *FriendsMgr) loadFriendshipsFromDB(conn *q5.Mysql) {
|
||||
}
|
||||
|
||||
func (fm *FriendsMgr) loadPendingRequestsFromDB(conn *q5.Mysql) {
|
||||
rows, err := conn.Query("select sender_account_id, receiver_account_id, flag from t_pending_friend_requests;")
|
||||
rows, err := conn.Query("select sender_account_id, receiver_account_id, flag from t_friend_pending_requests;")
|
||||
if err != nil {
|
||||
f5.GetSysLog().Info("mysql error:%s\n", err)
|
||||
return
|
||||
|
@ -8,15 +8,15 @@ require f5 v1.0.0
|
||||
|
||||
require mt v1.0.0
|
||||
|
||||
require mtb v1.0.0
|
||||
require mtb v1.0.0 // indirect
|
||||
|
||||
require cs v1.0.0
|
||||
|
||||
require ss v1.0.0
|
||||
|
||||
require github.com/golang/protobuf v1.4.2
|
||||
|
||||
require (
|
||||
github.com/go-sql-driver/mysql v1.5.0 // indirect
|
||||
github.com/golang/protobuf v1.4.2 // indirect
|
||||
github.com/gomodule/redigo v1.8.3 // indirect
|
||||
google.golang.org/protobuf v1.23.0 // indirect
|
||||
)
|
||||
|
@ -2,7 +2,13 @@ module ss
|
||||
|
||||
go 1.20
|
||||
|
||||
require q5 v1.0.0
|
||||
require f5 v1.0.0
|
||||
|
||||
require (
|
||||
github.com/golang/protobuf v1.4.2
|
||||
google.golang.org/protobuf v1.23.0
|
||||
)
|
||||
|
||||
replace q5 => ../../../third_party/q5
|
||||
replace f5 => ../../../third_party/f5
|
Loading…
x
Reference in New Issue
Block a user