添加功能

This commit is contained in:
马宝龙
2026-07-02 12:28:51 +08:00
parent 2eadb83fc8
commit 1e27484e54
11 changed files with 508 additions and 5 deletions

View File

@@ -0,0 +1,96 @@
package com.ruoyi.cms.controller;
import com.ruoyi.cms.domain.ModelUnemploymentRateMonitor;
import com.ruoyi.cms.service.ModelUnemploymentRateMonitorService;
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/unemploymentRateMonitor")
@RequiredArgsConstructor
public class ModelUnemploymentRateMonitorController extends BaseController {
private final ModelUnemploymentRateMonitorService modelUnemploymentRateMonitorService;
/**
* 创建
*
* @param modelUnemploymentRateMonitor 失业率监测
* @return 创建结果
*/
@PostMapping("/create")
public AjaxResult create(@Valid @RequestBody ModelUnemploymentRateMonitor modelUnemploymentRateMonitor) {
modelUnemploymentRateMonitorService.create(modelUnemploymentRateMonitor);
return AjaxResult.success();
}
/**
* 更新
*
* @param modelUnemploymentRateMonitor 失业率监测
* @return 更新结果
*/
@PutMapping("/update")
public AjaxResult update(@Valid @RequestBody ModelUnemploymentRateMonitor modelUnemploymentRateMonitor) {
modelUnemploymentRateMonitorService.update(modelUnemploymentRateMonitor);
return AjaxResult.success();
}
/**
* 删除
*
* @param id ID
* @return 删除结果
*/
@DeleteMapping("/delete")
public AjaxResult delete(@RequestParam Long id) {
modelUnemploymentRateMonitorService.delete(id);
return AjaxResult.success();
}
/**
* 查询详情
*
* @param id ID
* @return 失业率监测
*/
@GetMapping("/detail")
public AjaxResult detail(@RequestParam Long id) {
ModelUnemploymentRateMonitor monitor = modelUnemploymentRateMonitorService.detail(id);
return AjaxResult.success(monitor);
}
/**
* 查询分页列表
*
* @param modelUnemploymentRateMonitor 失业率监测
* @return 分页列表
*/
@PostMapping("/page")
@ResponseBody
public TableDataInfo page(@RequestBody ModelUnemploymentRateMonitor modelUnemploymentRateMonitor) {
startPage();
List<ModelUnemploymentRateMonitor> list = modelUnemploymentRateMonitorService.list(modelUnemploymentRateMonitor);
return getDataTable(list);
}
}