济菏高速业务端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
2.2 KiB

package com.zc.controller;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.zc.domain.IotBoardTemplate;
import com.zc.service.IIotBoardTemplateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 情报板模板Controller
*
* @author 刘方堃
* @date 2021-11-30
*/
@RestController
@RequestMapping("/system/template")
public class IotBoardTemplateController extends BaseController
{
@Autowired
private IIotBoardTemplateService iotBoardTemplateService;
@GetMapping("/getAllVmsTemplate")
public AjaxResult getAllVmsTemplate(String category, String devicePixel) {
return AjaxResult.success(iotBoardTemplateService.getAllVmsTemplate(category, devicePixel));
}
/**
* 新增情报板模板
*/
// @PreAuthorize("@ss.hasPermi('system:templateConfig:add')")
@Log(title = "情报板模板", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody JSONObject jsonObject)
{
return AjaxResult.success(iotBoardTemplateService.insertSdVmsTemplate(jsonObject));
}
/**
* 修改情报板模板
*/
// @PreAuthorize("@ss.hasPermi('system:templateConfig:edit')")
@Log(title = "情报板模板", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody JSONObject jsonObject)
{
return toAjax(iotBoardTemplateService.updateSdVmsTemplate(jsonObject));
}
/**
* 删除情报板模板
*/
@PreAuthorize("@ss.hasPermi('system:templateConfig:remove')")
@Log(title = "情报板模板", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(iotBoardTemplateService.deleteSdVmsTemplateByIds(ids));
}
}