package com.starry.admin.modules.order.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.starry.admin.modules.order.module.vo.PlayOrderRewardQueryVo;
import com.starry.admin.modules.order.module.vo.PlayOrderRewardReturnVo;
import com.starry.admin.modules.order.service.IPlayOrderInfoService;
import com.starry.common.annotation.Log;
import com.starry.common.enums.BusinessType;
import com.starry.common.result.R;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


/**
 * 打赏订单
 *
 * @author admin
 * @since 2024-03-20
 */
@RestController
@RequestMapping("/order/reward/")
public class PlayOrderRewardInfoController {



    @Resource
    private IPlayOrderInfoService orderInfoService;


    //@PreAuthorize("@customSs.hasPermission('order:reward:list')")
    @Log(title = "查询打赏订单", businessType = BusinessType.INSERT)
    @PostMapping("/listByPage")
    public R queryRewardOrder(@Validated @RequestBody PlayOrderRewardQueryVo vo) {
        IPage<PlayOrderRewardReturnVo> page = orderInfoService.selectRewardOrderInfoByPage(vo);
        return R.ok(page);
    }


}
