作者 陈志颖

fix:获取现金池

@@ -275,7 +275,7 @@ func (cashPoolService *CashPoolService) GetCashPool(getCashPoolQuery *query.GetC @@ -275,7 +275,7 @@ func (cashPoolService *CashPoolService) GetCashPool(getCashPoolQuery *query.GetC
275 if count, activities, err := exchangeActivityRepository.Find(listExchangeCashActivityQuery); err != nil { 275 if count, activities, err := exchangeActivityRepository.Find(listExchangeCashActivityQuery); err != nil {
276 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 276 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
277 } else { 277 } else {
278 - if count > 1 { 278 + if count >= 0 {
279 lastActivityRate = activities[0].Rate 279 lastActivityRate = activities[0].Rate
280 } else { // 未查询到相关兑换活动 280 } else { // 未查询到相关兑换活动
281 lastActivityRate = 0 281 lastActivityRate = 0
@@ -290,7 +290,7 @@ func (cashPoolService *CashPoolService) GetCashPool(getCashPoolQuery *query.GetC @@ -290,7 +290,7 @@ func (cashPoolService *CashPoolService) GetCashPool(getCashPoolQuery *query.GetC
290 if systemSuMoneyStatistics == nil { 290 if systemSuMoneyStatistics == nil {
291 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "无效的公司") 291 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "无效的公司")
292 } 292 }
293 - systemUnExchangeSuMoney := systemSuMoneyStatistics["systemUnExchangeSuMoney"].(float64) // 平台未兑换素币 293 + systemUnExchangeSuMoney, _ := strconv.ParseFloat(fmt.Sprintf("%.2f", systemSuMoneyStatistics["systemUnExchangeSuMoney"].(float64)), 64) // 平台未兑换素币
294 294
295 // 查找当前公司现金池 295 // 查找当前公司现金池
296 if count, cashPools, err := cashPoolRepository.Find(tool_funs.SimpleStructToMap(getCashPoolQuery)); err != nil { 296 if count, cashPools, err := cashPoolRepository.Find(tool_funs.SimpleStructToMap(getCashPoolQuery)); err != nil {