package com.zcloud.basic.info.service;

import com.alibaba.cola.dto.MultiResponse;
import com.alibaba.cola.dto.PageResponse;
import com.alibaba.cola.dto.SingleResponse;
import com.zcloud.basic.info.api.UserEmploymentLogServiceI;
import com.zcloud.basic.info.command.UserEmploymentLogAddExe;
import com.zcloud.basic.info.command.UserEmploymentLogRemoveExe;
import com.zcloud.basic.info.command.UserEmploymentLogUpdateExe;
import com.zcloud.basic.info.command.query.UserEmploymentLogQueryExe;
import com.zcloud.basic.info.dto.UserEmploymentLogAddCmd;
import com.zcloud.basic.info.dto.UserEmploymentLogPageQry;
import com.zcloud.basic.info.dto.UserEmploymentLogQryCmd;
import com.zcloud.basic.info.dto.UserEmploymentLogUpdateCmd;
import com.zcloud.basic.info.dto.clientobject.UserEmploymentLogCO;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * web-app
 *
 * @Author zhangyue
 * @Date 2025-11-06 19:15:37
 */
@Service
@AllArgsConstructor
public class UserEmploymentLogServiceImpl implements UserEmploymentLogServiceI {
    private final UserEmploymentLogAddExe userEmploymentLogAddExe;
    private final UserEmploymentLogUpdateExe userEmploymentLogUpdateExe;
    private final UserEmploymentLogRemoveExe userEmploymentLogRemoveExe;
    private final UserEmploymentLogQueryExe userEmploymentLogQueryExe;

    @Override
    public PageResponse<UserEmploymentLogCO> listPage(UserEmploymentLogPageQry qry) {

        return userEmploymentLogQueryExe.execute(qry);
    }

    @Override
    public SingleResponse add(UserEmploymentLogAddCmd cmd) {

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

    @Override
    public void edit(UserEmploymentLogUpdateCmd userEmploymentLogUpdateCmd) {
        userEmploymentLogUpdateExe.execute(userEmploymentLogUpdateCmd);
    }

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

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

    @Override
    public MultiResponse<UserEmploymentLogCO> listAll(UserEmploymentLogQryCmd qry) {
        return userEmploymentLogQueryExe.executeListAll(qry);
    }
}

