Merge branch 'dev' of http://gitlab.fjmaimaimai.com/mmm-go/partnermg into dev
正在显示
1 个修改的文件
包含
2 行增加
和
6 行删除
@@ -119,9 +119,7 @@ func (OrderPaymentService *OrderPaymentService) ListOrderPayment(listOrderPaymen | @@ -119,9 +119,7 @@ func (OrderPaymentService *OrderPaymentService) ListOrderPayment(listOrderPaymen | ||
119 | return nil, lib.ThrowError(lib.TRANSACTION_ERROR, err.Error()) | 119 | return nil, lib.ThrowError(lib.TRANSACTION_ERROR, err.Error()) |
120 | } | 120 | } |
121 | defer func() { | 121 | defer func() { |
122 | - if err != nil { | ||
123 | - transactionContext.RollbackTransaction() | ||
124 | - } | 122 | + transactionContext.RollbackTransaction() |
125 | }() | 123 | }() |
126 | var OrderPaymentRepository domain.OrderPaymentRepository | 124 | var OrderPaymentRepository domain.OrderPaymentRepository |
127 | if OrderPaymentRepository, err = factory.CreateOrderPaymentRepository(map[string]interface{}{ | 125 | if OrderPaymentRepository, err = factory.CreateOrderPaymentRepository(map[string]interface{}{ |
@@ -162,9 +160,7 @@ func (OrderPaymentService *OrderPaymentService) ListDividendOrders(listOrderPaym | @@ -162,9 +160,7 @@ func (OrderPaymentService *OrderPaymentService) ListDividendOrders(listOrderPaym | ||
162 | return 0, nil, lib.ThrowError(lib.TRANSACTION_ERROR, err.Error()) | 160 | return 0, nil, lib.ThrowError(lib.TRANSACTION_ERROR, err.Error()) |
163 | } | 161 | } |
164 | defer func() { | 162 | defer func() { |
165 | - if err != nil { | ||
166 | - transactionContext.RollbackTransaction() | ||
167 | - } | 163 | + transactionContext.RollbackTransaction() |
168 | }() | 164 | }() |
169 | if count, orders, err = OrderDao.GetDividendOrders(map[string]interface{}{ | 165 | if count, orders, err = OrderDao.GetDividendOrders(map[string]interface{}{ |
170 | "orderCode": listOrderPaymentQuery.SearchText, | 166 | "orderCode": listOrderPaymentQuery.SearchText, |
-
请 注册 或 登录 后发表评论