liujie
2023-09-23 06104b789c9bc120d490b57560098e8a6df4beb9
cloud-server-other/src/main/java/com/dsh/other/controller/BannerController.java
@@ -2,6 +2,8 @@
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dsh.other.entity.Banner;
import com.dsh.other.entity.CreateHistoryDto;
import com.dsh.other.entity.GetHistoryDto;
import com.dsh.other.model.BannerVo;
import com.dsh.other.service.IBannerService;
import com.dsh.other.util.ResultUtil;
@@ -10,12 +12,10 @@
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
@@ -53,4 +53,24 @@
            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){
      return   bannerService.gethistory(studentId);
    }
}