From ee9cb0da4a43bcf523ebb157678f64a2895fba1a Mon Sep 17 00:00:00 2001 From: nickchange <126672920+nickchange@users.noreply.github.com> Date: 星期二, 10 十月 2023 15:30:38 +0800 Subject: [PATCH] 10.10 --- cloud-server-other/src/main/java/com/dsh/other/controller/BannerController.java | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 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 c82bfe8..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 @@ -5,7 +5,10 @@ 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; @@ -17,6 +20,7 @@ import org.springframework.web.bind.annotation.*; import java.util.ArrayList; +import java.util.Date; import java.util.List; /** @@ -94,4 +98,27 @@ return ResultUtil.runErr(); } } + + + @ResponseBody + @PostMapping("/class/hisotory") + public void createHistory(@RequestBody CreateHistoryDto createHistoryDto){ + createHistoryDto.setDate(new Date()); + + bannerService.createHistory(createHistoryDto); + + + } + + @ResponseBody + @PostMapping("/class/gethisotory") + public List<GetHistoryDto> getHistory(@RequestBody Integer studentId){ + List<GetHistoryDto> list = bannerService.gethistory(studentId); + + System.out.println("=-======GetHistoryDto========"+list); + return list; + + } + + } -- Gitblit v1.7.1