作者 陈志颖

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

@@ -1687,17 +1687,6 @@ func (cashPoolService *CashPoolService) RemoveExchangeCashPerson(removeExchangeC @@ -1687,17 +1687,6 @@ func (cashPoolService *CashPoolService) RemoveExchangeCashPerson(removeExchangeC
1687 return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", string(operationSuMoneyCommand.Uid))) 1687 return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", string(operationSuMoneyCommand.Uid)))
1688 } 1688 }
1689 1689
1690 - // 获取平台现金兑换情况  
1691 - //systemCashStatistics, err := employeeDao.CalculateSystemCash(activityFound.CompanyId)  
1692 - //if err != nil {  
1693 - // return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())  
1694 - //}  
1695 - //if systemCashStatistics == nil {  
1696 - // return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "无效的公司")  
1697 - //}  
1698 - //systemExchangedCash := systemCashStatistics["systemExchangedCash"].(float64)  
1699 - //systemUnExchangeCash := systemCashStatistics["systemUnExchangeCash"].(float64)  
1700 -  
1701 // 获取平台素币兑换情况 1690 // 获取平台素币兑换情况
1702 systemSuMoneyStatistics, err := employeeDao.CalculateSystemSuMoney(activityFound.CompanyId) 1691 systemSuMoneyStatistics, err := employeeDao.CalculateSystemSuMoney(activityFound.CompanyId)
1703 if err != nil { 1692 if err != nil {
@@ -1732,8 +1721,8 @@ func (cashPoolService *CashPoolService) RemoveExchangeCashPerson(removeExchangeC @@ -1732,8 +1721,8 @@ func (cashPoolService *CashPoolService) RemoveExchangeCashPerson(removeExchangeC
1732 updateCashPoolCommand := &command.UpdateCashPoolCommand{ 1721 updateCashPoolCommand := &command.UpdateCashPoolCommand{
1733 CashPoolId: cashPoolsFound[0].CashPoolId, 1722 CashPoolId: cashPoolsFound[0].CashPoolId,
1734 Cash: cashPoolsFound[0].Cash, 1723 Cash: cashPoolsFound[0].Cash,
1735 - ExchangedCash: cashPoolsFound[0].ExchangedCash - personFound.ExchangedCash,  
1736 - UnExchangeCash: cashPoolsFound[0].UnExchangeCash + personFound.ExchangedCash, 1724 + ExchangedCash: cashPoolsFound[0].ExchangedCash - personFoundExchangedCash,
  1725 + UnExchangeCash: cashPoolsFound[0].UnExchangeCash + personFoundExchangedCash,
1737 Rate: newRate, 1726 Rate: newRate,
1738 ExchangedSuMoney: systemExchangedSuMoney, 1727 ExchangedSuMoney: systemExchangedSuMoney,
1739 UnExchangeSuMoney: systemUnExchangeSuMoney, 1728 UnExchangeSuMoney: systemUnExchangeSuMoney,