package org.jeecg.modules.database.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.database.entity.NasaDataRecord;
import org.jeecg.modules.database.mapper.NasaDataRecordMapper;
import org.jeecg.modules.database.service.INasaDataRecordService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Optional;

/**
 * @Description: NASA数据管理
 * @Author: jeecg-boot
 * @Date: 2024-11-04
 * @Version: V1.0
 */
@Service
public class NasaDataRecordServiceImpl extends ServiceImpl<NasaDataRecordMapper, NasaDataRecord> implements INasaDataRecordService {

    @Override
    public Long sumLhs() {
        return Optional.ofNullable(baseMapper.sumLhs()).orElse(0L);

    }

    @Override
    public Long sumXhy() {
        return Optional.ofNullable(baseMapper.sumXhy()).orElse(0L);
    }

    @Override
    public List<NasaDataRecord> search(String keyWord) {
        return baseMapper.search(keyWord);
    }
}
