package com.zcloud.zcGbsServicer.service;

import com.zcloud.zcGbsServicer.api.PumpRoomServiceI;
import com.zcloud.zcGbsServicer.command.PumpRoomAddExe;
import com.zcloud.zcGbsServicer.command.PumpRoomRemoveExe;
import com.zcloud.zcGbsServicer.command.PumpRoomUpdateExe;
import com.zcloud.zcGbsServicer.command.query.PumpRoomQueryExe;
import com.zcloud.zcGbsServicer.dto.PumpRoomAddCmd;
import com.zcloud.zcGbsServicer.dto.PumpRoomPageQry;
import com.zcloud.zcGbsServicer.dto.PumpRoomScreenQry;
import com.zcloud.zcGbsServicer.dto.PumpRoomUpdateCmd;
import com.zcloud.zcGbsServicer.dto.clientobject.PumpRoomCO;
import com.zcloud.zcGbsServicer.dto.clientobject.PumpRoomScreenCO;

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

/**
* web-app
* @Author makejava
* @Date 2026-01-21 17:22:16
*/
@Service
@AllArgsConstructor
public class PumpRoomServiceImpl implements PumpRoomServiceI {
    private final PumpRoomAddExe pumpRoomAddExe;
    private final PumpRoomUpdateExe pumpRoomUpdateExe;
    private final PumpRoomRemoveExe pumpRoomRemoveExe;
    private final PumpRoomQueryExe pumpRoomQueryExe;

    @Override
    public PageResponse<PumpRoomCO> listPage(PumpRoomPageQry qry){

        return pumpRoomQueryExe.execute(qry);
    }

    @Override
    public PageResponse<PumpRoomScreenCO> listScreen(PumpRoomScreenQry qry) {
        return pumpRoomQueryExe.listScreen(qry);
    }

    @Override
    public PumpRoomCO getInfoById(Long id) {
        return pumpRoomQueryExe.getById(id);
    }

    @Override
    public SingleResponse add(PumpRoomAddCmd cmd) {

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

    @Override
    public void edit(PumpRoomUpdateCmd pumpRoomUpdateCmd) {
        pumpRoomUpdateExe.execute(pumpRoomUpdateCmd);
    }

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

    @Override
    public void removeBatch(Long[] ids) {
        pumpRoomRemoveExe.execute(ids);
    }
}

