package com.zcloud.primeport.service;

import com.zcloud.primeport.api.VehicleDockLogServiceI;
import com.zcloud.primeport.command.VehicleDockLogAddExe;
import com.zcloud.primeport.command.VehicleDockLogRemoveExe;
import com.zcloud.primeport.command.VehicleDockLogUpdateExe;
import com.zcloud.primeport.command.query.VehicleDockLogQueryExe;
import com.zcloud.primeport.dto.VehicleDockLogAddCmd;
import com.zcloud.primeport.dto.VehicleDockLogPageQry;
import com.zcloud.primeport.dto.VehicleDockLogUpdateCmd;
import com.zcloud.primeport.dto.clientobject.VehicleDockLogCO;

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-14 14:53:30
 */
@Service
@AllArgsConstructor
public class VehicleDockLogServiceImpl implements VehicleDockLogServiceI {
    private final VehicleDockLogAddExe vehicleDockLogAddExe;
    private final VehicleDockLogUpdateExe vehicleDockLogUpdateExe;
    private final VehicleDockLogRemoveExe vehicleDockLogRemoveExe;
    private final VehicleDockLogQueryExe vehicleDockLogQueryExe;

    @Override
    public VehicleDockLogCO queryById(Long id) {
        return vehicleDockLogQueryExe.queryById(id);
    }

    @Override
    public PageResponse<VehicleDockLogCO> listPage(VehicleDockLogPageQry qry) {

        return vehicleDockLogQueryExe.execute(qry);
    }

    @Override
    public SingleResponse add(VehicleDockLogAddCmd cmd) {

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

    @Override
    public void edit(VehicleDockLogUpdateCmd vehicleDockLogUpdateCmd) {
        vehicleDockLogUpdateExe.execute(vehicleDockLogUpdateCmd);
    }

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

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

