zhibing.pu
2024-08-10 1916f55359bb6c8f34548c26767569b000decbfc
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TChargingPileNotificationController.java
@@ -1,8 +1,15 @@
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 io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
 * <p>
@@ -15,6 +22,32 @@
@RestController
@RequestMapping("/t-charging-pile-notification")
public class TChargingPileNotificationController {
   @Resource
   private TChargingPileNotificationService chargingPileNotificationService;
   @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);
   }
   @ResponseBody
   @DeleteMapping("/delChargingPileNotification/{id}")
   @ApiOperation(value = "删除系统通知", tags = {"管理后台-系统通知"})
   public AjaxResult delChargingPileNotification(@PathVariable Long id){
      TChargingPileNotification chargingPileNotification = chargingPileNotificationService.getById(id);
      chargingPileNotification.setDelFlag(1);
      chargingPileNotificationService.updateById(chargingPileNotification);
      return AjaxResult.success();
   }
}