master
howell 4 years ago
parent 830d09132f
commit a654704c7f

@ -25,14 +25,12 @@ require (
github.com/jordan-wright/email v4.0.1-0.20200824153738-3f5bafa1cd84+incompatible
github.com/json-iterator/go v1.1.10
github.com/leemcloughlin/gofarmhash v0.0.0-20160919192320-0a055c5b87a8
github.com/marspere/goencrypt v1.0.4
github.com/micro/go-micro v1.18.0
github.com/mitchellh/mapstructure v1.3.3
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826
github.com/nanjishidu/gomini v1.4.1
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
github.com/pkg/errors v0.9.1
github.com/robfig/cron v1.2.0 // indirect
github.com/robfig/cron v1.2.0
github.com/shopspring/decimal v1.2.0
github.com/siddontang/go-log v0.0.0-20190221022429-1e957dd83bed
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e

@ -352,8 +352,6 @@ github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8=
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/marspere/goencrypt v1.0.4 h1:20OGFuroHsiF9PG92ZccHXfCqEXk7eLVYpo/RRMjMuM=
github.com/marspere/goencrypt v1.0.4/go.mod h1:S5g6Wsd5jcOO01sp9QxNMYCldx9kecoDkK7BWaHA0vo=
github.com/marten-seemann/chacha20 v0.2.0/go.mod h1:HSdjFau7GzYRj+ahFNwsO3ouVJr1HFkWoEwNDb4TMtE=
github.com/marten-seemann/qpack v0.1.0/go.mod h1:LFt1NU/Ptjip0C2CPkhimBz5CGE3WGDAUWqna+CNTrI=
github.com/marten-seemann/qtls v0.3.2/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwmjgmPuiQEcYk=

@ -3,7 +3,6 @@ package public
import (
"fmt"
"recook/configs"
"time"
)
const (
@ -32,8 +31,8 @@ func GenerateOrderWxH5PayOutTradeNo(userId uint, orderId uint) string {
func combineTradeNo(userId uint, flag string, orderId uint) string {
if configs.IsProductionEnv() {
return fmt.Sprintf("%dT%s%s%d", userId, time.Now().Format("060102150405"), flag, orderId)
return fmt.Sprintf("%dT%s%s%d", userId, "order", flag, orderId)
} else {
return fmt.Sprintf("F%dT%s%s%d", userId, time.Now().Format("060102150405"), flag, orderId)
return fmt.Sprintf("F%dT%s%s%d", userId, "order", flag, orderId)
}
}

@ -27,14 +27,15 @@ func ThirdManager() gin.HandlerFunc {
return func(c *gin.Context) {
if value, ok := c.Get("status"); ok {
if id, ok := c.Get("id"); ok {
fmt.Println(id)
value = value.(string)
switch value {
case SyncOrder:
go orderDeliver(id)
go addOrderNum(id)
go syncSecKillStock(id)
//go orderDeliver(id)
//go addOrderNum(id)
//go syncSecKillStock(id)
case AfterApply:
go afterMessage(id)
//go afterMessage(id)
}
}
}

Loading…
Cancel
Save