作者 陈志颖

fix:修复导入订单金额计算

... ... @@ -685,7 +685,7 @@ func (dividendsOrderService *DividendsOrderService) ImportDividendsOrder(importD
})
// 计算分红订单金额
dividendsOrderAmount = dividendsOrderAmount + orderGood.OrderGoodAmount
dividendsOrderAmount = dividendsOrderAmount + orderGood.OrderGoodPrice*float64(orderGood.OrderGoodQuantity)
}
if len(orderGoodErrMap) > 0 {
row := &domain.ImportInfo{
... ...
... ... @@ -55,12 +55,12 @@ func (repository *DividendsOrderRepository) Save(dividendsOrder *domain.Dividend
updateFieldsSnippet := sqlbuilder.SqlUpdateFieldsSnippet(updateFields)
tx := repository.transactionContext.PgTx
if dividendsOrder.Identify() == nil {
dividendsOrderId, err := repository.nextIdentify()
if err != nil {
return dividendsOrder, err
} else {
dividendsOrder.DividendsOrderId = dividendsOrderId
}
//dividendsOrderId, err := repository.nextIdentify()
//if err != nil {
// return dividendsOrder, err
//} else {
// dividendsOrder.DividendsOrderId = dividendsOrderId
//}
if _, err := tx.QueryOne(
pg.Scan(
&dividendsOrder.DividendsOrderId,
... ...