Merge pull request 'test' (#84) from test into master

Reviewed-on: https://git.oa00.com/recook/backend_v2/pulls/84
master
杨赟 3 years ago
commit 5cd25d65e9

@ -88,8 +88,8 @@ func (s *supplyTask) data() {
time.Sleep(time.Second * 3) time.Sleep(time.Second * 3)
s.data() s.data()
}() }()
pool, _ := ants.NewPool(5) pool, _ := ants.NewPool(30)
if err := (skuMessage{}.Consume(supply.Api.Mq.SkuChangeQueue(), false, 5, func(message skuMessage, delivery amqp.Delivery) { if err := (skuMessage{}.Consume(supply.Api.Mq.SkuChangeQueue(), false, 30, func(message skuMessage, delivery amqp.Delivery) {
pool.Submit(func() { pool.Submit(func() {
defer delivery.Ack(false) defer delivery.Ack(false)
if err := third.SupplyLogic.SyncData([]uint{message.SkuId}); err != nil { if err := third.SupplyLogic.SyncData([]uint{message.SkuId}); err != nil {

@ -147,7 +147,7 @@ func (o Proxy) VipIsUsed(c *gin.Context) {
// InviteCheck @Title 邀请码验证 // InviteCheck @Title 邀请码验证
func (o *Proxy) InviteCheck(c *gin.Context) { func (o *Proxy) InviteCheck(c *gin.Context) {
args := argsGoodsInvite{} args := argsGoodsInvite{}
err := tools.Params(&args, c) err := tools.ParseParams(&args, c)
if err != nil { if err != nil {
back.Fail(c, err.Error()) back.Fail(c, err.Error())
return return
@ -184,7 +184,7 @@ type argsGoodsInvite struct {
// Invite @Title 邀请码 // Invite @Title 邀请码
func (o *Proxy) Invite(c *gin.Context) { func (o *Proxy) Invite(c *gin.Context) {
args := argsGoodsInvite{} args := argsGoodsInvite{}
err := tools.Params(&args, c) err := tools.ParseParams(&args, c)
if err != nil { if err != nil {
back.Fail(c, err.Error()) back.Fail(c, err.Error())
return return

Loading…
Cancel
Save