package com.ruoyi.web.bst; import java.util.List; import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.ruoyi.bst.pay.domain.PayQuery; import com.ruoyi.bst.pay.domain.PayVO; import com.ruoyi.bst.pay.service.PayService; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.poi.ExcelUtil; /** * 支付订单Controller * * @author ruoyi * @date 2025-03-26 */ @RestController @RequestMapping("/bst/pay") public class PayController extends BaseController { @Autowired private PayService payService; /** * 查询支付订单列表 */ @PreAuthorize("@ss.hasPermi('bst:pay:list')") @GetMapping("/list") public TableDataInfo list(PayQuery query) { startPage(); startOrderBy(); List list = payService.selectPayList(query); return getDataTable(list); } /** * 导出支付订单列表 */ @PreAuthorize("@ss.hasPermi('bst:pay:export')") @Log(title = "支付订单", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, PayQuery query) { List list = payService.selectPayList(query); ExcelUtil util = new ExcelUtil(PayVO.class); util.exportExcel(response, list, "支付订单数据"); } /** * 获取支付订单详细信息 */ @PreAuthorize("@ss.hasPermi('bst:pay:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return success(payService.selectPayById(id)); } }