package com.dy.pipIrrDemo.auth; import com.dy.common.webUtil.BaseResponse; import com.dy.common.webUtil.BaseResponseUtils; import com.dy.pipIrrGlobal.pojoDemo.DemoAuth; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; 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; @Slf4j @RestController @RequestMapping(path="auth") @SuppressWarnings("unchecked") public class AuthCtrl { @Autowired AuthSv sv ; @GetMapping("selectAll") public BaseResponse selectAll(){ try { List list = sv.selectAll() ; return BaseResponseUtils.buildSuccess(list); } catch (Exception e) { log.error("得到所有demo权限异常", e); return BaseResponseUtils.buildException(e.getMessage()) ; } } }