package com.fdkankan.ucenter.controller;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.fdkankan.ucenter.common.BaseController;
import com.fdkankan.ucenter.common.Result;
import com.fdkankan.ucenter.entity.Case;
import com.fdkankan.ucenter.service.ICaseService;
import com.fdkankan.ucenter.service.IProductService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 
 * @since 2022-10-13
 */
@RestController
@RequestMapping("/ucenter/product")
public class ProductController extends BaseController {

    @Autowired
    IProductService productService;

    @GetMapping("/getByKey/{typeKey}")
    public Result getByKey(@PathVariable String typeKey){
        return Result.success(productService.getByKey(typeKey));
    }

    @GetMapping("/getFreeCount/{num}/{sceneType}")
    public Result getFreeCount(@PathVariable String num,@PathVariable String sceneType){
        return Result.success(productService.getFreeCount(num,sceneType));
    }
}

