作者 陈志颖

fix:删除素币兑换记录后,已兑换现金与未兑换现金值不正确问题

... ... @@ -1687,17 +1687,6 @@ func (cashPoolService *CashPoolService) RemoveExchangeCashPerson(removeExchangeC
return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", string(operationSuMoneyCommand.Uid)))
}
// 获取平台现金兑换情况
//systemCashStatistics, err := employeeDao.CalculateSystemCash(activityFound.CompanyId)
//if err != nil {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
//}
//if systemCashStatistics == nil {
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "无效的公司")
//}
//systemExchangedCash := systemCashStatistics["systemExchangedCash"].(float64)
//systemUnExchangeCash := systemCashStatistics["systemUnExchangeCash"].(float64)
// 获取平台素币兑换情况
systemSuMoneyStatistics, err := employeeDao.CalculateSystemSuMoney(activityFound.CompanyId)
if err != nil {
... ... @@ -1732,8 +1721,8 @@ func (cashPoolService *CashPoolService) RemoveExchangeCashPerson(removeExchangeC
updateCashPoolCommand := &command.UpdateCashPoolCommand{
CashPoolId: cashPoolsFound[0].CashPoolId,
Cash: cashPoolsFound[0].Cash,
ExchangedCash: cashPoolsFound[0].ExchangedCash - personFound.ExchangedCash,
UnExchangeCash: cashPoolsFound[0].UnExchangeCash + personFound.ExchangedCash,
ExchangedCash: cashPoolsFound[0].ExchangedCash - personFoundExchangedCash,
UnExchangeCash: cashPoolsFound[0].UnExchangeCash + personFoundExchangedCash,
Rate: newRate,
ExchangedSuMoney: systemExchangedSuMoney,
UnExchangeSuMoney: systemUnExchangeSuMoney,
... ...