liusheng
2024-05-16 e4be2c5217419ffc959efbab04f5692af150f538
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceDonateconsolationfundController.java
@@ -2,6 +2,7 @@
import java.util.Arrays;
import java.util.List;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -26,15 +27,14 @@
/**
 * 资金申请主表Controller
 *
 *
 * @author ruoyi
 * @date 2022-01-18
 */
@Api("资金申请主表")
@RestController
@RequestMapping("/project/donateconsolationfund")
public class ServiceDonateconsolationfundController extends BaseController
{
public class ServiceDonateconsolationfundController extends BaseController {
    @Autowired
    private IServiceDonateconsolationfundService serviceDonateconsolationfundService;
@@ -43,8 +43,7 @@
     */
    @ApiOperation("查询资金申请主表列表")
    @GetMapping("/list")
    public TableDataInfo list(ServiceDonateconsolationfund serviceDonateconsolationfund)
    {
    public TableDataInfo list(ServiceDonateconsolationfund serviceDonateconsolationfund) {
        startPage();
        List<ServiceDonateconsolationfund> list = serviceDonateconsolationfundService.queryList(serviceDonateconsolationfund);
        return getDataTable(list);
@@ -56,8 +55,7 @@
    @ApiOperation("导出资金申请主表列表")
    @Log(title = "资金申请主表", businessType = BusinessType.EXPORT)
    @GetMapping("/export")
    public AjaxResult export(ServiceDonateconsolationfund serviceDonateconsolationfund)
    {
    public AjaxResult export(ServiceDonateconsolationfund serviceDonateconsolationfund) {
        List<ServiceDonateconsolationfund> list = serviceDonateconsolationfundService.queryList(serviceDonateconsolationfund);
        ExcelUtil<ServiceDonateconsolationfund> util = new ExcelUtil<ServiceDonateconsolationfund>(ServiceDonateconsolationfund.class);
        return util.exportExcel(list, "资金申请主表数据");
@@ -68,8 +66,7 @@
     */
    @ApiOperation("获取资金申请主表详细信息")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        return AjaxResult.success(serviceDonateconsolationfundService.getById(id));
    }
@@ -78,11 +75,11 @@
     */
    @ApiOperation("新增资金申请主表")
    @Log(title = "资金申请主表", businessType = BusinessType.INSERT)
    @PostMapping
    @PostMapping("/add")
    @RepeatSubmit
    public AjaxResult add(@RequestBody ServiceDonateconsolationfund serviceDonateconsolationfund)
    {
        return toAjax(serviceDonateconsolationfundService.save(serviceDonateconsolationfund));
    public AjaxResult add(@RequestBody ServiceDonateconsolationfund serviceDonateconsolationfund) {
        boolean save = serviceDonateconsolationfundService.save(serviceDonateconsolationfund);
        return AjaxResult.success(serviceDonateconsolationfund);
    }
    /**
@@ -90,10 +87,9 @@
     */
    @ApiOperation("修改资金申请主表")
    @Log(title = "资金申请主表", businessType = BusinessType.UPDATE)
    @PutMapping
    @RepeatSubmit
    public AjaxResult edit(@RequestBody ServiceDonateconsolationfund serviceDonateconsolationfund)
    {
    @PostMapping("/edit")
    @RepeatSubmit
    public AjaxResult edit(@RequestBody ServiceDonateconsolationfund serviceDonateconsolationfund) {
        return toAjax(serviceDonateconsolationfundService.updateById(serviceDonateconsolationfund));
    }
@@ -102,9 +98,8 @@
     */
    @ApiOperation("删除资金申请主表")
    @Log(title = "资金申请主表", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
    @GetMapping("/remove/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids) {
        return toAjax(serviceDonateconsolationfundService.removeByIds(Arrays.asList(ids)));
    }
}