From d35d309a72d47962e6ad7ae626acf7c370b26538 Mon Sep 17 00:00:00 2001 From: tommy <3405129587@qq.com> Date: Fri, 17 Jul 2020 08:49:24 +0800 Subject: [PATCH 1/4] fix:bug --- services/red_envelope/red_envelop.go | 43 ++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/services/red_envelope/red_envelop.go b/services/red_envelope/red_envelop.go index 659ce31..e55283a 100644 --- a/services/red_envelope/red_envelop.go +++ b/services/red_envelope/red_envelop.go @@ -50,14 +50,19 @@ const ( ) func GenRedPack(amount, num int) []int { - r := rand.New(rand.NewSource(time.Now().Unix())) sumMoney := 0 redPacks := make([]int, 0) + maxMoney := MaxRedPackAmount + r := rand.New(rand.NewSource(time.Now().UnixNano())) for i := 0; i < num; i++ { - money := r.Int() * 2 * (amount - sumMoney) / (num - i) - if money <= MinRedPackAmount { + maxMoney = (amount - sumMoney) / (num - i) + if maxMoney > MaxRedPackAmount { + maxMoney = MaxRedPackAmount + } + money := r.Int() + if money < MinRedPackAmount { money = MinRedPackAmount - } else if money >= MaxRedPackAmount { + } else if money > MaxRedPackAmount { money = MaxRedPackAmount } @@ -87,16 +92,24 @@ func GenRedEnvelope(aid int64, name string, rid int64, rule *models.ShakeRedEnve // 检测红包是否存在 randSum := int(rule.RandSum * 100) sumMoney := 0 - if randSum/rule.RedEnvelopeNum > MinRedPackAmount && randSum/rule.RedEnvelopeNum < MaxRedPackAmount { + maxMoney := MaxRedPackAmount + if randSum/rule.RedEnvelopeNum <= MinRedPackAmount && randSum/rule.RedEnvelopeNum >= MaxRedPackAmount { return errors.New("每个红包的平均金额必须在1.00元到200.00元之间") } for i := 0; i < rule.RedEnvelopeNum; i++ { - money := r.Int() * 2 * (randSum - sumMoney) / (rule.RedEnvelopeNum - i) - if money <= MinRedPackAmount { // 随机的金额可能小于1块钱 + // 前置判断每次循环是否存在最小值 + //最大可领金额 = 剩余金额的平均值x2 = (剩余金额 / 剩余数量) * 2 + maxMoney = (randSum - sumMoney) / (rule.RedEnvelopeNum - i) + if maxMoney > MaxRedPackAmount { + maxMoney = MaxRedPackAmount + } + money := r.Intn(maxMoney) + if money < MinRedPackAmount { // 随机的金额可能小于1块钱 money = MinRedPackAmount - } else if money >= MaxRedPackAmount { + } else if money > MaxRedPackAmount { money = MaxRedPackAmount } + // 提前预判剩余红包和红包的金额比例 ==> money/num <= 0.01 rate := (randSum - sumMoney - money) / (rule.RedEnvelopeNum - i) if rate <= MinRedPackAmount { @@ -116,11 +129,8 @@ func GenRedEnvelope(aid int64, name string, rid int64, rule *models.ShakeRedEnve record.ShakeRedEnvelopeRuleId = rule.Id record.Amount = utils.Float64CusDecimal(float64(money)/float64(100), 2) record.IsDraw = -1 - record.IsDelete = false - record.CreatedAt = time.Now() - record.UpdatedAt = time.Now() - if _, err := core.GetXormAuto().InsertOne(record); err != nil { + if _, err := models.Add(record); err != nil { return err } sumMoney += money @@ -135,10 +145,7 @@ func GenRedEnvelope(aid int64, name string, rid int64, rule *models.ShakeRedEnve record.ShakeRedEnvelopeRuleId = rule.Id record.Amount = rule.Single record.IsDraw = -1 - record.IsDelete = false - record.CreatedAt = time.Now() - record.UpdatedAt = time.Now() - if _, err := core.GetXormAuto().InsertOne(record); err != nil { + if _, err := models.Add(record); err != nil { return err } } @@ -159,9 +166,7 @@ func GenRedEnvelope(aid int64, name string, rid int64, rule *models.ShakeRedEnve record.ShakeRedEnvelopeRuleId = rule.Id record.Amount = ladder.Single record.IsDraw = -1 - record.CreatedAt = time.Now() - record.UpdatedAt = time.Now() - if _, err := core.GetXormAuto().InsertOne(record); err != nil { + if _, err := models.Add(record); err != nil { return err } } From 50ca3725c8b3714255fcc0a360a5b7ff445a3216 Mon Sep 17 00:00:00 2001 From: tommy <3405129587@qq.com> Date: Fri, 17 Jul 2020 09:03:45 +0800 Subject: [PATCH 2/4] fix:bug --- controllers/client/shake_red_envelope.go | 9 +++-- controllers/pc/activity.go | 9 ----- go.mod | 2 +- go.sum | 2 + models/activity.go | 1 - models/arch.go | 27 ------------- utils/define/config.go | 69 -------------------------------- 7 files changed, 8 insertions(+), 111 deletions(-) delete mode 100644 models/arch.go delete mode 100644 utils/define/config.go diff --git a/controllers/client/shake_red_envelope.go b/controllers/client/shake_red_envelope.go index d9ef628..4e18c5c 100644 --- a/controllers/client/shake_red_envelope.go +++ b/controllers/client/shake_red_envelope.go @@ -92,11 +92,12 @@ func (t *ShakeRedEnvelopeCtl) Shake() { // 记录红包 ---> 非彩排才能 if activity.RehearsalId == 0 { - result, err := pay_service.SendRedPack("欧轩互动", user.Openid, "红包只会越抢越多", + result, _ := pay_service.SendRedPack("欧轩互动", user.Openid, "红包只会越抢越多", "直播抢红包活动", "抢的多,赚得多", int(record.Amount*100), 1, 2) - if err != nil { - t.ERROR("红包被领完了", code.MSG_SHAKERB_RECORD_NOT_HIT) - } + //t.CheckErr(err) + //if err != nil { + // t.ERROR("红包被领完了", code.MSG_SHAKERB_RECORD_NOT_HIT) + //} record.MchBillno = result.MchBillno models.Update(record.Id, record, "mch_billno") } diff --git a/controllers/pc/activity.go b/controllers/pc/activity.go index 534b794..95da943 100644 --- a/controllers/pc/activity.go +++ b/controllers/pc/activity.go @@ -6,7 +6,6 @@ import ( "hudongzhuanjia/models" "hudongzhuanjia/utils/code" "hudongzhuanjia/utils/define" - "time" ) //活动 @@ -47,14 +46,6 @@ func (t *ActivityCtl) StartActivity() { _, err = models.Add(&rehearsal) t.CheckErr(err) activity.RehearsalId = rehearsal.Id - } else { //非彩排 - arch := &models.Arch{} - count, err := arch.Count(activity.Id) - t.CheckErr(err) - arch.Date = time.Now().Format("2006-01-02") - arch.Name = fmt.Sprintf("第%d场", count) - _, err = models.Update(activity.ArchId, arch, "name", "date") - t.CheckErr(err) } activity.Status = define.StatusRunning diff --git a/go.mod b/go.mod index d3f3784..7c5cdbc 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.33.1 // indirect + github.com/aws/aws-sdk-go v1.33.6 // 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 diff --git a/go.sum b/go.sum index 1d08200..7acef39 100644 --- a/go.sum +++ b/go.sum @@ -59,6 +59,8 @@ 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/aws/aws-sdk-go v1.33.1 h1:yz9XmNzPshz/lhfAZvLfMnIS9HPo8+boGRcWqDVX+T0= github.com/aws/aws-sdk-go v1.33.1/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= +github.com/aws/aws-sdk-go v1.33.6 h1:YLoUeMSx05kHwhS+HLDSpdYYpPzJMyp6hn1cWsJ6a+U= +github.com/aws/aws-sdk-go v1.33.6/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= diff --git a/models/activity.go b/models/activity.go index 0baccc8..c71c829 100644 --- a/models/activity.go +++ b/models/activity.go @@ -10,7 +10,6 @@ const ActivityTableName = TableNamePrefix + "activity" type Activity struct { Id int64 `json:"id" xorm:"pk autoincr INT(11)"` CustomerId int64 `json:"customer_id" xorm:"not null default(0) comment('customer_id, 创建客户id') INT(11)"` - ArchId int64 `json:"arch_id" xorm:"not null default 0 comment('归档id') INT(11)"` Services []*ActivityModuleService `json:"services,omitempty" xorm:"-" description:"主活动下的服务"` AreaStores []*AreaStore `json:"area_stores,omitempty" xorm:"-" description:"地区"` BarrageStatus string `json:"barrage_status,omitempty" xorm:"-" description:"弹幕服务状态"` diff --git a/models/arch.go b/models/arch.go deleted file mode 100644 index bddd6c4..0000000 --- a/models/arch.go +++ /dev/null @@ -1,27 +0,0 @@ -package models - -import ( - "github.com/ouxuanserver/osmanthuswine/src/core" - "time" -) - -const ArchTableName = TableNamePrefix + "arch" - -type Arch struct { - Id int `json:"id"` - CustomerId int `json:"customer_id"` - ActivityId int `json:"activity_id"` - Date string `json:"date"` - Name string `json:"name"` - IsDelete int `json:"is_delete"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` -} - -func (t *Arch) TableName() string { - return ArchTableName -} - -func (t *Arch) Count(activityId interface{}) (int64, error) { - return core.GetXormAuto().Where("is_delete=0 and activity_id=?", activityId).Get(t) -} diff --git a/utils/define/config.go b/utils/define/config.go deleted file mode 100644 index e3a4d59..0000000 --- a/utils/define/config.go +++ /dev/null @@ -1,69 +0,0 @@ -package define - -var IsDebugging = true - -func SetDebug(modes ...bool) { - if len(modes) > 0 { - IsDebugging = modes[0] - } else { - IsDebugging = false - } - if IsDebugging { - //RoomPrefix = "test_" - HOST = "https://hdzj.utools.club" - H5Host = "http://ouxuanhudongtest.t.3pr.com.cn/web" - SendUrl = "https://hdzjws.utools.club/PcClient/Ws/MessageCtl/Receive" - } -} - -var ( - SendUrl = "https://api.ouxuanhudong.com:20182/PcClient/Connect/MessageCtl/Receive" - RoomPrefix = "" - HOST = "https://api.ouxuanhudong.com" - H5Host = "https://h5.ouxuanhudong.com/web" -) - -const ( - H5Index = "index.html" - H5SignIn = "SignIn.html" - H5ShakeRb = "shakeRb.html" - H5TugOfWar = "tugOfWar.html" - H5UpperWall = "UpperWall.html" - H5Barrage = "barrage.html" - H5Order = "order.html" - H5Reward = "reward.html" - H5BScreen = "bScreen.html" - H5Auction = "auction.html" - H5Vote = "vote.html" - H5Calorie = "calorie.html" -) - -// 固定长度 -var DefaultOrderNo = 10000000000 - -// 微信常量 -const ( - // 欧轩互动 -> 普通商户 - ApiKey = `2c82c64ceec6ba89ffc9f593c671a12f` - WxAppId = `wx7b0bcf476552c5e9` - Secret = `f6aabdd40ea25272f4442603a7dc8028` - AppId = `wx7b0bcf476552c5e9` - MchId = `1394404502` - SubMchId = `` - - // 欧轩 -> 服务商 - //ApiKey = `6e281c8b5430c674034594cab789334F` - //AppId = `wx662a1633304bfd42` - //WxAppId = `wx662a1633304bfd42` - //Secret = `7e4ecfe06ad1e075c210059d5b0162a3` - //MchId = `1441266702` - //SubMchId = `1394404502` - //SubMchId = `1594049151` - // 认证服务号:欧轩(用于申请微信服务商) - // AppID:wx662a1633304bfd42 - // 密钥:7e4ecfe06ad1e075c210059d5b0162a3 - - WxHost = `https://api.mch.weixin.qq.com` - WxBack = `https://api2.mch.weixin.qq.com` - ClientIp = `123.207.246.51` -) From b3e0807339a8a4e00419c74464e9066a45b011a3 Mon Sep 17 00:00:00 2001 From: tommy <3405129587@qq.com> Date: Mon, 20 Jul 2020 17:37:28 +0800 Subject: [PATCH 3/4] fix:bug --- controllers/client/tug_war.go | 3 +-- models/bahe_team_member.go | 7 ++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/controllers/client/tug_war.go b/controllers/client/tug_war.go index 77a7cbb..4c1ba07 100644 --- a/controllers/client/tug_war.go +++ b/controllers/client/tug_war.go @@ -90,8 +90,7 @@ func (t *TugOfWarCtl) Shake() { } // 根据team_id 获取所有成员的分数 - members := make([]*models.BaheTeamMember, 0) - err = models.GetBaheMembersByTeamId(members, member.TeamId, member.RehearsalId) + members, err := models.GetBaheMembersByTeamId(member.TeamId, member.RehearsalId) t.CheckErr(err) var rank int diff --git a/models/bahe_team_member.go b/models/bahe_team_member.go index 3f6931e..d9794ff 100644 --- a/models/bahe_team_member.go +++ b/models/bahe_team_member.go @@ -42,7 +42,8 @@ func (t *BaheTeamMember) IncrScoreById(id, score int64) (int64, error) { return core.GetXormAuto().ID(id).Incr("score", score).Cols("score, sort_time").Update(t) } -func GetBaheMembersByTeamId(obj, teamId, rehearsalId interface{}) error { - return core.GetXormAuto().Where("is_delete=0 and team_id=? and rehearsal_id=?", - teamId, rehearsalId).Desc("score").Asc("sort_time").Find(&obj) +func GetBaheMembersByTeamId(teamId, rehearsalId interface{}) (members []*BaheTeamMember, err error) { + err = core.GetXormAuto().Where("is_delete=0 and team_id=? and rehearsal_id=?", + teamId, rehearsalId).Desc("score").Asc("sort_time").Find(&members) + return } From 59d45ae6bf81b4c1931e539ebc1c351f43467c37 Mon Sep 17 00:00:00 2001 From: Tooooommy Date: Tue, 20 Oct 2020 10:28:47 +0800 Subject: [PATCH 4/4] fix:bug --- go.mod | 22 +++++++++++++--------- go.sum | 28 ++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 7c5cdbc..6294e12 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.33.6 // indirect + github.com/aws/aws-sdk-go v1.35.10 // 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 @@ -13,35 +13,39 @@ require ( github.com/go-bindata/go-bindata v3.1.2+incompatible // indirect github.com/go-chi/chi v4.1.2+incompatible github.com/go-errors/errors v1.1.1 // indirect - github.com/go-redis/redis v6.15.8+incompatible // indirect + github.com/go-redis/redis v6.15.9+incompatible // indirect github.com/go-stack/stack v1.8.0 - github.com/golang/snappy v0.0.1 // indirect + github.com/golang/snappy v0.0.2 // indirect github.com/gorilla/websocket v1.4.2 github.com/iGoogle-ink/gopay/v2 v2.0.5 github.com/importcjj/sensitive v0.0.0-20200106142752-42d1c505be7b - github.com/jinzhu/gorm v1.9.14 // indirect + github.com/jinzhu/gorm v1.9.16 // indirect github.com/kirinlabs/HttpRequest v1.0.5 github.com/mattn/go-sqlite3 v2.0.1+incompatible // indirect github.com/ouxuanserver/osmanthuswine v0.0.0-20190916032555-480efadf4941 github.com/panjf2000/ants v4.0.2+incompatible github.com/pkg/errors v0.9.1 + github.com/rs/zerolog v1.20.0 github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24 github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e github.com/smartystreets/goconvey v1.6.4 + github.com/stretchr/testify v1.5.1 // indirect github.com/swaggo/http-swagger v0.0.0-20190614090009-c2865af9083e // indirect github.com/swaggo/swag v1.6.3 // indirect github.com/tealeg/xlsx v1.0.5 // indirect - github.com/tencentyun/cos-go-sdk-v5 v0.7.7 + github.com/tencentyun/cos-go-sdk-v5 v0.7.10 github.com/tencentyun/tls-sig-api-v2-golang v1.0.0 github.com/xormplus/builder v0.0.0-20200331055651-240ff40009be // indirect github.com/xormplus/core v0.0.0-20200308074340-f3bce19d5f31 // indirect - github.com/xormplus/xorm v0.0.0-20200529061552-7d0d26c6f81c - go.uber.org/atomic v1.6.0 - go.uber.org/zap v1.15.0 + github.com/xormplus/xorm v0.0.0-20200912034818-5d90dcd4e3d6 + go.uber.org/atomic v1.7.0 + go.uber.org/multierr v1.6.0 // indirect + go.uber.org/zap v1.16.0 golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a // indirect - golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae // indirect + golang.org/x/sys v0.0.0-20201018230417-eeed37f84f13 // indirect google.golang.org/appengine v1.6.5 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 + gopkg.in/olahol/melody.v1 v1.0.0-20170518105555-d52139073376 gopkg.in/yaml.v2 v2.3.0 // indirect xorm.io/core v0.7.3 // indirect xorm.io/xorm v1.0.1 // indirect diff --git a/go.sum b/go.sum index 7acef39..171aa31 100644 --- a/go.sum +++ b/go.sum @@ -61,6 +61,8 @@ github.com/aws/aws-sdk-go v1.33.1 h1:yz9XmNzPshz/lhfAZvLfMnIS9HPo8+boGRcWqDVX+T0 github.com/aws/aws-sdk-go v1.33.1/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.33.6 h1:YLoUeMSx05kHwhS+HLDSpdYYpPzJMyp6hn1cWsJ6a+U= github.com/aws/aws-sdk-go v1.33.6/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= +github.com/aws/aws-sdk-go v1.35.10 h1:FsJtrOS7P+Qmq1rPTGgS/+qC1Y9eGuAJHvAZpZlhmb4= +github.com/aws/aws-sdk-go v1.35.10/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k= 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= @@ -79,6 +81,7 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -143,6 +146,8 @@ github.com/go-redis/redis v6.15.7+incompatible h1:3skhDh95XQMpnqeqNftPkQD9jL9e5e github.com/go-redis/redis v6.15.7+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-redis/redis v6.15.8+incompatible h1:BKZuG6mCnRj5AOaWJXoCgf6rqTYnYJLe4en2hxT7r9o= github.com/go-redis/redis v6.15.8+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= +github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg= +github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= @@ -168,6 +173,8 @@ github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pO github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.2 h1:aeE13tS0IiQgFjYdoL8qN3K1N2bXXtI6Vi51/y7BpMw= +github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -217,6 +224,8 @@ github.com/jinzhu/gorm v1.9.13 h1:fcdacwmUcoyon8XHkQrdPJZ7pnHAYclHZ6iLYER5nX4= github.com/jinzhu/gorm v1.9.13/go.mod h1:C0zfmO9z9J61PGrs46nfRkfsq0/8ErGTKBxyudR2KvI= github.com/jinzhu/gorm v1.9.14 h1:Kg3ShyTPcM6nzVo148fRrcMO6MNKuqtOUwnzqMgVniM= github.com/jinzhu/gorm v1.9.14/go.mod h1:G3LB3wezTOWM2ITLzPxEXgSkOXAntiLHS7UdBefADcs= +github.com/jinzhu/gorm v1.9.16 h1:+IyIjPEABKRpsu/F8OvDPy9fyQlgsg2luMV2ZIH5i5o= +github.com/jinzhu/gorm v1.9.16/go.mod h1:G3LB3wezTOWM2ITLzPxEXgSkOXAntiLHS7UdBefADcs= github.com/jinzhu/inflection v0.0.0-20180308033659-04140366298a h1:eeaG9XMUvRBYXJi4pg1ZKM7nxc5AfXfojeLLW7O5J3k= github.com/jinzhu/inflection v0.0.0-20180308033659-04140366298a/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= @@ -229,6 +238,9 @@ github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5i github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.3.0 h1:OS12ieG61fsCg5+qLJ+SsW9NicxNkg3b25OyT2yCeUc= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= @@ -306,6 +318,9 @@ github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= +github.com/rs/zerolog v1.20.0 h1:38k9hgtUBdxFwE34yS8rTHmHBa4eN16E4DJlv177LNs= +github.com/rs/zerolog v1.20.0/go.mod h1:IzD0RJ65iWH0w97OQQebJEvTZYvsCUm9WVLWBQrJRjo= github.com/satori/go.uuid v0.0.0-20190313024323-b2ce2384e17b h1:PB8A682UQ6pwoFhkszETBsYw3B9Ze9FEA4cf9H9O3f8= github.com/satori/go.uuid v0.0.0-20190313024323-b2ce2384e17b/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24 h1:pntxY8Ary0t43dCZ5dqY4YTJCObLY1kIXl0uzMv+7DE= @@ -349,6 +364,8 @@ github.com/tencentyun/cos-go-sdk-v5 v0.7.4 h1:Hsand7ideMevJKmogyFRTOGy0DxM+oSXHw github.com/tencentyun/cos-go-sdk-v5 v0.7.4/go.mod h1:wQBO5HdAkLjj2q6XQiIfDSP8DXDNrppDRw2Kp/1BODA= github.com/tencentyun/cos-go-sdk-v5 v0.7.7 h1:7YI5nNwLEhseUoWzzz1CDAwQMeJyJfD3Tj0XnQRzqO8= github.com/tencentyun/cos-go-sdk-v5 v0.7.7/go.mod h1:wQBO5HdAkLjj2q6XQiIfDSP8DXDNrppDRw2Kp/1BODA= +github.com/tencentyun/cos-go-sdk-v5 v0.7.10 h1:hJPLdR4RPsnubB3M9qXNBeUbcOJMVANnO/L6Att/PZU= +github.com/tencentyun/cos-go-sdk-v5 v0.7.10/go.mod h1:wQBO5HdAkLjj2q6XQiIfDSP8DXDNrppDRw2Kp/1BODA= github.com/tencentyun/tls-sig-api-v2-golang v1.0.0 h1:NavMw9XO2iCLv8hTKaJW2kTaGR2SdNljMABbe39yu6Q= github.com/tencentyun/tls-sig-api-v2-golang v1.0.0/go.mod h1:u7WiArmCTXTaQAHJwAOaLgpJ5e2xdY5/cgMEy3ubL60= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= @@ -376,6 +393,8 @@ github.com/xormplus/xorm v0.0.0-20200410045938-f6b4c1cd3b8b h1:LkpWvTXxj8r18jZAh github.com/xormplus/xorm v0.0.0-20200410045938-f6b4c1cd3b8b/go.mod h1:+v6b10b4x5IcQmp1/Cbo9IqaknxVeuhQng+fhya6bdI= github.com/xormplus/xorm v0.0.0-20200529061552-7d0d26c6f81c h1:NaRjnzmJVo7x3L+W6mgwNBbxTdAK1BbCYto3tKKT1GU= github.com/xormplus/xorm v0.0.0-20200529061552-7d0d26c6f81c/go.mod h1:+v6b10b4x5IcQmp1/Cbo9IqaknxVeuhQng+fhya6bdI= +github.com/xormplus/xorm v0.0.0-20200912034818-5d90dcd4e3d6 h1:8wMAe6KZ0YOG1RvjxyK5VhB29grvQbhb6MZTDIdpSd4= +github.com/xormplus/xorm v0.0.0-20200912034818-5d90dcd4e3d6/go.mod h1:+v6b10b4x5IcQmp1/Cbo9IqaknxVeuhQng+fhya6bdI= github.com/ziutek/mymysql v1.5.4 h1:GB0qdRGsTwQSBVYuVShFBKaXSnSnYYC2d9knnE1LHFs= github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= @@ -387,10 +406,14 @@ go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/multierr v1.2.0 h1:6I+W7f5VwC5SV9dNrZ3qXrDB9mD0dyGOi/ZJmYw03T4= go.uber.org/multierr v1.2.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= @@ -399,6 +422,8 @@ go.uber.org/zap v1.14.1 h1:nYDKopTbvAPq/NrUVZwT15y2lpROBiLLyoRTbXOYWOo= go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go.uber.org/zap v1.15.0 h1:ZZCA22JRF2gQE5FoNmhmrf7jeJJ2uhqDUNRYKm8dvmM= go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= +go.uber.org/zap v1.16.0 h1:uFRZXykJGK9lLY4HtgSw44DnIcAM+kRBP7x5m+NpAOM= +go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= golang.org/x/build v0.0.0-20190314133821-5284462c4bec/go.mod h1:atTaCNAy0f16Ah5aV1gMSwgiKVHwu/JncqDpuRr7lS4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -493,6 +518,8 @@ golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo 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/sys v0.0.0-20201018230417-eeed37f84f13 h1:5jaG59Zhd+8ZXe8C+lgiAGqkOaZBruqrWclLkgAww34= +golang.org/x/sys v0.0.0-20201018230417-eeed37f84f13/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= @@ -511,6 +538,7 @@ golang.org/x/tools v0.0.0-20190606050223-4d9ae51c2468/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190611222205-d73e1c7e250b h1:/mJ+GKieZA6hFDQGdWZrjj4AXPl5ylY+5HusG80roy0= golang.org/x/tools v0.0.0-20190611222205-d73e1c7e250b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190828213141-aed303cbaa74/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191025023517-2077df36852e h1:ejUPpxsbZzyShOEURCSvFIT0ltnmBW92Vsc3i8QRcw8= golang.org/x/tools v0.0.0-20191025023517-2077df36852e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=