package com.ycwl.basic.controller.pc;

import com.ycwl.basic.biz.PriceBiz;
import com.ycwl.basic.model.pc.price.resp.GoodsListRespVO;
import com.ycwl.basic.model.pc.price.resp.SimpleGoodsRespVO;
import com.ycwl.basic.utils.ApiResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/api/priceConfig/v1")
public class PriceConfigController {

    @Autowired
    private PriceBiz priceBiz;

    @GetMapping("/goodsList")
    public ApiResponse<List<SimpleGoodsRespVO>> goodsList(
            @RequestParam Long scenicId,
            @RequestParam(required = false) String productType) {
        return ApiResponse.success(priceBiz.listSimpleGoodsByScenic(scenicId, productType));
    }

}