|
@@ -20,6 +20,7 @@ import java.math.BigDecimal;
|
|
import java.text.Format;
|
|
import java.text.Format;
|
|
import java.time.LocalDate;
|
|
import java.time.LocalDate;
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
|
|
+import java.util.Date;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@@ -36,15 +37,16 @@ public class CurrencyRecordServiceImpl extends ServiceImpl<CurrencyRecordMapper,
|
|
private final AssetService assetService;
|
|
private final AssetService assetService;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public List<CurrencyRecordDTO> listCurrencyRecord(Integer type, LocalDate date){
|
|
|
|
- Long userId = SessionContextHolder.getId();
|
|
|
|
|
|
+ public List<CurrencyRecordDTO> listCurrencyRecord(Integer type, Long date){
|
|
|
|
+ Date localDate = new Date(date);
|
|
|
|
+ Long userId = SessionContextHolder.getId();
|
|
List<CurrencyRecord> currencyRecords = this.lambdaQuery()
|
|
List<CurrencyRecord> currencyRecords = this.lambdaQuery()
|
|
.eq(CurrencyRecord::getUserId,userId)
|
|
.eq(CurrencyRecord::getUserId,userId)
|
|
.eq(CurrencyRecord::getType, type)
|
|
.eq(CurrencyRecord::getType, type)
|
|
.list();
|
|
.list();
|
|
List<CurrencyRecordDTO> list = CurrencyRecordCopier.INSTANCE.copying(currencyRecords);
|
|
List<CurrencyRecordDTO> list = CurrencyRecordCopier.INSTANCE.copying(currencyRecords);
|
|
List<CurrencyRecordDTO> filteredPeople = list.stream()
|
|
List<CurrencyRecordDTO> filteredPeople = list.stream()
|
|
- .filter(item -> !DateUtils.format(item.getCreateTime()).equals(DateUtils.format(date)))
|
|
|
|
|
|
+ .filter(item -> !DateUtils.format(item.getCreateTime()).equals(DateUtils.format(localDate)))
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
return filteredPeople;
|
|
return filteredPeople;
|
|
}
|
|
}
|