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

import com.tmerclub.cloud.common.response.ServerResponseEntity;
import com.tmerclub.cloud.multishop.service.ShopDetailService;
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("adminShopDetailController")
@RequestMapping("/mp/shopDetail")
@Tag(name = "admin-店铺信息")
public class ShopDetailController {

    @Autowired
    private ShopDetailService shopDetailService;

    @GetMapping("/checkShopName")
    @Operation(summary = "检查店铺名称是否已存在", description = "检查店铺名称是否已存在")
    public ServerResponseEntity<Boolean> checkShopName(@RequestParam("shopName") String shopName) {
        Boolean res = shopDetailService.checkShopName(shopName);
        return ServerResponseEntity.success(res);
    }

}
