作者 唐旭辉

修复bug

... ... @@ -17,6 +17,12 @@ func (service OrderInfoService) GetOrderInfoWithBonus(orderBaseId int64, company
if err != nil {
return nil, lib.ThrowError(lib.TRANSACTION_ERROR, err.Error())
}
if err = transactionContext.StartTransaction(); err != nil {
return nil, lib.ThrowError(lib.INTERNAL_SERVER_ERROR, err.Error())
}
defer func() {
transactionContext.RollbackTransaction()
}()
var (
orderBaseRepository domain.OrderBaseRepository
order *domain.OrderBase
... ... @@ -33,6 +39,7 @@ func (service OrderInfoService) GetOrderInfoWithBonus(orderBaseId int64, company
if err != nil {
return nil, lib.ThrowError(lib.INTERNAL_SERVER_ERROR, fmt.Sprintf("获取订单数据失败:%s", err))
}
_ = transactionContext.CommitTransaction()
var (
returnData interface{}
)
... ...
... ... @@ -12,6 +12,10 @@ type OrderGoodBonusStatus interface {
WartPayPartnerBonus(orderGood *OrderGood) error
//状态变更为已支付
PayPartnerBonus(orderGood *OrderGood) error
//变更货品数量
/// UpdateOrderGoodNumber(good *OrderGood, number int, orderType int) error
//变更合伙人分红比例
//UpdatePertnerBonusPercent(good *OrderGood, percent float64, orderType int) error
}
//货单的支付状态
... ...
... ... @@ -106,7 +106,7 @@ func (repository OrderGoodRepository) Find(queryOption domain.OrderGoodFindQuery
if queryOption.Limit > 0 {
query = query.Limit(queryOption.Limit)
} else {
query = query.Limit(100)
query = query.Limit(1000)
}
var (
err error
... ...