作者 陈志颖

fix:修复现金池精度

@@ -112,6 +112,11 @@ func (cashPoolService *CashPoolService) CreateCashPool(createCashPoolCommand *co @@ -112,6 +112,11 @@ func (cashPoolService *CashPoolService) CreateCashPool(createCashPoolCommand *co
112 if err := transactionContext.CommitTransaction(); err != nil { 112 if err := transactionContext.CommitTransaction(); err != nil {
113 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) 113 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
114 } 114 }
  115 + cashPool.Rate, _ = strconv.ParseFloat(fmt.Sprintf("%.2f", cashPool.Rate), 64)
  116 + cashPool.UnExchangeCash, _ = strconv.ParseFloat(fmt.Sprintf("%.2f", cashPool.UnExchangeCash), 64)
  117 + cashPool.ExchangedSuMoney, _ = strconv.ParseFloat(fmt.Sprintf("%.2f", cashPool.ExchangedSuMoney), 64)
  118 + cashPool.UnExchangeSuMoney, _ = strconv.ParseFloat(fmt.Sprintf("%.2f", cashPool.UnExchangeSuMoney), 64)
  119 + cashPool.ExchangedCash, _ = strconv.ParseFloat(fmt.Sprintf("%.2f", cashPool.ExchangedCash), 64)
115 return cashPool, nil 120 return cashPool, nil
116 } 121 }
117 } else { // 更新现金池 122 } else { // 更新现金池