package com.ruoyi.web.app;

import com.ruoyi.bst.lightingNum.domain.LightingNumQuery;
import com.ruoyi.bst.lightingNum.service.LightingNumService;
import com.ruoyi.bst.order.domain.dto.OrderCreateDTO;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import io.swagger.annotations.ApiOperation;
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.RestController;

@RestController
@RequestMapping("/app/lightingNum")
public class AppLightingNumController extends BaseController {

    @Autowired
    private LightingNumService lightingNumService;

    @ApiOperation("用户查询自己的爆灯次数")
    @GetMapping("/userLightingNum")
    public AjaxResult userLightingNum(LightingNumQuery query) {
        query.setUserId(getUserId());
        return AjaxResult.success(lightingNumService.selectOne(query));
    }


}
