|  |  |  | 
|---|
|  |  |  | package com.ruoyi.project.controller; | 
|---|
|  |  |  | package com.ruoyi.web.controller.project; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.Arrays; | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 专家费用Controller | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @author ruoyi | 
|---|
|  |  |  | * @date 2022-04-19 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Slf4j | 
|---|
|  |  |  | @Api("专家费用") | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | @RequestMapping("/project/expertfeetype") | 
|---|
|  |  |  | public class BaseExpertfeetypeController extends BaseController | 
|---|
|  |  |  | { | 
|---|
|  |  |  | public class BaseExpertfeetypeController extends BaseController { | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private IBaseExpertfeetypeService baseExpertfeetypeService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiOperation("查询专家费用列表") | 
|---|
|  |  |  | @GetMapping("/list") | 
|---|
|  |  |  | public TableDataInfo list(BaseExpertfeetype baseExpertfeetype) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | public TableDataInfo list(BaseExpertfeetype baseExpertfeetype) { | 
|---|
|  |  |  | log.info("查询专家费用列表{}:", baseExpertfeetype); | 
|---|
|  |  |  | startPage(); | 
|---|
|  |  |  | List<BaseExpertfeetype> list = baseExpertfeetypeService.queryList(baseExpertfeetype); | 
|---|
|  |  |  | return getDataTable(list); | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiOperation("导出专家费用列表") | 
|---|
|  |  |  | @Log(title = "专家费用", businessType = BusinessType.EXPORT) | 
|---|
|  |  |  | @GetMapping("/export") | 
|---|
|  |  |  | public AjaxResult export(BaseExpertfeetype baseExpertfeetype) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | public AjaxResult export(BaseExpertfeetype baseExpertfeetype) { | 
|---|
|  |  |  | log.info("导出专家费用列表{}:", baseExpertfeetype); | 
|---|
|  |  |  | List<BaseExpertfeetype> list = baseExpertfeetypeService.queryList(baseExpertfeetype); | 
|---|
|  |  |  | ExcelUtil<BaseExpertfeetype> util = new ExcelUtil<BaseExpertfeetype>(BaseExpertfeetype.class); | 
|---|
|  |  |  | return util.exportExcel(list, "专家费用数据"); | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiOperation("获取专家费用详细信息") | 
|---|
|  |  |  | @GetMapping(value = "/{id}") | 
|---|
|  |  |  | public AjaxResult getInfo(@PathVariable("id") Long id) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | public AjaxResult getInfo(@PathVariable("id") Long id) { | 
|---|
|  |  |  | log.info("获取专家费用详细信息{}:", id); | 
|---|
|  |  |  | return AjaxResult.success(baseExpertfeetypeService.getById(id)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiOperation("新增专家费用") | 
|---|
|  |  |  | @Log(title = "专家费用", businessType = BusinessType.INSERT) | 
|---|
|  |  |  | @PostMapping | 
|---|
|  |  |  | @PostMapping("/add") | 
|---|
|  |  |  | @RepeatSubmit | 
|---|
|  |  |  | public AjaxResult add(@RequestBody BaseExpertfeetype baseExpertfeetype) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | return toAjax(baseExpertfeetypeService.save(baseExpertfeetype)); | 
|---|
|  |  |  | public AjaxResult add(@RequestBody BaseExpertfeetype baseExpertfeetype) { | 
|---|
|  |  |  | log.info("新增专家费用{}:", baseExpertfeetype); | 
|---|
|  |  |  | boolean save = baseExpertfeetypeService.save(baseExpertfeetype); | 
|---|
|  |  |  | log.info("返回的baseExpertfeetype的id:{}:", baseExpertfeetype.getId()); | 
|---|
|  |  |  | return AjaxResult.success(baseExpertfeetype); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiOperation("修改专家费用") | 
|---|
|  |  |  | @Log(title = "专家费用", businessType = BusinessType.UPDATE) | 
|---|
|  |  |  | @PutMapping | 
|---|
|  |  |  | @RepeatSubmit | 
|---|
|  |  |  | public AjaxResult edit(@RequestBody BaseExpertfeetype baseExpertfeetype) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | @PostMapping("/edit") | 
|---|
|  |  |  | @RepeatSubmit | 
|---|
|  |  |  | public AjaxResult edit(@RequestBody BaseExpertfeetype baseExpertfeetype) { | 
|---|
|  |  |  | log.info("修改专家费用{}:", baseExpertfeetype); | 
|---|
|  |  |  | return toAjax(baseExpertfeetypeService.updateById(baseExpertfeetype)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiOperation("删除专家费用") | 
|---|
|  |  |  | @Log(title = "专家费用", businessType = BusinessType.DELETE) | 
|---|
|  |  |  | @DeleteMapping("/{ids}") | 
|---|
|  |  |  | public AjaxResult remove(@PathVariable Long[] ids) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | @DeleteMapping("/remove/{ids}") | 
|---|
|  |  |  | public AjaxResult remove(@PathVariable Long[] ids) { | 
|---|
|  |  |  | log.info("删除专家费用{}:", ids); | 
|---|
|  |  |  | return toAjax(baseExpertfeetypeService.removeByIds(Arrays.asList(ids))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|