作者 陈志颖

fix:新增兑换素币清单

@@ -2346,10 +2346,20 @@ func (cashPoolService *CashPoolService) CreateExchangeCashPerson(createExchangeC @@ -2346,10 +2346,20 @@ func (cashPoolService *CashPoolService) CreateExchangeCashPerson(createExchangeC
2346 cashPoolFoundExchangedCash := cashPoolsFound[0].ExchangedCash 2346 cashPoolFoundExchangedCash := cashPoolsFound[0].ExchangedCash
2347 2347
2348 // 判断兑换活动的现金是否超过现金池未兑换现金 2348 // 判断兑换活动的现金是否超过现金池未兑换现金
2349 - if activityUpdated.ExchangedSuMoney * updateExchangeCashActivityCommand.ExchangeRate > cashPoolFoundUnExchangeCash {  
2350 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "已超过投入现金池未兑换现金") 2349 + //if activityUpdated.ExchangedSuMoney * updateExchangeCashActivityCommand.ExchangeRate > cashPoolFoundUnExchangeCash {
  2350 + // return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "已超过投入现金池未兑换现金")
  2351 + //}
  2352 +
  2353 + // TODO
  2354 +
  2355 + // 判断是否超过平台未兑换现金
  2356 + if activityUpdated.ExchangedSuMoney > activityFoundExchangedSuMoney {
  2357 + if (activityUpdated.ExchangedSuMoney - activityFoundExchangedSuMoney) * activityUpdated.Rate > cashPoolFoundUnExchangeCash {
  2358 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "已超过投入现金池的未兑换现金")
  2359 + }
2351 } 2360 }
2352 2361
  2362 +
2353 // 获取平台素币兑换情况 2363 // 获取平台素币兑换情况
2354 systemSuMoneyStatistics, err := employeeDao.CalculateSystemSuMoney(activityFound.CompanyId) 2364 systemSuMoneyStatistics, err := employeeDao.CalculateSystemSuMoney(activityFound.CompanyId)
2355 if err != nil { 2365 if err != nil {