package com.zcloud.fire.check.service;

import com.alibaba.cola.dto.PageResponse;
import com.alibaba.cola.dto.SingleResponse;
import com.zcloud.fire.check.api.FireCheckRecordPointServiceI;
import com.zcloud.fire.check.command.FireCheckRecordPointAddExe;
import com.zcloud.fire.check.command.FireCheckRecordPointRemoveExe;
import com.zcloud.fire.check.command.FireCheckRecordPointUpdateExe;
import com.zcloud.fire.check.command.query.FireCheckRecordPointQueryExe;
import com.zcloud.fire.check.dto.*;
import com.zcloud.fire.check.dto.clientobject.AppFireCheckRecordCO;
import com.zcloud.fire.check.dto.clientobject.FireCheckPointListCO;
import com.zcloud.fire.check.dto.clientobject.FireCheckRecordPointCO;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * web-app
 *
 * @Author zhaokai
 * @Date 2025-12-12 11:10:20
 */
@Service
@AllArgsConstructor
public class FireCheckRecordPointServiceImpl implements FireCheckRecordPointServiceI {
    private final FireCheckRecordPointAddExe fireCheckRecordPointAddExe;
    private final FireCheckRecordPointUpdateExe fireCheckRecordPointUpdateExe;
    private final FireCheckRecordPointRemoveExe fireCheckRecordPointRemoveExe;
    private final FireCheckRecordPointQueryExe fireCheckRecordPointQueryExe;

    @Override
    public PageResponse<FireCheckRecordPointCO> listPage(FireCheckRecordPointPageQry qry) {

        return fireCheckRecordPointQueryExe.execute(qry);
    }

    @Override
    public SingleResponse add(FireCheckRecordPointAddCmd cmd) {

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

    @Override
    public void edit(FireCheckRecordPointUpdateCmd fireCheckRecordPointUpdateCmd) {
        fireCheckRecordPointUpdateExe.execute(fireCheckRecordPointUpdateCmd);
    }

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

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

    @Override
    public AppFireCheckRecordCO getCheckRecordPointList(CheckRecordPointListQry qry) {
        return fireCheckRecordPointQueryExe.getCheckRecordPointList(qry);
    }

    @Override
    public FireCheckRecordPointCO saveCheckRecordPoint(AppCheckRecordPointAddCmd appCheckRecordPointAddCmd) {
        return fireCheckRecordPointAddExe.saveCheckRecordPoint(appCheckRecordPointAddCmd);
    }
}

