IndexController.java 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package org.dromara.web.controller;
  2. import cn.dev33.satoken.annotation.SaCheckPermission;
  3. import cn.dev33.satoken.annotation.SaIgnore;
  4. import lombok.RequiredArgsConstructor;
  5. import org.dromara.common.core.domain.R;
  6. import org.dromara.common.core.utils.SpringUtils;
  7. import org.dromara.common.core.utils.StringUtils;
  8. import org.dromara.web.domain.bo.HospitalRecordBo;
  9. import org.dromara.web.domain.vo.HospitalRecordVo;
  10. import org.dromara.web.service.IIndexService;
  11. import org.springframework.web.bind.annotation.GetMapping;
  12. import org.springframework.web.bind.annotation.RestController;
  13. /**
  14. * 首页
  15. *
  16. * @author Lion Li
  17. */
  18. @SaIgnore
  19. @RequiredArgsConstructor
  20. @RestController
  21. public class IndexController {
  22. private final IIndexService indexService;
  23. /**
  24. * 访问首页,提示语
  25. */
  26. @GetMapping("/")
  27. public String index() {
  28. return StringUtils.format("欢迎使用{}后台管理框架,请通过前端地址访问。", SpringUtils.getApplicationName());
  29. }
  30. /**
  31. * 查询首页数据
  32. */
  33. @GetMapping("/index/queryData")
  34. public R queryData() {
  35. return R.ok(indexService.queryData());
  36. }
  37. }