|
@ -86,8 +86,8 @@ func (t *AuctionCtl) StopAuction() { |
|
|
user := new(models.User) |
|
|
user := new(models.User) |
|
|
exist, err := models.Get(user, history.UserId) |
|
|
exist, err := models.Get(user, history.UserId) |
|
|
t.CheckErr(err) |
|
|
t.CheckErr(err) |
|
|
|
|
|
record := new(models.AuctionResultRecord) |
|
|
if exist { |
|
|
if exist { |
|
|
record := new(models.AuctionResultRecord) |
|
|
|
|
|
record.AuctionActivityId = auctionId |
|
|
record.AuctionActivityId = auctionId |
|
|
record.RehearsalId = history.RehearsalId // 彩排
|
|
|
record.RehearsalId = history.RehearsalId // 彩排
|
|
|
record.AuctionGoodsName = auction.AuctionGoodsName |
|
|
record.AuctionGoodsName = auction.AuctionGoodsName |
|
@ -103,24 +103,22 @@ func (t *AuctionCtl) StopAuction() { |
|
|
record.IsDelete = false |
|
|
record.IsDelete = false |
|
|
_, err = models.Add(record) |
|
|
_, err = models.Add(record) |
|
|
t.CheckErr(err) |
|
|
t.CheckErr(err) |
|
|
|
|
|
|
|
|
go ws_send_service.SendAuction(fmt.Sprintf("%d", record.ActivityId), |
|
|
|
|
|
"", 0, map[string]interface{}{ |
|
|
|
|
|
"type": "auction", |
|
|
|
|
|
"data": map[string]interface{}{ |
|
|
|
|
|
"auction_activity_id": auction.Id, |
|
|
|
|
|
"activity_id": auction.ActivityId, |
|
|
|
|
|
"max_money": history.Money, |
|
|
|
|
|
"user_id": user.Id, |
|
|
|
|
|
"avatar": user.Avatar, |
|
|
|
|
|
"nickname": user.Nickname, |
|
|
|
|
|
"num": 0, |
|
|
|
|
|
"status": "已结束", |
|
|
|
|
|
"model": auction.AuctionModel, |
|
|
|
|
|
}, |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
go ws_send_service.SendAuction(fmt.Sprintf("%d", record.ActivityId), |
|
|
|
|
|
"", 0, map[string]interface{}{ |
|
|
|
|
|
"type": "auction", |
|
|
|
|
|
"data": map[string]interface{}{ |
|
|
|
|
|
"auction_activity_id": auction.Id, |
|
|
|
|
|
"activity_id": auction.ActivityId, |
|
|
|
|
|
"max_money": history.Money, |
|
|
|
|
|
"user_id": user.Id, |
|
|
|
|
|
"avatar": user.Avatar, |
|
|
|
|
|
"nickname": user.Nickname, |
|
|
|
|
|
"num": 0, |
|
|
|
|
|
"status": "已结束", |
|
|
|
|
|
"model": auction.AuctionModel, |
|
|
|
|
|
}, |
|
|
|
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
go ws_send_service.SendAuction(fmt.Sprintf("%d", auction.ActivityId), |
|
|
go ws_send_service.SendAuction(fmt.Sprintf("%d", auction.ActivityId), |
|
|
"", 0, map[string]interface{}{ |
|
|
"", 0, map[string]interface{}{ |
|
|