package com.cool.store.controller.webb;

import com.cool.store.dto.MiniShopDTO;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.OpportunityPointService;
import com.cool.store.vo.point.MiniPointPageVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: WangShuo
 * @Date: 2025/04/02/18:44
 * @Version 1.0
 * @注释:
 */
@RestController
@Api(tags = "机会点详情")
@RequestMapping("/pc/opportunityPoint")
public class PCOpportunityPointController {
    @Resource
    private OpportunityPointService opportunityPointService;
    @GetMapping("/getPoints")
    @ApiModelProperty("根据机会点编号获取铺位信息")
    public ResponseResult<List<MiniPointPageVO> >getPointByOpportunityPointCode(String code) {
        return ResponseResult.success(opportunityPointService.getPointByOpportunityPointCode(code));
    }
    @GetMapping("/getShops")
    @ApiModelProperty("根据机会点编号获取门店信息")
    public ResponseResult<List<MiniShopDTO> >getShopByOpportunityPointCode(String code) {
        return ResponseResult.success(opportunityPointService.getShopByOpportunityPointCode(code));
    }
}
