package com.zcloud.basic.info.service;

import com.alibaba.cola.dto.PageResponse;
import com.alibaba.cola.dto.SingleResponse;
import com.jjb.saas.framework.auth.utils.AuthContext;
import com.zcloud.basic.info.api.CorpInfoXgfServiceI;
import com.zcloud.basic.info.command.CorpInfoXgfAddExe;
import com.zcloud.basic.info.command.CorpInfoXgfRemoveExe;
import com.zcloud.basic.info.command.CorpInfoXgfUpdateExe;
import com.zcloud.basic.info.command.query.CorpInfoXgfQueryExe;
import com.zcloud.basic.info.dto.CorpInfoXgfAddCmd;
import com.zcloud.basic.info.dto.CorpInfoXgfPageQry;
import com.zcloud.basic.info.dto.CorpInfoXgfUpdateCmd;
import com.zcloud.basic.info.dto.clientobject.CorpInfoXgfCO;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * web-app
 *
 * @Author zhaokai
 * @Date 2025-10-31 10:56:46
 */
@Service
@AllArgsConstructor
public class CorpInfoXgfServiceImpl implements CorpInfoXgfServiceI {
    private final CorpInfoXgfAddExe corpInfoXgfAddExe;
    private final CorpInfoXgfUpdateExe corpInfoXgfUpdateExe;
    private final CorpInfoXgfRemoveExe corpInfoXgfRemoveExe;
    private final CorpInfoXgfQueryExe corpInfoXgfQueryExe;

    @Override
    public PageResponse<CorpInfoXgfCO> listPage(CorpInfoXgfPageQry qry) {

        return corpInfoXgfQueryExe.execute(qry);
    }

    @Override
    public SingleResponse add(CorpInfoXgfAddCmd cmd) {
        corpInfoXgfAddExe.execute(cmd);
        return SingleResponse.buildSuccess();
    }

    @Override
    public void edit(CorpInfoXgfUpdateCmd corpInfoXgfUpdateCmd) {
        corpInfoXgfUpdateExe.execute(corpInfoXgfUpdateCmd);
    }

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

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

    @Override
    public CorpInfoXgfCO info(Long id) {
        return corpInfoXgfQueryExe.info(id);
    }
}

