package com.muyu.system.controller;

import com.muyu.common.core.domain.Result;
import com.muyu.common.system.domain.Firm;
import com.muyu.system.service.FirmService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author：张腾
 * @Package：com.muyu.system.controller
 * @Project：cloud-server-8
 * @name：FirmController
 * @Date：2024/9/25 22:18
 */
@RestController
@RequestMapping("/firm")
@AllArgsConstructor
public class FirmController {

    private final FirmService firmService;


    @RequestMapping("/findByFirmName/{firmName}")
    public Result<Firm> findByFirmName(@PathVariable("firmName") String firmName){
        Firm firmServiceByFirmName = firmService.findByFirmName(firmName);
        return Result.success(firmServiceByFirmName);
    }
}
