package com.zcloud.primeport.service;

import com.zcloud.primeport.api.MkmjSwipeCardRecordServiceI;
import com.zcloud.primeport.command.MkmjSwipeCardRecordAddExe;
import com.zcloud.primeport.command.MkmjSwipeCardRecordRemoveExe;
import com.zcloud.primeport.command.MkmjSwipeCardRecordUpdateExe;
import com.zcloud.primeport.command.query.MkmjSwipeCardRecordQueryExe;
import com.zcloud.primeport.dto.MkmjSwipeCardRecordAddCmd;
import com.zcloud.primeport.dto.MkmjSwipeCardRecordPageQry;
import com.zcloud.primeport.dto.MkmjSwipeCardRecordUpdateCmd;
import com.zcloud.primeport.dto.clientobject.MkmjSwipeCardRecordCO;

import com.alibaba.cola.dto.PageResponse;
import com.alibaba.cola.dto.SingleResponse;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * web-app
 *
 * @Author dearLin
 * @Date 2026-04-22 17:04:01
 */
@Service
@AllArgsConstructor
public class MkmjSwipeCardRecordServiceImpl implements MkmjSwipeCardRecordServiceI {
    private final MkmjSwipeCardRecordAddExe mkmjSwipeCardRecordAddExe;
    private final MkmjSwipeCardRecordUpdateExe mkmjSwipeCardRecordUpdateExe;
    private final MkmjSwipeCardRecordRemoveExe mkmjSwipeCardRecordRemoveExe;
    private final MkmjSwipeCardRecordQueryExe mkmjSwipeCardRecordQueryExe;

    @Override
    public MkmjSwipeCardRecordCO queryById(Long id) {
        return mkmjSwipeCardRecordQueryExe.queryById(id);
    }

    @Override
    public PageResponse<MkmjSwipeCardRecordCO> listPage(MkmjSwipeCardRecordPageQry qry) {

        return mkmjSwipeCardRecordQueryExe.execute(qry);
    }

    @Override
    public SingleResponse add(MkmjSwipeCardRecordAddCmd cmd) {

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

    @Override
    public void edit(MkmjSwipeCardRecordUpdateCmd mkmjSwipeCardRecordUpdateCmd) {
        mkmjSwipeCardRecordUpdateExe.execute(mkmjSwipeCardRecordUpdateCmd);
    }

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

    @Override
    public void removeBatch(List<Long> ids) {
        mkmjSwipeCardRecordRemoveExe.execute(ids);
    }
}

