From a830a73fd10a21e3793c79a35be4e532de124c6f Mon Sep 17 00:00:00 2001
From: nickchange <126672920+nickchange@users.noreply.github.com>
Date: 星期二, 17 十月 2023 17:25:16 +0800
Subject: [PATCH] 10.17.1

---
 cloud-server-other/src/main/java/com/dsh/other/controller/BannerController.java |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 50 insertions(+), 2 deletions(-)

diff --git a/cloud-server-other/src/main/java/com/dsh/other/controller/BannerController.java b/cloud-server-other/src/main/java/com/dsh/other/controller/BannerController.java
index 924484e..7dde961 100644
--- a/cloud-server-other/src/main/java/com/dsh/other/controller/BannerController.java
+++ b/cloud-server-other/src/main/java/com/dsh/other/controller/BannerController.java
@@ -2,9 +2,14 @@
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.dsh.other.entity.Banner;
+import com.dsh.other.entity.FrequentlyAskedQuestions;
+import com.dsh.other.feignclient.model.AdvertisementChangeStateDTO;
+import com.dsh.other.feignclient.model.AdvertisementQuery;
 import com.dsh.other.entity.CreateHistoryDto;
 import com.dsh.other.entity.GetHistoryDto;
 import com.dsh.other.model.BannerVo;
+import com.dsh.other.model.dto.siteDto.SelectDto;
+import com.dsh.other.model.vo.questionVo.QuestionSearchVO;
 import com.dsh.other.service.IBannerService;
 import com.dsh.other.util.ResultUtil;
 import io.swagger.annotations.ApiImplicitParam;
@@ -30,7 +35,47 @@
     private IBannerService bannerService;
 
 
+    /**
+     * 获取广告管理
+     * @return
+     */
+    @RequestMapping("/base/advertisement/listAll")
+    public List<Banner> listAll(@RequestBody AdvertisementQuery query){
+        return  bannerService.listAll(query);
+    }
+    /**
+     * 上/下架、删除常见问题 state=1为上架 2为下架
+     */
+    @RequestMapping("/base/advertisement/changeState")
+    public Object changeState(@RequestBody AdvertisementChangeStateDTO dto){
+        return bannerService.changeState(dto);
+    }
 
+    /**
+     * 根据id获取广告数据
+     */
+    @RequestMapping("/base/advertisement/getById")
+    public Banner changeState(@RequestBody Integer bannerId){
+        return bannerService.getById(bannerId);
+    }
+
+    /**
+     * 添加广告管理
+     * @return
+     */
+    @RequestMapping("/base/advertisement/addAdvertisement")
+    Object addAdvertisement(@RequestBody Banner banner){
+        return bannerService.save(banner);
+    }
+
+    /**
+     * 修改广告管理
+     * @return
+     */
+    @RequestMapping("/base/advertisement/updateAdvertisement")
+    Object updateAdvertisement(@RequestBody Banner banner){
+        return bannerService.updateById(banner);
+    }
 
     @ResponseBody
     @PostMapping("/base/banner/queryBannerList")
@@ -68,9 +113,12 @@
     @ResponseBody
     @PostMapping("/class/gethisotory")
     public  List<GetHistoryDto> getHistory(@RequestBody Integer studentId){
+        List<GetHistoryDto> list =   bannerService.gethistory(studentId);
 
-      return   bannerService.gethistory(studentId);
-
+        System.out.println("=-======GetHistoryDto========"+list);
+      return   list;
 
     }
+
+
 }

--
Gitblit v1.7.1