package com.ruoyi.web.controller.shyj; import java.util.List; import javax.servlet.http.HttpServletResponse; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.system.domain.ZhxyShyj; import com.ruoyi.system.service.IZhxyShyjService; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.core.page.TableDataInfo; /** * 智慧校园_审核意见Controller * * @author ruoyi * @date 2023-05-30 */ @RestController @RequestMapping("/audit/shyj") public class ZhxyShyjController extends BaseController { @Autowired private IZhxyShyjService zhxyShyjService; /** * 查询智慧校园_审核意见列表 */ @PreAuthorize("@ss.hasPermi('audit:shyj:list')") @GetMapping("/list") public TableDataInfo list(ZhxyShyj zhxyShyj) { startPage(); List list = zhxyShyjService.selectZhxyShyjList(zhxyShyj); return getDataTable(list); } /** * 导出智慧校园_审核意见列表 */ @PreAuthorize("@ss.hasPermi('audit:shyj:export')") @Log(title = "智慧校园_审核意见", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, ZhxyShyj zhxyShyj) { List list = zhxyShyjService.selectZhxyShyjList(zhxyShyj); ExcelUtil util = new ExcelUtil(ZhxyShyj.class); util.exportExcel(response, list, "智慧校园_审核意见数据"); } /** * 获取智慧校园_审核意见详细信息 */ @PreAuthorize("@ss.hasPermi('audit:shyj:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return success(zhxyShyjService.selectZhxyShyjById(id)); } /** * 新增智慧校园_审核意见 */ @PreAuthorize("@ss.hasPermi('audit:shyj:add')") @Log(title = "智慧校园_审核意见", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody ZhxyShyj zhxyShyj) { return toAjax(zhxyShyjService.insertZhxyShyj(zhxyShyj)); } /** * 修改智慧校园_审核意见 */ @PreAuthorize("@ss.hasPermi('audit:shyj:edit')") @Log(title = "智慧校园_审核意见", businessType = BusinessType.UPDATE) @PostMapping("/put") public AjaxResult edit(@RequestBody ZhxyShyj zhxyShyj) { return toAjax(zhxyShyjService.updateZhxyShyj(zhxyShyj)); } /** * 删除智慧校园_审核意见 */ @PreAuthorize("@ss.hasPermi('audit:shyj:remove')") @Log(title = "智慧校园_审核意见", businessType = BusinessType.DELETE) @GetMapping("/delete/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(zhxyShyjService.deleteZhxyShyjByIds(ids)); } }