package com.zsElectric.boot.charging.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zsElectric.boot.charging.mapper.ThirdPartyEquipmentInfoMapper;
import com.zsElectric.boot.charging.model.query.ThirdPartyEquipmentInfoQuery;
import com.zsElectric.boot.charging.model.vo.ThirdPartyEquipmentInfoVO;
import com.zsElectric.boot.charging.service.ThirdPartyEquipmentInfoService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 第三方充电桩信息服务实现
 *
 * @author system
 * @since 2025-12-11
 */
@Service
@RequiredArgsConstructor
public class ThirdPartyEquipmentInfoServiceImpl implements ThirdPartyEquipmentInfoService {

    private final ThirdPartyEquipmentInfoMapper equipmentInfoMapper;

    @Override
    public IPage<ThirdPartyEquipmentInfoVO> getEquipmentInfoPage(ThirdPartyEquipmentInfoQuery queryParams) {
        // 构建分页
        Page<ThirdPartyEquipmentInfoVO> page = new Page<>(queryParams.getPageNum(), queryParams.getPageSize());

        // 调用Mapper联表查询
        return equipmentInfoMapper.selectEquipmentInfoPage(page, queryParams);
    }
}
