
package com.tmerclub.cloud.supplier.controller.admin;

import com.tmerclub.cloud.common.response.ServerResponseEntity;
import com.tmerclub.cloud.supplier.service.SupplierDetailService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
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;

/**
 * @Author lth
 * @Date 2021/8/14 16:45
 */
@RestController("adminSupplierDetailController")
@RequestMapping("/mp/supplier_detail")
@Tag(name = "admin-供应商供应商信息")
public class SupplierDetailController {

    @Autowired
    private SupplierDetailService supplierDetailService;

    @GetMapping("/check_supplier_shop_name")
    @Operation(summary = "检查供应商供应商名称是否已存在", description = "检查供应商供应商名称是否已存在")
    public ServerResponseEntity<Boolean> checkSupplierName(@RequestParam("supplierName") String supplierName) {
        Boolean res = supplierDetailService.checkSupplierName(supplierName);
        return ServerResponseEntity.success(res);
    }

}
