package com.zcloud.primeport.service;

import com.zcloud.primeport.api.EVehicleBasicInfoServiceI;
import com.zcloud.primeport.command.EVehicleBasicInfoAddExe;
import com.zcloud.primeport.command.EVehicleBasicInfoRemoveExe;
import com.zcloud.primeport.command.EVehicleBasicInfoUpdateExe;
import com.zcloud.primeport.command.query.EVehicleBasicInfoQueryExe;
import com.zcloud.primeport.dto.EVehicleBasicInfoAddCmd;
import com.zcloud.primeport.dto.EVehicleBasicInfoPageQry;
import com.zcloud.primeport.dto.EVehicleBasicInfoUpdateCmd;
import com.zcloud.primeport.dto.clientobject.EVehicleBasicInfoCO;

import com.alibaba.cola.dto.PageResponse;
import com.alibaba.cola.dto.SingleResponse;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * web-app
 *
 * @Author dearLin
 * @Date 2026-04-23 10:04:33
 */
@Service
@AllArgsConstructor
public class EVehicleBasicInfoServiceImpl implements EVehicleBasicInfoServiceI {
    private final EVehicleBasicInfoAddExe eVehicleBasicInfoAddExe;
    private final EVehicleBasicInfoUpdateExe eVehicleBasicInfoUpdateExe;
    private final EVehicleBasicInfoRemoveExe eVehicleBasicInfoRemoveExe;
    private final EVehicleBasicInfoQueryExe eVehicleBasicInfoQueryExe;

    @Override
    public EVehicleBasicInfoCO queryById(Long id) {
        return eVehicleBasicInfoQueryExe.queryById(id);
    }

    @Override
    public PageResponse<EVehicleBasicInfoCO> listPage(EVehicleBasicInfoPageQry qry) {

        return eVehicleBasicInfoQueryExe.execute(qry);
    }

    @Override
    public SingleResponse add(EVehicleBasicInfoAddCmd cmd) {

        eVehicleBasicInfoAddExe.execute(cmd);
        return SingleResponse.buildSuccess();
    }

    @Override
    public void edit(EVehicleBasicInfoUpdateCmd eVehicleBasicInfoUpdateCmd) {
        eVehicleBasicInfoUpdateExe.execute(eVehicleBasicInfoUpdateCmd);
    }

    @Override
    public void remove(Long id) {
        eVehicleBasicInfoRemoveExe.execute(id);
    }

    @Override
    public void removeBatch(List<Long> ids) {
        eVehicleBasicInfoRemoveExe.execute(ids);
    }
}

