添加功能
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
package com.ruoyi.cms.controller;
|
||||
|
||||
import com.ruoyi.cms.domain.ModelUnemploymentWarningDiffusion;
|
||||
import com.ruoyi.cms.service.ModelUnemploymentWarningDiffusionService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
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.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 失业预警扩散指数管理
|
||||
*
|
||||
* @author 马宝龙
|
||||
* @date 2026/7/2
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/model/unemploymentWarningDiffusion")
|
||||
@RequiredArgsConstructor
|
||||
public class ModelUnemploymentWarningDiffusionController extends BaseController {
|
||||
|
||||
private final ModelUnemploymentWarningDiffusionService modelUnemploymentWarningDiffusionService;
|
||||
|
||||
/**
|
||||
* 创建
|
||||
*
|
||||
* @param modelUnemploymentWarningDiffusion 失业预警扩散指数
|
||||
* @return 创建结果
|
||||
*/
|
||||
@PostMapping("/create")
|
||||
public AjaxResult create(@Valid @RequestBody ModelUnemploymentWarningDiffusion modelUnemploymentWarningDiffusion) {
|
||||
modelUnemploymentWarningDiffusionService.create(modelUnemploymentWarningDiffusion);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param modelUnemploymentWarningDiffusion 失业预警扩散指数
|
||||
* @return 更新结果
|
||||
*/
|
||||
@PutMapping("/update")
|
||||
public AjaxResult update(@Valid @RequestBody ModelUnemploymentWarningDiffusion modelUnemploymentWarningDiffusion) {
|
||||
modelUnemploymentWarningDiffusionService.update(modelUnemploymentWarningDiffusion);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param id ID
|
||||
* @return 删除结果
|
||||
*/
|
||||
@DeleteMapping("/delete")
|
||||
public AjaxResult delete(@RequestParam Long id) {
|
||||
modelUnemploymentWarningDiffusionService.delete(id);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询详情
|
||||
*
|
||||
* @param id ID
|
||||
* @return 失业预警扩散指数
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public AjaxResult detail(@RequestParam Long id) {
|
||||
ModelUnemploymentWarningDiffusion diffusion = modelUnemploymentWarningDiffusionService.detail(id);
|
||||
return AjaxResult.success(diffusion);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分页列表
|
||||
*
|
||||
* @param modelUnemploymentWarningDiffusion 失业预警扩散指数
|
||||
* @return 分页列表
|
||||
*/
|
||||
@PostMapping("/page")
|
||||
@ResponseBody
|
||||
public TableDataInfo page(@RequestBody ModelUnemploymentWarningDiffusion modelUnemploymentWarningDiffusion) {
|
||||
startPage();
|
||||
List<ModelUnemploymentWarningDiffusion> list = modelUnemploymentWarningDiffusionService.list(modelUnemploymentWarningDiffusion);
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user