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

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


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

@RestController
@RequestMapping("/new/api/app/msgsAttachment")
public class AppMsgsAttachmentController {

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

    public AppMsgsAttachmentController(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));
    }


}
