package com.moral.api.controller; import com.moral.api.entity.SysArea; import com.moral.api.service.SysAreaService; import com.moral.constant.ResultMessage; import io.swagger.annotations.Api; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; /** * @ClassName SystemController * @Description TODO * @Author 陈凯裕 * @Date 2021/4/7 13:17 * @Version TODO **/ @Slf4j @Api(tags = {"用户组织控制器"}) @CrossOrigin(origins = "*", maxAge = 3600) @RestController @RequestMapping("/system") public class SystemController { @Autowired SysAreaService sysAreaService; @GetMapping("area/query") public ResultMessage query(){ List sysAreas = sysAreaService.querySysArea(); return ResultMessage.ok(sysAreas); } }