package com.zcloud.personnel.positioning.service;

import com.zcloud.personnel.positioning.api.AlarmDisposeRecordServiceI;
import com.zcloud.personnel.positioning.command.AlarmDisposeRecordAddExe;
import com.zcloud.personnel.positioning.command.AlarmDisposeRecordRemoveExe;
import com.zcloud.personnel.positioning.command.AlarmDisposeRecordUpdateExe;
import com.zcloud.personnel.positioning.command.query.AlarmDisposeRecordQueryExe;
import com.zcloud.personnel.positioning.dto.AlarmDisposeRecordAddCmd;
import com.zcloud.personnel.positioning.dto.AlarmDisposeRecordPageQry;
import com.zcloud.personnel.positioning.dto.AlarmDisposeRecordUpdateCmd;
import com.zcloud.personnel.positioning.dto.clientobject.AlarmDisposeRecordCO;
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 fangjiakai
 * @Date 2026-07-07
 */
@Service
@AllArgsConstructor
public class AlarmDisposeRecordServiceImpl implements AlarmDisposeRecordServiceI {
    private final AlarmDisposeRecordAddExe alarmDisposeRecordAddExe;
    private final AlarmDisposeRecordUpdateExe alarmDisposeRecordUpdateExe;
    private final AlarmDisposeRecordRemoveExe alarmDisposeRecordRemoveExe;
    private final AlarmDisposeRecordQueryExe alarmDisposeRecordQueryExe;

    @Override
    public PageResponse<AlarmDisposeRecordCO> listPage(AlarmDisposeRecordPageQry qry) {
        return alarmDisposeRecordQueryExe.execute(qry);
    }

    @Override
    public List<AlarmDisposeRecordCO> listAll() {
        return alarmDisposeRecordQueryExe.listAll();
    }

    @Override
    public AlarmDisposeRecordCO queryById(Long id) {
        return alarmDisposeRecordQueryExe.queryById(id);
    }

    @Override
    public SingleResponse<AlarmDisposeRecordCO> add(AlarmDisposeRecordAddCmd cmd) {
        alarmDisposeRecordAddExe.execute(cmd);
        return SingleResponse.buildSuccess();
    }

    @Override
    public void edit(AlarmDisposeRecordUpdateCmd cmd) {
        alarmDisposeRecordUpdateExe.execute(cmd);
    }

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

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