添加功能

This commit is contained in:
马宝龙
2026-07-02 12:41:10 +08:00
parent 1e27484e54
commit 24263eddd1
6 changed files with 476 additions and 0 deletions

View File

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