package com.czg.service.account.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.czg.account.dto.HandoverRecordDTO;
import com.czg.account.entity.HandoverRecord;
import com.czg.account.service.HandoverRecordRpcService;
import com.czg.service.account.mapper.HandoverRecordMapper;
import jakarta.annotation.Resource;
import org.apache.dubbo.config.annotation.DubboService;

/**
 * 交班记录RPC服务实现
 *
 * @author tankaikai
 * @since 2025-03-01 15:35
 */
@DubboService
public class HandoverRecordRpcServiceImpl implements HandoverRecordRpcService {

    @Resource
    private HandoverRecordMapper handoverRecordMapper;

    @Override
    public HandoverRecordDTO getHandoverRecordById(Long handoverRecordId) {
        HandoverRecord record = handoverRecordMapper.selectOneById(handoverRecordId);
        return BeanUtil.copyProperties(record, HandoverRecordDTO.class);
    }
}
