package com.xindazhou.message.api;

import com.xindazhou.framework.common.pojo.CommonResult;
import com.xindazhou.message.api.dto.record.MessageRecordRespDTO;
import com.xindazhou.message.service.MessageRecordService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;

import jakarta.annotation.Resource;

import static com.xindazhou.framework.common.pojo.CommonResult.success;

/**
 * 消息记录 API 实现类
 *
 * @author xindazhou
 */
@RestController
@Validated
public class MessageRecordApiImpl implements MessageRecordApi {

    @Resource
    private MessageRecordService messageRecordService;

    @Override
    public CommonResult<MessageRecordRespDTO> getMessageRecord(Long id) {
        // TODO: 实现消息记录查询逻辑
        MessageRecordRespDTO record = messageRecordService.getMessageRecord(id);
        return success(record);
    }

}

