作者 唐旭辉

修复bug

@@ -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 )
@@ -12,6 +12,10 @@ type OrderGoodBonusStatus interface { @@ -12,6 +12,10 @@ type OrderGoodBonusStatus interface {
12 WartPayPartnerBonus(orderGood *OrderGood) error 12 WartPayPartnerBonus(orderGood *OrderGood) error
13 //状态变更为已支付 13 //状态变更为已支付
14 PayPartnerBonus(orderGood *OrderGood) error 14 PayPartnerBonus(orderGood *OrderGood) error
  15 + //变更货品数量
  16 + /// UpdateOrderGoodNumber(good *OrderGood, number int, orderType int) error
  17 + //变更合伙人分红比例
  18 + //UpdatePertnerBonusPercent(good *OrderGood, percent float64, orderType int) error
15 } 19 }
16 20
17 //货单的支付状态 21 //货单的支付状态
@@ -106,7 +106,7 @@ func (repository OrderGoodRepository) Find(queryOption domain.OrderGoodFindQuery @@ -106,7 +106,7 @@ func (repository OrderGoodRepository) Find(queryOption domain.OrderGoodFindQuery
106 if queryOption.Limit > 0 { 106 if queryOption.Limit > 0 {
107 query = query.Limit(queryOption.Limit) 107 query = query.Limit(queryOption.Limit)
108 } else { 108 } else {
109 - query = query.Limit(100) 109 + query = query.Limit(1000)
110 } 110 }
111 var ( 111 var (
112 err error 112 err error