作者 唐旭辉

提交

@@ -4,7 +4,6 @@ import ( @@ -4,7 +4,6 @@ import (
4 "context" 4 "context"
5 "os" 5 "os"
6 "os/signal" 6 "os/signal"
7 - "sync"  
8 "syscall" 7 "syscall"
9 8
10 "github.com/astaxie/beego" 9 "github.com/astaxie/beego"
@@ -28,11 +27,9 @@ func main() { @@ -28,11 +27,9 @@ func main() {
28 if err := consumerRun.InitConsumer(); err != nil { 27 if err := consumerRun.InitConsumer(); err != nil {
29 logs.Error("启动kafka消息消费者失败:%s", err) 28 logs.Error("启动kafka消息消费者失败:%s", err)
30 } 29 }
31 - wg := &sync.WaitGroup{}  
32 - wg.Add(1) 30 +
33 go func() { 31 go func() {
34 consumerRun.Start(ctx) 32 consumerRun.Start(ctx)
35 - wg.Done()  
36 }() 33 }()
37 go func() { 34 go func() {
38 <-consumerRun.IsReady() 35 <-consumerRun.IsReady()
@@ -47,7 +44,6 @@ func main() { @@ -47,7 +44,6 @@ func main() {
47 select { 44 select {
48 case <-sigs: 45 case <-sigs:
49 cancel() 46 cancel()
50 - wg.Wait()  
51 return 47 return
52 default: 48 default:
53 } 49 }
@@ -923,10 +923,10 @@ func (service OrderInfoService) buildOrderBestshopInfoData(orderBase *domain.Ord @@ -923,10 +923,10 @@ func (service OrderInfoService) buildOrderBestshopInfoData(orderBase *domain.Ord
923 "paymentStatus": orderBase.Goods[i].BonusStatus, 923 "paymentStatus": orderBase.Goods[i].BonusStatus,
924 "partnerRatio": orderBase.Goods[i].PartnerBonusPercent, 924 "partnerRatio": orderBase.Goods[i].PartnerBonusPercent,
925 } 925 }
926 - // if orderBase.Goods[i].PartnerBonusPercent >= 0 {  
927 - // hasPartnerBonusPercent = true  
928 - // detail["partnerRatio"] = fmt.Sprint(orderBase.Goods[i].PartnerBonusPercent)  
929 - // } 926 + if orderBase.Goods[i].PartnerBonusPercent >= 0 {
  927 + hasPartnerBonusPercent = true
  928 + // detail["partnerRatio"] = fmt.Sprint(orderBase.Goods[i].PartnerBonusPercent)
  929 + }
930 goodBestshopId := orderBase.Goods[i].DataFrom.DataId 930 goodBestshopId := orderBase.Goods[i].DataFrom.DataId
931 if v, ok := orderGoodBestshopMap[goodBestshopId]; ok { 931 if v, ok := orderGoodBestshopMap[goodBestshopId]; ok {
932 detail["productCodes"] = v.Sn 932 detail["productCodes"] = v.Sn