IndexController.java 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. package com.mdd.admin.controller.common;
  2. import com.mdd.admin.service.common.IIndexService;
  3. import com.mdd.common.core.AjaxResult;
  4. import io.swagger.annotations.Api;
  5. import io.swagger.annotations.ApiOperation;
  6. import lombok.extern.slf4j.Slf4j;
  7. import org.springframework.web.bind.annotation.GetMapping;
  8. import org.springframework.web.bind.annotation.RequestMapping;
  9. import org.springframework.web.bind.annotation.RestController;
  10. import javax.annotation.Resource;
  11. import java.util.Map;
  12. /**
  13. * 主页管理
  14. */
  15. @Api(tags = "工作台")
  16. @Slf4j
  17. @RestController
  18. @RequestMapping("api/common/index")
  19. public class IndexController {
  20. @Resource
  21. IIndexService iIndexService;
  22. /**
  23. * 控制台
  24. *
  25. * @author fzr
  26. * @return Object
  27. */
  28. @GetMapping("/console")
  29. public Object console() {
  30. Map<String, Object> map = iIndexService.console();
  31. return AjaxResult.success(map);
  32. }
  33. @ApiOperation(value = "工作台")
  34. @GetMapping("/workbench")
  35. public Object workbench() {
  36. Map<String, Object> map = iIndexService.workbench();
  37. return AjaxResult.success(map);
  38. }
  39. /**
  40. * 公共配置
  41. *
  42. * @author fzr
  43. * @return Object
  44. */
  45. @GetMapping("/config")
  46. public Object config() {
  47. Map<String, Object> map = iIndexService.config();
  48. return AjaxResult.success(map);
  49. }
  50. }