作者 陈志颖

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

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