Browse Source

fix:bug

token_replace
黄梓健 5 years ago
parent
commit
d0409fe251
  1. 4
      go.mod
  2. 4
      go.sum
  3. 21
      services/lottery/order_special.go

4
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.19 // indirect
github.com/aws/aws-sdk-go v1.33.20 // 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
@ -41,7 +41,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-20200803210538-64077c9b5642 // indirect
golang.org/x/sys v0.0.0-20200805065543-0cf7623e9dbd // 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

4
go.sum

@ -69,6 +69,8 @@ github.com/aws/aws-sdk-go v1.33.18 h1:Ccy1SV2SsgJU3rfrD+SOhQ0jvuzfrFuja/oKI86ruP
github.com/aws/aws-sdk-go v1.33.18/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
github.com/aws/aws-sdk-go v1.33.19 h1:SMna0QLInNqm+nNL9tb7OVWTqSfNYSxrCa2adnyVth4=
github.com/aws/aws-sdk-go v1.33.19/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
github.com/aws/aws-sdk-go v1.33.20 h1:mtXKHmMQO6o0i2GTjyiVNZGlXqJDCUbiik0OQeMds/o=
github.com/aws/aws-sdk-go v1.33.20/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=
@ -513,6 +515,8 @@ golang.org/x/sys v0.0.0-20200720211630-cb9d2d5c5666 h1:gVCS+QOncANNPlmlO1AhlU3ox
golang.org/x/sys v0.0.0-20200720211630-cb9d2d5c5666/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642 h1:B6caxRw+hozq68X2MY7jEpZh/cr4/aHLv9xU8Kkadrw=
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200805065543-0cf7623e9dbd h1:wefLe/3g5tC0FcXw3NneLA5tHgbyouyZlfcSjNfOdgk=
golang.org/x/sys v0.0.0-20200805065543-0cf7623e9dbd/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=

21
services/lottery/order_special.go

@ -40,21 +40,24 @@ func GetSpecialOrderLottery(repeat string, activityId, ruleId, ladderId, rehears
if repeat == define.MODULE_BESIDE_REPEAT {
//查询已经中奖的用户,剔除已经中奖的用户
err = core.GetXormAuto().Table(&models.OrderDrawRecord{}).Select("customer_order_id").
Where("order_draw_rule_id=? and rehearsal_id=? and arch_id=? and is_delete=0",
ruleId, rehearsalId, archId).Find(&recordIds)
Where("activity_id=? and rehearsal_id=? and arch_id=? and is_delete=0",
activityId, rehearsalId, archId).Find(&recordIds)
} else {
// 不去除
err = core.GetXormAuto().Table(&models.OrderDrawRecord{}).Select("customer_order_id").
Where("order_draw_rule_ladder_id=? and rehearsal_id=? and arch_id=? and is_delete=0",
ladderId, rehearsalId, archId).Find(&recordIds)
//err = core.GetXormAuto().Table(&models.OrderDrawRecord{}).Select("customer_order_id").
// Where("order_draw_rule_ladder_id=? and rehearsal_id=? and arch_id=? and is_delete=0",
// ladderId, rehearsalId, archId).Find(&recordIds)
}
if err != nil {
return nil, err
}
err = core.GetXormAuto().NoAutoCondition().Where("activity_id=? and rehearsal_id=? and area_id=? "+
" and arch_id=? and is_delete=0", activityId, rehearsalId, areaId, archId).
NotIn("id", recordIds).Find(&orders)
s := core.GetXormAuto().NoAutoCondition().Where("activity_id=? and rehearsal_id=? and area_id=? "+
" and arch_id=? and is_delete=0", activityId, rehearsalId, areaId, archId)
defer s.Close()
if len(recordIds) > 0 {
s.NotIn("id", recordIds)
}
err = s.Find(&orders)
if err != nil {
return nil, err
}

Loading…
Cancel
Save