Browse Source

fix:bug

token_replace
黄梓健 4 years ago
parent
commit
d17355a24c
  1. 14
      controllers/pc/lottery_draw.go
  2. 3
      main.go
  3. 315
      test/bindata.go
  4. 2
      test/config_test.go

14
controllers/pc/lottery_draw.go

@ -17,6 +17,20 @@ type LotteryDrawCtl struct {
controllers.AuthorCtl
}
// 屏蔽
func (t *LotteryDrawCtl) Block() {
activityId := t.MustGetInt("activity_id")
status := t.MustGet("status")
module, exist, err := activity_service.GetModuleService(define.MODULE_LOTTERY, activityId)
t.CheckErr(err)
t.Assert(exist, code.MSG_MODULE_NOT_EXIST, "模块不存在")
module.BesideRepeat = status
_, err = models.Update(module.Id, module, "beside_repeat")
t.CheckErr(err)
t.SUCCESS("操作成功")
}
//开始抽奖
func (t *LotteryDrawCtl) Start() {
ladderId := t.MustGetInt("lottery_draw_ladder_id")

3
main.go

@ -6,11 +6,12 @@ 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)) // 用户

315
test/bindata.go
File diff suppressed because it is too large
View File

2
test/config_test.go

@ -197,7 +197,7 @@ func TestDuration(t *testing.T) {
//}
func TestRefundRedPack(t *testing.T) {
res, err := pay_service.Refund("退款", "9dAV4ROBNLZgAHzrRmF55uCKsGvNGkeE")
res, err := pay_service.Refund("退款", "w4Zia4jIg3vuDy6plHkBATGcSmU4fJmr")
fmt.Printf("%+v, %v", res, err)
//res, err := pay_service.QueryRedPack("tDYW8edlzegSlVNaJMXsteZEeuVL")
//fmt.Printf("%+v, %+v", res, err)

Loading…
Cancel
Save