package com.miaxis.newgzpt.service.impl;

import com.miaxis.common.annotation.DataSource;
import com.miaxis.common.enums.DataSourceTypeEnum;
import com.miaxis.newgzpt.domain.GzptTrainRecord;
import com.miaxis.newgzpt.dto.TrainCreditDTO;
import com.miaxis.newgzpt.dto.TrainFinishDTO;
import com.miaxis.newgzpt.dto.TrainFinishKmDTO;
import com.miaxis.newgzpt.mapper.GzptTrainRecordMapper;
import com.miaxis.newgzpt.service.IGzptTrainRecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.miaxis.newgzpt.vo.TrainCreditVO;
import com.miaxis.newgzpt.vo.TrainFinishKmVO;
import com.miaxis.newgzpt.vo.TrainFinishVO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ${author}
 * @since 2021-03-23
 */
@Service
@DataSource(value = DataSourceTypeEnum.NEWGZPT)
public class GzptTrainRecordServiceImpl extends ServiceImpl<GzptTrainRecordMapper, GzptTrainRecord> implements IGzptTrainRecordService {


    @Resource
    GzptTrainRecordMapper gzptTrainRecordMapper;


    @Override
    public void saveGzptTrainRecord(GzptTrainRecord gzptTrainRecord) {
        gzptTrainRecordMapper.saveGzptTrainRecord(gzptTrainRecord);
    }

    @Override
    public List<TrainFinishVO> getTrainFinishNew(TrainFinishDTO trainFinishDTO) {
        return gzptTrainRecordMapper.getTrainFinishNew(trainFinishDTO);
    }

    @Override
    public List<TrainFinishKmVO> getTrainFinishKm(TrainFinishKmDTO trainFinishKmDTO) {
        return gzptTrainRecordMapper.getTrainFinishKm(trainFinishKmDTO);
    }


    @Override
    public List<TrainCreditVO> getTrainSubjectCredit(TrainCreditDTO trainCreditDTO) {
        return gzptTrainRecordMapper.getTrainSubjectCredit(trainCreditDTO);
    }
}
