package com.zcloud.fire.check.service;

import com.alibaba.cola.dto.PageResponse;
import com.alibaba.cola.dto.SingleResponse;
import com.zcloud.fire.check.api.FireCheckRecordUserServiceI;
import com.zcloud.fire.check.command.FireCheckRecordUserAddExe;
import com.zcloud.fire.check.command.FireCheckRecordUserRemoveExe;
import com.zcloud.fire.check.command.FireCheckRecordUserUpdateExe;
import com.zcloud.fire.check.command.query.FireCheckRecordUserQueryExe;
import com.zcloud.fire.check.dto.FireCheckRecordUserAddCmd;
import com.zcloud.fire.check.dto.FireCheckRecordUserPageQry;
import com.zcloud.fire.check.dto.FireCheckRecordUserUpdateCmd;
import com.zcloud.fire.check.dto.clientobject.FireCheckRecordUserCO;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * web-app
 *
 * @Author zhaokai
 * @Date 2025-12-12 11:12:05
 */
@Service
@AllArgsConstructor
public class FireCheckRecordUserServiceImpl implements FireCheckRecordUserServiceI {
    private final FireCheckRecordUserAddExe fireCheckRecordUserAddExe;
    private final FireCheckRecordUserUpdateExe fireCheckRecordUserUpdateExe;
    private final FireCheckRecordUserRemoveExe fireCheckRecordUserRemoveExe;
    private final FireCheckRecordUserQueryExe fireCheckRecordUserQueryExe;

    @Override
    public PageResponse<FireCheckRecordUserCO> listPage(FireCheckRecordUserPageQry qry) {

        return fireCheckRecordUserQueryExe.execute(qry);
    }

    @Override
    public SingleResponse add(FireCheckRecordUserAddCmd cmd) {

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

    @Override
    public void edit(FireCheckRecordUserUpdateCmd fireCheckRecordUserUpdateCmd) {
        fireCheckRecordUserUpdateExe.execute(fireCheckRecordUserUpdateCmd);
    }

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

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

