TOC
friend := models.Friend{
GameId: p.gameID,
Uid: uid,
UNick: uNick,
UAvatar: uAvatar,
Fid: fid,
FNick: fNick,
FAvatar: fAvatar,
CreateTime: time.Now().Unix(),
}
err := mysql.MysqlClient.Table(p.tableName).Where("game_id = ? and uid = ? and fid = ?", p.gameID, uid, fid).Assign(models.Friend{CreateTime: time.Now().Unix()}).FirstOrCreate(&friend).Error
comments powered by Disqus