package com.zcloud.basic.info.service;

import com.alibaba.cola.dto.MultiResponse;
import com.zcloud.basic.info.api.UserJobHandoverServiceI;
import com.zcloud.basic.info.command.UserJobHandoverAddExe;
import com.zcloud.basic.info.command.UserJobHandoverRemoveExe;
import com.zcloud.basic.info.command.UserJobHandoverUpdateExe;
import com.zcloud.basic.info.command.query.UserJobHandoverQueryExe;
import com.zcloud.basic.info.dto.UserJobHandoverAddCmd;
import com.zcloud.basic.info.dto.UserJobHandoverPageQry;
import com.zcloud.basic.info.dto.UserJobHandoverListQry;
import com.zcloud.basic.info.dto.UserJobHandoverUpdateCmd;
import com.zcloud.basic.info.dto.clientobject.UserJobHandoverCO;

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-02 14:08:57
 */
@Service
@AllArgsConstructor
public class UserJobHandoverServiceImpl implements UserJobHandoverServiceI {
    private final UserJobHandoverAddExe userJobHandoverAddExe;
    private final UserJobHandoverUpdateExe userJobHandoverUpdateExe;
    private final UserJobHandoverRemoveExe userJobHandoverRemoveExe;
    private final UserJobHandoverQueryExe userJobHandoverQueryExe;

    @Override
    public PageResponse<UserJobHandoverCO> listPage(UserJobHandoverPageQry qry) {
        return userJobHandoverQueryExe.execute(qry);
    }

    @Override
    public MultiResponse<UserJobHandoverCO> list(UserJobHandoverListQry qry) {
        return userJobHandoverQueryExe.execute(qry);
    }

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

    @Override
    public SingleResponse add(UserJobHandoverAddCmd cmd) {
        userJobHandoverAddExe.execute(cmd);
        return SingleResponse.buildSuccess();
    }

    @Override
    public void edit(UserJobHandoverUpdateCmd cmd) {
        userJobHandoverUpdateExe.execute(cmd);
    }

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

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

