package cn.axzo.msg.center.inside.notices.service.impl;

import cn.axzo.msg.center.api.GeneralMessageApi;
import cn.axzo.msg.center.api.request.GeneralMessagePushReq;
import cn.axzo.msg.center.api.response.ReachResp;
import cn.axzo.msg.center.message.domain.param.GeneralMessagePushParam;
import cn.axzo.msg.center.message.service.CommonMessageRecordService;
import cn.azxo.framework.common.model.CommonResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author syl
 * @date 2024/1/8
 */
@Slf4j
@RestController
public class GeneralMessageApiImpl implements GeneralMessageApi {

    @Autowired
    private CommonMessageRecordService commonMessageRecordService;
    @Override
    public CommonResponse<ReachResp> reachGeneralMsg(GeneralMessagePushReq param) {
        // // TODO: 2024/1/10
        ReachResp result = commonMessageRecordService.reach(GeneralMessagePushParam.from(param));
        return CommonResponse.success(result);
    }
}
