yansen il y a 6 ans
Parent
révision
214bcdbff0
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 5
    1
      service/goods/orders.go

+ 5
- 1
service/goods/orders.go Voir le fichier

@@ -17,7 +17,7 @@ import (
17 17
 	"github.com/yl10/kit/guid"
18 18
 )
19 19
 
20
-var mtx sync.Mutex
20
+var mtx *sync.Mutex
21 21
 
22 22
 // Orders 下单
23 23
 func (s *GoodsServ) Orders(
@@ -595,3 +595,7 @@ func (s *GoodsServ) GetNewGoods(ordersID string) (*goods.OrdersWithGoods, error)
595 595
 
596 596
 	return order, nil
597 597
 }
598
+
599
+func init() {
600
+	mtx = new(sync.Mutex)
601
+}