作者 唐旭辉

提交

... ... @@ -4,7 +4,6 @@ import (
"context"
"os"
"os/signal"
"sync"
"syscall"
"github.com/astaxie/beego"
... ... @@ -28,11 +27,9 @@ func main() {
if err := consumerRun.InitConsumer(); err != nil {
logs.Error("启动kafka消息消费者失败:%s", err)
}
wg := &sync.WaitGroup{}
wg.Add(1)
go func() {
consumerRun.Start(ctx)
wg.Done()
}()
go func() {
<-consumerRun.IsReady()
... ... @@ -47,7 +44,6 @@ func main() {
select {
case <-sigs:
cancel()
wg.Wait()
return
default:
}
... ...
... ... @@ -923,10 +923,10 @@ func (service OrderInfoService) buildOrderBestshopInfoData(orderBase *domain.Ord
"paymentStatus": orderBase.Goods[i].BonusStatus,
"partnerRatio": orderBase.Goods[i].PartnerBonusPercent,
}
// if orderBase.Goods[i].PartnerBonusPercent >= 0 {
// hasPartnerBonusPercent = true
// detail["partnerRatio"] = fmt.Sprint(orderBase.Goods[i].PartnerBonusPercent)
// }
if orderBase.Goods[i].PartnerBonusPercent >= 0 {
hasPartnerBonusPercent = true
// detail["partnerRatio"] = fmt.Sprint(orderBase.Goods[i].PartnerBonusPercent)
}
goodBestshopId := orderBase.Goods[i].DataFrom.DataId
if v, ok := orderGoodBestshopMap[goodBestshopId]; ok {
detail["productCodes"] = v.Sn
... ...