package com.shanghaichengdi.ghjgitem.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.shanghaichengdi.ghjgitem.domain.WaterSelfOperated;
import com.shanghaichengdi.ghjgitem.mapper.WaterPublicFlightsMapper;
import com.shanghaichengdi.ghjgitem.mapper.WaterSelfOperatedMapper;
import com.shanghaichengdi.ghjgitem.service.WaterSelfOperatedService;
import com.shanghaichengdi.ghjgitem.util.PrintLogUtils;
import com.shanghaichengdi.ghjgitem.vo.request.WaterExcursionReq;
import com.shanghaichengdi.ghjgitem.vo.response.WaterPublicFlightsRes;
import com.shanghaichengdi.ghjgitem.vo.response.WaterSelfOperatedRes;
import org.springframework.stereotype.Service;

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

/**
* @author Administrator
* @description 针对表【WATER_SELF_OPERATED(浦江游览备案-自营航班)】的数据库操作Service实现
* @createDate 2025-02-14 21:33:53
*/
@Service
public class WaterSelfOperatedServiceImpl extends ServiceImpl<WaterSelfOperatedMapper, WaterSelfOperated>
    implements WaterSelfOperatedService {
    // 实现服务方法
    @Resource
    WaterSelfOperatedMapper mapper;

    @Override
    public List<WaterSelfOperatedRes> getPageList(WaterExcursionReq req) {
        try{
            PageHelper.startPage(req.getPageIndex(), req.getPageSize());
            List<WaterSelfOperatedRes> list = mapper.getPageList(req.getStartDate(), req.getEndDate());
            return list;
        }catch (Exception err){
            PrintLogUtils.printErrorLogInfo(err,"getPageList异常：");
            return null;
        }
    }
}