|
@@ -11,23 +11,16 @@ import (
|
11
|
11
|
"spaceofcheng/services/service/cases"
|
12
|
12
|
"spaceofcheng/services/utils"
|
13
|
13
|
"strconv"
|
14
|
|
- "sync"
|
15
|
14
|
"time"
|
16
|
15
|
|
17
|
16
|
"github.com/yl10/kit/guid"
|
18
|
17
|
)
|
19
|
18
|
|
20
|
|
-var mtx *sync.Mutex
|
21
|
|
-
|
22
|
19
|
// Orders 下单
|
23
|
20
|
func (s *GoodsServ) Orders(
|
24
|
21
|
info *model.TaGoodsOrders,
|
25
|
22
|
details []model.TaGoodsOrdersDetail,
|
26
|
23
|
customercouponid string) error {
|
27
|
|
- // 防止并发
|
28
|
|
- mtx.Lock()
|
29
|
|
- defer mtx.Unlock()
|
30
|
|
-
|
31
|
24
|
// org := s.ctx.Get("org").(model.SysOrg)
|
32
|
25
|
cust := s.ctx.Get("customer").(model.TaCustomer)
|
33
|
26
|
|
|
@@ -595,7 +588,3 @@ func (s *GoodsServ) GetNewGoods(ordersID string) (*goods.OrdersWithGoods, error)
|
595
|
588
|
|
596
|
589
|
return order, nil
|
597
|
590
|
}
|
598
|
|
-
|
599
|
|
-func init() {
|
600
|
|
- mtx = new(sync.Mutex)
|
601
|
|
-}
|