OutController.java 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. package com.slibra.web.controller.business;
  2. import com.slibra.business.domain.TXinyiDaily;
  3. import com.slibra.business.mapper.TXinyiDailyMapper;
  4. import com.slibra.common.core.domain.AjaxResult;
  5. import lombok.extern.slf4j.Slf4j;
  6. import org.springframework.beans.factory.annotation.Autowired;
  7. import org.springframework.util.CollectionUtils;
  8. import org.springframework.web.bind.annotation.*;
  9. import java.util.List;
  10. @RestController
  11. @RequestMapping("/out")
  12. @Slf4j
  13. public class OutController {
  14. @Autowired
  15. private TXinyiDailyMapper xinyiDailyMapper;
  16. /**
  17. * 通过日期获取某天的日报情况
  18. * @return
  19. */
  20. @GetMapping("/getDailyByDate")
  21. public AjaxResult recommendQAList(@RequestParam String date)
  22. {
  23. log.info("进入了 通过日期获取某天的日报情况 接口");
  24. List<TXinyiDaily> xinyiDailies = xinyiDailyMapper.selectTXinyiDailyList(TXinyiDaily.builder().testDate(date).build());
  25. if(!CollectionUtils.isEmpty(xinyiDailies))
  26. return AjaxResult.success(xinyiDailies.get(0));
  27. return AjaxResult.error("没有查询到对应的日报数据");
  28. }
  29. }