package com.gkhy.exam.pay.controller; import com.gkhy.exam.pay.entity.NonCoalPay; import com.gkhy.exam.pay.service.NonCoalPayService; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; /** * 【请填写功能名称】Controller * * @author hh * @date 2025-01-16 */ @RestController @RequestMapping("/exam/pay") public class NonCoalPayController extends BaseController { @Autowired private NonCoalPayService nonCoalPayService; /** * 查询【请填写功能名称】列表 */ @GetMapping("/list") public TableDataInfo list(NonCoalPay nonCoalPay) { startPage(); List list = nonCoalPayService.selectNonCoalPayList(nonCoalPay); return getDataTable(list); } /** * 导出【请填写功能名称】列表 */ // @PostMapping("/export") // public void export(HttpServletResponse response, NonCoalPay nonCoalPay) { // List list = nonCoalPayService.selectNonCoalPayList(nonCoalPay); // ExcelUtil util = new ExcelUtil(NonCoalPay.class); // util.exportExcel(response, list, "【请填写功能名称】数据"); // } /** * 获取【请填写功能名称】详细信息 */ @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return success(nonCoalPayService.selectNonCoalPayById(id)); } /** * 新增【请填写功能名称】 */ @PostMapping public AjaxResult add(@RequestBody NonCoalPay nonCoalPay) { return toAjax(nonCoalPayService.insertNonCoalPay(nonCoalPay)); } /** * 修改【请填写功能名称】 */ @PutMapping public AjaxResult edit(@RequestBody NonCoalPay nonCoalPay) { return toAjax(nonCoalPayService.updateNonCoalPay(nonCoalPay)); } /** * 删除【请填写功能名称】 */ @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(nonCoalPayService.deleteNonCoalPayByIds(ids)); } }