From 9f4ae817ef1d18e3eb83391c3401cad5d209c360 Mon Sep 17 00:00:00 2001 From: tommy <3405129587@qq.com> Date: Thu, 2 Jul 2020 15:28:11 +0800 Subject: [PATCH] fix:bug --- controllers/pc/auction.go | 34 ++++++++++++++++------------------ go.mod | 4 ++-- go.sum | 4 ++++ 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/controllers/pc/auction.go b/controllers/pc/auction.go index cc16302..5f7e74d 100644 --- a/controllers/pc/auction.go +++ b/controllers/pc/auction.go @@ -86,8 +86,8 @@ func (t *AuctionCtl) StopAuction() { user := new(models.User) exist, err := models.Get(user, history.UserId) t.CheckErr(err) + record := new(models.AuctionResultRecord) if exist { - record := new(models.AuctionResultRecord) record.AuctionActivityId = auctionId record.RehearsalId = history.RehearsalId // 彩排 record.AuctionGoodsName = auction.AuctionGoodsName @@ -103,24 +103,22 @@ func (t *AuctionCtl) StopAuction() { record.IsDelete = false _, err = models.Add(record) 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 { go ws_send_service.SendAuction(fmt.Sprintf("%d", auction.ActivityId), "", 0, map[string]interface{}{ diff --git a/go.mod b/go.mod index 4064d38..979dbd8 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.12 require ( github.com/360EntSecGroup-Skylar/excelize/v2 v2.0.1 github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 // indirect - github.com/aws/aws-sdk-go v1.32.8 // indirect + github.com/aws/aws-sdk-go v1.33.0 // indirect github.com/chanxuehong/wechat v0.0.0-20200409104612-0a1fd76d7a3a github.com/dgrijalva/jwt-go v3.2.0+incompatible github.com/elazarl/go-bindata-assetfs v1.0.0 // indirect @@ -39,7 +39,7 @@ require ( go.uber.org/atomic v1.6.0 go.uber.org/zap v1.15.0 golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a // indirect - golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 // indirect + golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae // indirect google.golang.org/appengine v1.6.5 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 gopkg.in/yaml.v2 v2.3.0 // indirect diff --git a/go.sum b/go.sum index 961d444..087491b 100644 --- a/go.sum +++ b/go.sum @@ -55,6 +55,8 @@ github.com/aws/aws-sdk-go v1.32.4 h1:J2OMvipVB5dPIn+VH7L5rOqM4WoTsBxOqv+I06sjYOM github.com/aws/aws-sdk-go v1.32.4/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.32.8 h1:ULxiQqR1eZ+k2/1gqv3GYAjkunlS7ncVU2eL801t08M= github.com/aws/aws-sdk-go v1.32.8/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= +github.com/aws/aws-sdk-go v1.33.0 h1:Bq5Y6VTLbfnJp1IV8EL/qUU5qO1DYHda/zis/sqevkY= +github.com/aws/aws-sdk-go v1.33.0/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/bndr/gotabulate v1.1.2 h1:yC9izuZEphojb9r+KYL4W9IJKO/ceIO8HDwxMA24U4c= github.com/bndr/gotabulate v1.1.2/go.mod h1:0+8yUgaPTtLRTjf49E8oju7ojpU11YmXyvq1LbPAb3U= @@ -485,6 +487,8 @@ golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 h1:ogLJMz+qpzav7lGMh10LMvAkM golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo2uNMv4rcHBMwzk/st8= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae h1:Ih9Yo4hSPImZOpfGuA4bR/ORKTAbhZo2AbWNRCnevdo= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=