package com.cyksj.web.controller.shop;

import com.cyksj.dto.Result;
import com.cyksj.enums.GatewayResponse;
import com.cyksj.model.dto.YhShopInfo;
import com.cyksj.service.shop.YhShopFrontService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zwhui
 * @date 2023/9/14 17:28
 */
@Slf4j
@RestController
@RequestMapping("/applets/shop")
@RequiredArgsConstructor
public class ShopController {

	private final YhShopFrontService yhShopFrontService;


	/**
	 * 店铺详情信息
	 */
	@GetMapping("/get/info")
	public Result<YhShopInfo> getYhShopInfo(String customId) {
		YhShopInfo yhShopInfo = yhShopFrontService.getYhShopInfo(customId);
		return GatewayResponse.SUCCESS.newBuilder().toResult(yhShopInfo);
	}

}
