作者 陈志颖

fix:导入

@@ -1884,18 +1884,30 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc @@ -1884,18 +1884,30 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc
1884 continue 1884 continue
1885 } 1885 }
1886 1886
  1887 + //// 判断是否超过平台未兑换现金
  1888 + //if activityUpdated.ExchangedSuMoney > activityFoundExchangedSuMoney {
  1889 + // if (activityUpdated.ExchangedSuMoney - activityFoundExchangedSuMoney) * activityUpdated.Rate > cashPoolFoundUnExchangeCash {
  1890 + // row := []interface{}{
  1891 + // createExchangeCashPersonCommand.PersonName,
  1892 + // createExchangeCashPersonCommand.PersonAccount,
  1893 + // createExchangeCashPersonCommand.ExchangedSuMoney,
  1894 + // "已超过现金池未兑换现金",
  1895 + // }
  1896 + // failureDataList = append(failureDataList, row)
  1897 + // continue
  1898 + // }
  1899 + //}
  1900 +
1887 // 判断是否超过平台未兑换现金 1901 // 判断是否超过平台未兑换现金
1888 - if activityUpdated.ExchangedSuMoney > activityFoundExchangedSuMoney {  
1889 - if (activityUpdated.ExchangedSuMoney - activityFoundExchangedSuMoney) * activityUpdated.Rate > cashPoolFoundUnExchangeCash {  
1890 - row := []interface{}{  
1891 - createExchangeCashPersonCommand.PersonName,  
1892 - createExchangeCashPersonCommand.PersonAccount,  
1893 - createExchangeCashPersonCommand.ExchangedSuMoney,  
1894 - "已超过现金池未兑换现金",  
1895 - }  
1896 - failureDataList = append(failureDataList, row)  
1897 - continue 1902 + if createExchangeCashPersonCommand.ExchangedSuMoney * activityUpdated.Rate > cashPoolFoundUnExchangeCash {
  1903 + row := []interface{}{
  1904 + createExchangeCashPersonCommand.PersonName,
  1905 + createExchangeCashPersonCommand.PersonAccount,
  1906 + createExchangeCashPersonCommand.ExchangedSuMoney,
  1907 + "已超过现金池未兑换现金",
1898 } 1908 }
  1909 + failureDataList = append(failureDataList, row)
  1910 + continue
1899 } 1911 }
1900 1912
1901 // 获取平台素币兑换情况 1913 // 获取平台素币兑换情况
@@ -2085,18 +2097,31 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc @@ -2085,18 +2097,31 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc
2085 continue 2097 continue
2086 } 2098 }
2087 2099
  2100 + //// 判断是否超过平台未兑换现金
  2101 + //if activityUpdated.ExchangedSuMoney > activityFoundExchangedSuMoney {
  2102 + // if (activityUpdated.ExchangedSuMoney - activityFoundExchangedSuMoney) * activityUpdated.Rate > cashPoolFoundUnExchangeCash {
  2103 + // row := []interface{}{
  2104 + // createExchangeCashPersonCommand.PersonName,
  2105 + // createExchangeCashPersonCommand.PersonAccount,
  2106 + // createExchangeCashPersonCommand.ExchangedSuMoney,
  2107 + // "已超过现金池未兑换现金",
  2108 + // }
  2109 + // failureDataList = append(failureDataList, row)
  2110 + // continue
  2111 + // }
  2112 + //}
  2113 +
2088 // 判断是否超过平台未兑换现金 2114 // 判断是否超过平台未兑换现金
2089 - if activityUpdated.ExchangedSuMoney > activityFoundExchangedSuMoney {  
2090 - if (activityUpdated.ExchangedSuMoney - activityFoundExchangedSuMoney) * activityUpdated.Rate > cashPoolFoundUnExchangeCash {  
2091 - row := []interface{}{  
2092 - createExchangeCashPersonCommand.PersonName,  
2093 - createExchangeCashPersonCommand.PersonAccount,  
2094 - createExchangeCashPersonCommand.ExchangedSuMoney,  
2095 - "已超过现金池未兑换现金",  
2096 - }  
2097 - failureDataList = append(failureDataList, row)  
2098 - continue 2115 + if createExchangeCashPersonCommand.ExchangedSuMoney * activityUpdated.Rate > cashPoolFoundUnExchangeCash {
  2116 + row := []interface{}{
  2117 + createExchangeCashPersonCommand.PersonName,
  2118 + createExchangeCashPersonCommand.PersonAccount,
  2119 + createExchangeCashPersonCommand.ExchangedSuMoney,
  2120 + "已超过现金池未兑换现金",
2099 } 2121 }
  2122 + failureDataList = append(failureDataList, row)
  2123 + continue
  2124 + //return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "已超过投入现金池的未兑换现金")
2100 } 2125 }
2101 2126
2102 // 获取平台素币兑换情况 2127 // 获取平台素币兑换情况