package com.muyu.server.controller;


import com.muyu.common.core.domain.Result;
import com.muyu.server.service.TemplateNeedService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 查询报文模版
 * @author sx
 * @Package：com.template.controller
 * @name：templateNeed
 * @Date：2024/9/20 12:12
 */

@RestController
@RequestMapping("/templateNeed")
@Tag(name = "查询报文模版",description = "查询报文模版")
@Log4j2
public class TemplateNeedController {
    @Autowired
    private TemplateNeedService templateNeedService;


    @GetMapping("/selectByTemplateId/{templateId}")
    @Operation(summary = "根据模板ID查询报文模版",description = "根据模板ID查询报文模版")
    public Result selectByTemplateId(@PathVariable("templateId") Long templateId){
        return Result.success(templateNeedService.selectByTemplateId(templateId));
    }
}
