package com.jiayue.insu.inclientqn.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jiayue.insu.inclientqn.entity.BackStatData;
import com.jiayue.insu.inclientqn.entity.CorrforeSt;
import com.jiayue.insu.inclientqn.mapper.BackStatDataMapper;
import com.jiayue.insu.inclientqn.mapper.CorrforeStMapper;
import com.jiayue.insu.inclientqn.service.BackStatDataService;
import com.jiayue.insu.inclientqn.service.CorrforeStService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 回传统计数据业务实现
 *
 * @author yh
 * @version 1.0
 * @since 2022/5/22 11:29
 */
@Service
@Slf4j
public class BackStatDataServiceImpl extends ServiceImpl<BackStatDataMapper, BackStatData> implements BackStatDataService {


    @Override
    public List<BackStatData> findBySignTime(LocalDateTime time) {
        LambdaQueryWrapper<BackStatData> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.eq(BackStatData::getSignTime,time);
        return this.list(lambdaQueryWrapper);
    }

    @Override
    public List<BackStatData> findBySignTimeBetween(LocalDateTime startTime, LocalDateTime endTime) {
        LambdaQueryWrapper<BackStatData> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.between(BackStatData::getSignTime,startTime,endTime);
        return this.list(lambdaQueryWrapper);
    }
}
