|
@@ -17,6 +17,12 @@ func (service OrderInfoService) GetOrderInfoWithBonus(orderBaseId int64, company |
|
@@ -17,6 +17,12 @@ func (service OrderInfoService) GetOrderInfoWithBonus(orderBaseId int64, company |
17
|
if err != nil {
|
17
|
if err != nil {
|
18
|
return nil, lib.ThrowError(lib.TRANSACTION_ERROR, err.Error())
|
18
|
return nil, lib.ThrowError(lib.TRANSACTION_ERROR, err.Error())
|
19
|
}
|
19
|
}
|
|
|
20
|
+ if err = transactionContext.StartTransaction(); err != nil {
|
|
|
21
|
+ return nil, lib.ThrowError(lib.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
22
|
+ }
|
|
|
23
|
+ defer func() {
|
|
|
24
|
+ transactionContext.RollbackTransaction()
|
|
|
25
|
+ }()
|
20
|
var (
|
26
|
var (
|
21
|
orderBaseRepository domain.OrderBaseRepository
|
27
|
orderBaseRepository domain.OrderBaseRepository
|
22
|
order *domain.OrderBase
|
28
|
order *domain.OrderBase
|
|
@@ -33,6 +39,7 @@ func (service OrderInfoService) GetOrderInfoWithBonus(orderBaseId int64, company |
|
@@ -33,6 +39,7 @@ func (service OrderInfoService) GetOrderInfoWithBonus(orderBaseId int64, company |
33
|
if err != nil {
|
39
|
if err != nil {
|
34
|
return nil, lib.ThrowError(lib.INTERNAL_SERVER_ERROR, fmt.Sprintf("获取订单数据失败:%s", err))
|
40
|
return nil, lib.ThrowError(lib.INTERNAL_SERVER_ERROR, fmt.Sprintf("获取订单数据失败:%s", err))
|
35
|
}
|
41
|
}
|
|
|
42
|
+ _ = transactionContext.CommitTransaction()
|
36
|
var (
|
43
|
var (
|
37
|
returnData interface{}
|
44
|
returnData interface{}
|
38
|
)
|
45
|
)
|