| | |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | * @author ruoyi |
| | | * @date 2021-11-10 |
| | | */ |
| | | @Slf4j |
| | | @Api("捐献要求附件管理") |
| | | @RestController |
| | | @RequestMapping("/project/donateannexrequirement") |
| | |
| | | * 查询捐献附件要求列表 |
| | | */ |
| | | @ApiOperation("捐献要求附件管理列表") |
| | | //@PreAuthorize("@ss.hasPermi('project:donateannexrequirement:list')") |
| | | //// @PreAuthorize("@ss.hasPermi('project:donateannexrequirement:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ServiceDonateannexrequirement serviceDonateannexrequirement) { |
| | | log.info("捐献要求附件管理列表:{}", serviceDonateannexrequirement); |
| | | startPage(); |
| | | List<ServiceDonateannexrequirement> list = serviceDonateannexrequirementService.queryList(serviceDonateannexrequirement); |
| | | return getDataTable(list); |
| | |
| | | * 导出捐献附件要求列表 |
| | | */ |
| | | @ApiOperation("导出捐献要求附件管理列表") |
| | | //@PreAuthorize("@ss.hasPermi('project:donateannexrequirement:export')") |
| | | //// @PreAuthorize("@ss.hasPermi('project:donateannexrequirement:export')") |
| | | @Log(title = "捐献附件要求", businessType = BusinessType.EXPORT) |
| | | @GetMapping("/export") |
| | | public AjaxResult export(ServiceDonateannexrequirement serviceDonateannexrequirement) { |
| | | log.info("导出捐献要求附件管理列表:{}", serviceDonateannexrequirement); |
| | | List<ServiceDonateannexrequirement> list = serviceDonateannexrequirementService.queryList(serviceDonateannexrequirement); |
| | | ExcelUtil<ServiceDonateannexrequirement> util = new ExcelUtil<ServiceDonateannexrequirement>(ServiceDonateannexrequirement.class); |
| | | return util.exportExcel(list, "捐献附件要求数据"); |
| | |
| | | * 获取捐献附件要求详细信息 |
| | | */ |
| | | @ApiOperation("通过id获取捐献要求附件") |
| | | //@PreAuthorize("@ss.hasPermi('project:donateannexrequirement:query')") |
| | | //// @PreAuthorize("@ss.hasPermi('project:donateannexrequirement:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | log.info("通过id获取捐献要求附件:{}", id); |
| | | return AjaxResult.success(serviceDonateannexrequirementService.getById(id)); |
| | | } |
| | | |
| | |
| | | * 新增捐献附件要求 |
| | | */ |
| | | @ApiOperation("新增捐献要求附件信息") |
| | | //@PreAuthorize("@ss.hasPermi('project:donateannexrequirement:add')") |
| | | //// @PreAuthorize("@ss.hasPermi('project:donateannexrequirement:add')") |
| | | @Log(title = "捐献附件要求", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | @PostMapping("/add") |
| | | @RepeatSubmit |
| | | public AjaxResult add(@RequestBody ServiceDonateannexrequirement serviceDonateannexrequirement) { |
| | | return toAjax(serviceDonateannexrequirementService.save(serviceDonateannexrequirement)); |
| | | log.info("新增捐献要求附件信息:{}", serviceDonateannexrequirement); |
| | | boolean save = serviceDonateannexrequirementService.save(serviceDonateannexrequirement); |
| | | log.info("新增捐献要求附件信息serviceDonateannexrequirement的ID为:{}", serviceDonateannexrequirement); |
| | | return AjaxResult.success(serviceDonateannexrequirement); |
| | | } |
| | | |
| | | /** |
| | | * 修改捐献附件要求 |
| | | */ |
| | | @ApiOperation("修改捐献要求附件信息") |
| | | //@PreAuthorize("@ss.hasPermi('project:donateannexrequirement:edit')") |
| | | //// @PreAuthorize("@ss.hasPermi('project:donateannexrequirement:edit')") |
| | | @Log(title = "捐献附件要求", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/edit") |
| | | @RepeatSubmit |
| | | public AjaxResult edit(@RequestBody ServiceDonateannexrequirement serviceDonateannexrequirement) { |
| | | log.info("修改捐献要求附件信息:{}", serviceDonateannexrequirement); |
| | | return toAjax(serviceDonateannexrequirementService.updateById(serviceDonateannexrequirement)); |
| | | } |
| | | |
| | |
| | | * 删除捐献附件要求 |
| | | */ |
| | | @ApiOperation("删除捐献要求附件信息") |
| | | //@PreAuthorize("@ss.hasPermi('project:donateannexrequirement:remove')") |
| | | //// @PreAuthorize("@ss.hasPermi('project:donateannexrequirement:remove')") |
| | | @Log(title = "捐献附件要求", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | log.info("删除捐献要求附件信息:{}", ids); |
| | | return toAjax(serviceDonateannexrequirementService.removeByIds(Arrays.asList(ids))); |
| | | } |
| | | } |