package com.hc.web.controller.browser.front;

import com.hc.business.service.MsgsAttachmentService;
import com.hc.core.utils.result.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;


/**
 * (MsgsAttachment)表控制层
 *
 * @author makejava
 * @since 2024-02-29 18:52:26
 */

@RestController
@RequestMapping("/new/api/front/msgsAttachment")
public class FrontMsgsAttachmentController {

    /**
     * 服务对象
     */
    private final MsgsAttachmentService msgsAttachmentService;

    public FrontMsgsAttachmentController(MsgsAttachmentService msgsAttachmentService) {
        this.msgsAttachmentService = msgsAttachmentService;
    }



    @GetMapping("/queryByMsgId")
    @ApiOperation(value = "根据ID获取他的附件", response = Result.class)
    public Result queryByMsgId(@RequestParam(defaultValue = "0") Integer msgId) {
        return Result.success(msgsAttachmentService.queryByMsgId(msgId));
    }


}
