正在显示
1 个修改的文件
包含
12 行增加
和
2 行删除
@@ -2346,9 +2346,19 @@ func (cashPoolService *CashPoolService) CreateExchangeCashPerson(createExchangeC | @@ -2346,9 +2346,19 @@ 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, "已超过投入现金池的未兑换现金") | ||
2351 | } | 2359 | } |
2360 | + } | ||
2361 | + | ||
2352 | 2362 | ||
2353 | // 获取平台素币兑换情况 | 2363 | // 获取平台素币兑换情况 |
2354 | systemSuMoneyStatistics, err := employeeDao.CalculateSystemSuMoney(activityFound.CompanyId) | 2364 | systemSuMoneyStatistics, err := employeeDao.CalculateSystemSuMoney(activityFound.CompanyId) |
-
请 注册 或 登录 后发表评论