java110-core/src/main/java/com/java110/core/base/controller/BaseController.java
@@ -4,9 +4,12 @@
import com.alibaba.fastjson.JSONObject;
import com.java110.common.constant.ResponseConstant;
import com.java110.common.exception.NoAuthorityException;
import com.java110.common.factory.PageDataFactory;
import com.java110.common.log.LoggerEngine;
import com.java110.common.util.SequenceUtil;
import com.java110.core.base.AppBase;
import com.java110.entity.service.PageData;
import org.springframework.util.StringUtils;
import javax.servlet.http.HttpServletRequest;
@@ -26,10 +29,11 @@
     * 检查用户登录
     * @throws NoAuthorityException
     */
    protected void checkLogin() throws NoAuthorityException{
    protected String checkLogin() throws NoAuthorityException{
        if(false){
            throw new NoAuthorityException(ResponseConstant.RESULT_CODE_NO_AUTHORITY_ERROR,"用户未登录,请登录!");
        }
        return "10001";
    }
@@ -117,4 +121,14 @@
        return ip;
    }
    /**
     * 创建 PageData 对象
     * @param request
     * @return
     * @throws IllegalArgumentException
     */
    protected PageData getPageData(HttpServletRequest request){
        return request.getAttribute("pd") != null ?(PageData) request.getAttribute("pd") : null;
    }
}