Browse Source

fix:bug

token_replace
黄梓健 4 years ago
parent
commit
c9d1f656df
  1. 2
      controllers/pc/lottery_draw.go
  2. 4
      go.mod
  3. 4
      go.sum
  4. 3
      main.go
  5. 8
      services/lottery/lottery.go
  6. 6
      services/lottery/order.go

2
controllers/pc/lottery_draw.go

@ -17,7 +17,7 @@ type LotteryDrawCtl struct {
controllers.AuthorCtl
}
// 屏蔽
// [屏蔽]
func (t *LotteryDrawCtl) Block() {
activityId := t.MustGetInt("activity_id")
status := t.MustGet("status")

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.34.3 // indirect
github.com/aws/aws-sdk-go v1.34.4 // 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
@ -19,7 +19,7 @@ require (
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.15 // 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

4
go.sum

@ -73,6 +73,8 @@ github.com/aws/aws-sdk-go v1.33.20 h1:mtXKHmMQO6o0i2GTjyiVNZGlXqJDCUbiik0OQeMds/
github.com/aws/aws-sdk-go v1.33.20/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
github.com/aws/aws-sdk-go v1.34.3 h1:pkbLkV9Q/KY86rbV/WG+yzjNektJbjNRdsTNGtNDZcY=
github.com/aws/aws-sdk-go v1.34.3/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
github.com/aws/aws-sdk-go v1.34.4 h1:Yx49/+ZMCD9YqIVsO3CsiMs4hnUnokd9otKvWYFjnYw=
github.com/aws/aws-sdk-go v1.34.4/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=
@ -234,6 +236,8 @@ 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.15 h1:OdR1qFvtXktlxk73XFYMiYn9ywzTwytqe4QkuMRqc38=
github.com/jinzhu/gorm v1.9.15/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=

3
main.go

@ -6,12 +6,11 @@ import (
"hudongzhuanjia/controllers/client"
"hudongzhuanjia/controllers/common"
"hudongzhuanjia/controllers/pc"
"hudongzhuanjia/utils/define"
//_ "net/http/pprof"
)
func main() {
define.SetDebug(true)
//define.SetDebug(true)
// pc
core.GetInstanceRouterManage().Registered(new(pc.WsCtl)) // 用户

8
services/lottery/lottery.go

@ -48,10 +48,10 @@ func GetLotteryUserIds(repeat string, activityId, ruleId, ladderId, rehearsalId,
Where("lottery_draw_rule_id=? and rehearsal_id=? and area_id=? and arch_id=? and is_delete=0",
ruleId, rehearsalId, areaId, archId).Find(&recordIds)
} else {
// 去除同规则中将用户
err = core.GetXormAuto().Table(new(models.LotteryDrawRecord)).Select("user_id").
Where("lottery_draw_rule_ladder_id=? and rehearsal_id=? and area_id=? and arch_id=? and is_delete=0",
ladderId, rehearsalId, areaId, archId).Find(&recordIds)
//// 去除同规则中将用户
//err = core.GetXormAuto().Table(new(models.LotteryDrawRecord)).Select("user_id").
// Where("lottery_draw_rule_ladder_id=? and rehearsal_id=? and area_id=? and arch_id=? and is_delete=0",
// ladderId, rehearsalId, areaId, archId).Find(&recordIds)
}
if err != nil {
return nil, err

6
services/lottery/order.go

@ -17,9 +17,9 @@ func GetOrderLotteryUserIds(repeat string, activityId, ruleId, ladderId, rehears
Where("order_draw_rule_id=? and rehearsal_id=? and arch_id=? and is_delete=0",
ruleId, rehearsalId, archId).Find(&recordIds)
} else {
err = core.GetXormAuto().Table(&models.OrderDrawRecord{}).Select("user_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("user_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

Loading…
Cancel
Save