package com.zcloud.basic.info.service;

import com.alibaba.cola.dto.MultiResponse;
import com.zcloud.basic.info.api.ProblemFeedbackServiceI;
import com.zcloud.basic.info.command.ProblemFeedbackAddExe;
import com.zcloud.basic.info.command.ProblemFeedbackRemoveExe;
import com.zcloud.basic.info.command.ProblemFeedbackUpdateExe;
import com.zcloud.basic.info.command.query.ProblemFeedbackQueryExe;
import com.zcloud.basic.info.dto.ProblemFeedbackAddCmd;
import com.zcloud.basic.info.dto.ProblemFeedbackPageQry;
import com.zcloud.basic.info.dto.ProblemFeedbackListQry;
import com.zcloud.basic.info.dto.ProblemFeedbackUpdateCmd;
import com.zcloud.basic.info.dto.clientobject.ProblemFeedbackCO;

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

/**
 * web-app
 *
 * @Author SondonYong
 * @Date 2025-12-06 11:26:35
 */
@Service
@AllArgsConstructor
public class ProblemFeedbackServiceImpl implements ProblemFeedbackServiceI {
    private final ProblemFeedbackAddExe problemFeedbackAddExe;
    private final ProblemFeedbackUpdateExe problemFeedbackUpdateExe;
    private final ProblemFeedbackRemoveExe problemFeedbackRemoveExe;
    private final ProblemFeedbackQueryExe problemFeedbackQueryExe;

    @Override
    public PageResponse<ProblemFeedbackCO> listPage(ProblemFeedbackPageQry qry) {
        return problemFeedbackQueryExe.execute(qry);
    }

    @Override
    public MultiResponse<ProblemFeedbackCO> list(ProblemFeedbackListQry qry) {
        return problemFeedbackQueryExe.execute(qry);
    }

    @Override
    public SingleResponse<ProblemFeedbackCO> getInfoById(Long id) {
        return problemFeedbackQueryExe.execute(id);
    }

    @Override
    public SingleResponse add(ProblemFeedbackAddCmd cmd) {
        problemFeedbackAddExe.execute(cmd);
        return SingleResponse.buildSuccess();
    }

    @Override
    public void edit(ProblemFeedbackUpdateCmd cmd) {
        problemFeedbackUpdateExe.execute(cmd);
    }

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

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

