package com.zcloud.basic.info.service;

import com.alibaba.cola.dto.PageResponse;
import com.alibaba.cola.dto.SingleResponse;
import com.zcloud.basic.info.api.CorpQualificationInfoServiceI;
import com.zcloud.basic.info.command.CorpQualificationInfoAddExe;
import com.zcloud.basic.info.command.CorpQualificationInfoRemoveExe;
import com.zcloud.basic.info.command.CorpQualificationInfoUpdateExe;
import com.zcloud.basic.info.command.query.CorpQualificationInfoQueryExe;
import com.zcloud.basic.info.dto.CorpQualificationInfoAddCmd;
import com.zcloud.basic.info.dto.CorpQualificationInfoPageQry;
import com.zcloud.basic.info.dto.CorpQualificationInfoUpdateCmd;
import com.zcloud.basic.info.dto.clientobject.CorpQualificationInfoCO;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * web-app
 *
 * @Author zhaokai
 * @Date 2025-10-29 16:02:46
 */
@Service
@AllArgsConstructor
public class CorpQualificationInfoServiceImpl implements CorpQualificationInfoServiceI {
    private final CorpQualificationInfoAddExe corpQualificationInfoAddExe;
    private final CorpQualificationInfoUpdateExe corpQualificationInfoUpdateExe;
    private final CorpQualificationInfoRemoveExe corpQualificationInfoRemoveExe;
    private final CorpQualificationInfoQueryExe corpQualificationInfoQueryExe;

    @Override
    public PageResponse<CorpQualificationInfoCO> listPage(CorpQualificationInfoPageQry qry) {

        return corpQualificationInfoQueryExe.execute(qry);
    }

    @Override
    public SingleResponse add(CorpQualificationInfoAddCmd cmd) {

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

    @Override
    public void edit(CorpQualificationInfoUpdateCmd corpQualificationInfoUpdateCmd) {
        corpQualificationInfoUpdateExe.execute(corpQualificationInfoUpdateCmd);
    }

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

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

    @Override
    public CorpQualificationInfoCO getInfoById(Long id) {
        return corpQualificationInfoQueryExe.getInfoById(id);
    }
}

