无关风月
2025-02-07 8a038cf6f0792cfe260a94e86d954b50f068e758
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TChargingPileNotificationController.java
@@ -1,8 +1,20 @@
package com.ruoyi.chargingPile.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.chargingPile.api.model.TChargingPileNotification;
import com.ruoyi.chargingPile.service.TChargingPileNotificationService;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.BasePage;
import com.ruoyi.common.core.web.page.PageInfo;
import com.ruoyi.common.log.annotation.Log;
import com.ruoyi.common.log.enums.BusinessType;
import com.ruoyi.common.log.enums.OperatorType;
import com.ruoyi.common.security.annotation.Logical;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
 * <p>
@@ -15,6 +27,34 @@
@RestController
@RequestMapping("/t-charging-pile-notification")
public class TChargingPileNotificationController {
   @Resource
   private TChargingPileNotificationService chargingPileNotificationService;
   @RequiresPermissions(value = {"/systemNotification"}, logical = Logical.OR)
   @ResponseBody
   @GetMapping("/chargingPileNotificationPageList")
   @ApiOperation(value = "获取系统通知列表数据", tags = {"管理后台-系统通知"})
   public AjaxResult<PageInfo<TChargingPileNotification>> chargingPileNotificationPageList(Integer siteId, BasePage basePage){
      PageInfo<TChargingPileNotification> pageInfo = chargingPileNotificationService.chargingPileNotificationPageList(siteId, basePage);
      return AjaxResult.success(pageInfo);
   }
   @RequiresPermissions(value = {"/systemNotification/del"}, logical = Logical.OR)
   @ResponseBody
   @DeleteMapping("/delChargingPileNotification")
   @ApiOperation(value = "删除系统通知", tags = {"管理后台-系统通知"})
   @Log(title = "【系统通知】删除系统通知", businessType = BusinessType.DELETE,operatorType = OperatorType.MANAGE)
   public AjaxResult delChargingPileNotification(@RequestParam("id") Long id){
      TChargingPileNotification chargingPileNotification = chargingPileNotificationService.getById(id);
      chargingPileNotificationService.removeById(chargingPileNotification);
      return AjaxResult.success();
   }
}