package com.zcloud.basic.info.service;

import com.alibaba.cola.dto.PageResponse;
import com.alibaba.cola.dto.SingleResponse;
import com.zcloud.basic.info.api.UserExpandInfoServiceI;
import com.zcloud.basic.info.command.UserExpandInfoAddExe;
import com.zcloud.basic.info.command.UserExpandInfoRemoveExe;
import com.zcloud.basic.info.command.UserExpandInfoUpdateExe;
import com.zcloud.basic.info.command.query.UserExpandInfoQueryExe;
import com.zcloud.basic.info.dto.UserExpandInfoAddCmd;
import com.zcloud.basic.info.dto.UserExpandInfoPageQry;
import com.zcloud.basic.info.dto.UserExpandInfoUpdateCmd;
import com.zcloud.basic.info.dto.clientobject.UserExpandInfoCO;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * web-app
 *
 * @Author zhaokai
 * @Date 2026-01-05 14:12:19
 */
@Service
@AllArgsConstructor
public class UserExpandInfoServiceImpl implements UserExpandInfoServiceI {
    private final UserExpandInfoAddExe userExpandInfoAddExe;
    private final UserExpandInfoUpdateExe userExpandInfoUpdateExe;
    private final UserExpandInfoRemoveExe userExpandInfoRemoveExe;
    private final UserExpandInfoQueryExe userExpandInfoQueryExe;

    @Override
    public PageResponse<UserExpandInfoCO> listPage(UserExpandInfoPageQry qry) {

        return userExpandInfoQueryExe.execute(qry);
    }

    @Override
    public SingleResponse add(UserExpandInfoAddCmd cmd) {

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

    @Override
    public void edit(UserExpandInfoUpdateCmd userExpandInfoUpdateCmd) {
        userExpandInfoUpdateExe.execute(userExpandInfoUpdateCmd);
    }

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

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

