123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- package com.phm.web.controller;
- import java.util.List;
- import javax.servlet.http.HttpServletResponse;
- import org.springframework.security.access.prepost.PreAuthorize;
- import org.springframework.beans.factory.annotation.Autowired;
- 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.DeleteMapping;
- import org.springframework.web.bind.annotation.PathVariable;
- import org.springframework.web.bind.annotation.RequestBody;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RestController;
- import com.phm.common.annotation.Log;
- import com.phm.common.core.controller.BaseController;
- import com.phm.common.core.domain.AjaxResult;
- import com.phm.common.enums.BusinessType;
- import com.phm.web.domain.DeepIsolationModel;
- import com.phm.web.service.IDeepIsolationModelService;
- import com.phm.common.utils.poi.ExcelUtil;
- import com.phm.common.core.page.TableDataInfo;
- /**
- * 深度隔离模型Controller
- *
- * @author phm
- * @date 2023-08-22
- */
- @RestController
- @RequestMapping("/manage/deepIsolationModel")
- public class DeepIsolationModelController extends BaseController {
- @Autowired
- private IDeepIsolationModelService deepIsolationModelService;
- /**
- * 查询深度隔离模型列表
- */
- @PreAuthorize("@ss.hasPermi('manage:deepIsolationModel:list')")
- @GetMapping("/list")
- public TableDataInfo list(DeepIsolationModel deepIsolationModel) {
- startPage();
- List<DeepIsolationModel> list = deepIsolationModelService.selectDeepIsolationModelList(deepIsolationModel);
- return getDataTable(list);
- }
- /**
- * 导出深度隔离模型列表
- */
- @PreAuthorize("@ss.hasPermi('manage:deepIsolationModel:export')")
- @Log(title = "深度隔离模型", businessType = BusinessType.EXPORT)
- @PostMapping("/export")
- public void export(HttpServletResponse response, DeepIsolationModel deepIsolationModel) {
- List<DeepIsolationModel> list = deepIsolationModelService.selectDeepIsolationModelList(deepIsolationModel);
- ExcelUtil<DeepIsolationModel> util = new ExcelUtil<DeepIsolationModel>(DeepIsolationModel.class);
- util.exportExcel(response, list, "深度隔离模型数据");
- }
- /**
- * 获取深度隔离模型详细信息
- */
- @PreAuthorize("@ss.hasPermi('manage:deepIsolationModel:query')")
- @GetMapping(value = "/{id}")
- public AjaxResult getInfo(@PathVariable("id") Long id) {
- return success(deepIsolationModelService.selectDeepIsolationModelById(id));
- }
- /**
- * 新增深度隔离模型
- */
- @PreAuthorize("@ss.hasPermi('manage:deepIsolationModel:add')")
- @Log(title = "深度隔离模型", businessType = BusinessType.INSERT)
- @PostMapping
- public AjaxResult add(@RequestBody DeepIsolationModel deepIsolationModel) {
- return toAjax(deepIsolationModelService.insertDeepIsolationModel(deepIsolationModel));
- }
- /**
- * 修改深度隔离模型
- */
- @PreAuthorize("@ss.hasPermi('manage:deepIsolationModel:edit')")
- @Log(title = "深度隔离模型", businessType = BusinessType.UPDATE)
- @PutMapping
- public AjaxResult edit(@RequestBody DeepIsolationModel deepIsolationModel) {
- return toAjax(deepIsolationModelService.updateDeepIsolationModel(deepIsolationModel));
- }
- /**
- * 删除深度隔离模型
- */
- @PreAuthorize("@ss.hasPermi('manage:deepIsolationModel:remove')")
- @Log(title = "深度隔离模型", businessType = BusinessType.DELETE)
- @DeleteMapping("/{ids}")
- public AjaxResult remove(@PathVariable Long[] ids) {
- return toAjax(deepIsolationModelService.deleteDeepIsolationModelByIds(ids));
- }
- }
|