package com.copy.trade.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.copy.trade.dao.StatisticsDataMapper;
import com.copy.trade.entity.po.Customer;
import com.copy.trade.entity.po.StatisticsData;
import com.copy.trade.service.ICustomerService;
import com.copy.trade.service.IPositionService;
import com.copy.trade.service.IStatisticsDataService;
import com.copy.trade.util.LocalDateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.temporal.ChronoUnit;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 统计数据表 服务实现类
 * </p>
 *
 * @author wz
 * @since 2022-11-29
 */
@Service
public class StatisticsDataServiceImpl extends ServiceImpl<StatisticsDataMapper, StatisticsData> implements IStatisticsDataService {

    @Override
    public BigDecimal winningPercentage(Integer day) {
        LocalDateTime now = LocalDateTime.now();
        LocalDateTime minus = LocalDateUtils.minus(now, day, ChronoUnit.DAYS);
        long startTimeOfDay = LocalDateUtils.getStartTimeOfDay(minus);

        return null;
    }
}
