|
@@ -10,13 +10,18 @@ import com.chelvc.cloud.vehicle.server.entity.CurrencyRecord;
|
|
|
import com.chelvc.cloud.vehicle.server.service.AssetService;
|
|
|
import com.chelvc.cloud.vehicle.server.service.CurrencyRecordService;
|
|
|
import com.chelvc.framework.base.context.SessionContextHolder;
|
|
|
+import com.chelvc.framework.common.util.DateUtils;
|
|
|
+import com.chelvc.framework.common.util.StringUtils;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
+import java.text.Format;
|
|
|
+import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* 收益流水记录表操作接口
|
|
@@ -31,13 +36,17 @@ public class CurrencyRecordServiceImpl extends ServiceImpl<CurrencyRecordMapper,
|
|
|
private final AssetService assetService;
|
|
|
|
|
|
@Override
|
|
|
- public List<CurrencyRecordDTO> listCurrencyRecord(Integer type){
|
|
|
+ public List<CurrencyRecordDTO> listCurrencyRecord(Integer type, LocalDate date){
|
|
|
Long userId = SessionContextHolder.getId();
|
|
|
List<CurrencyRecord> currencyRecords = this.lambdaQuery()
|
|
|
.eq(CurrencyRecord::getUserId,userId)
|
|
|
.eq(CurrencyRecord::getType, type)
|
|
|
.list();
|
|
|
- return CurrencyRecordCopier.INSTANCE.copying(currencyRecords);
|
|
|
+ List<CurrencyRecordDTO> list = CurrencyRecordCopier.INSTANCE.copying(currencyRecords);
|
|
|
+ List<CurrencyRecordDTO> filteredPeople = list.stream()
|
|
|
+ .filter(item -> !DateUtils.format(item.getCreateTime()).equals(DateUtils.format(date)))
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ return filteredPeople;
|
|
|
}
|
|
|
@Override
|
|
|
public EarningsDTO getCurrencyRecord(Integer type){
|