| | |
| | | package com.java110.front.aop; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.core.context.PageData; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import com.java110.utils.exception.FilterException; |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.core.context.PageData; |
| | | import org.aspectj.lang.JoinPoint; |
| | | import org.aspectj.lang.ProceedingJoinPoint; |
| | | import org.aspectj.lang.annotation.*; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | | import org.springframework.web.context.request.ServletRequestAttributes; |
| | |
| | | String appId = ""; |
| | | String sessionId = request.getSession().getId(); |
| | | appId = request.getHeader("APP_ID"); |
| | | if(StringUtil.isEmpty(appId)){ |
| | | if (StringUtil.isEmpty(appId)) { |
| | | appId = request.getHeader("APP-ID"); |
| | | } |
| | | logger.debug("请求头信息:" + request.getHeaderNames()); |
| | |
| | | if (params.get(key).length > 0) { |
| | | String value = ""; |
| | | for (int paramIndex = 0; paramIndex < params.get(key).length; paramIndex++) { |
| | | value = params.get(key)[paramIndex] + ","; |
| | | value += (params.get(key)[paramIndex] + ","); |
| | | } |
| | | value = value.endsWith(",") ? value.substring(0, value.length() - 1) : value; |
| | | paramObj.put(key, value); |
| | |
| | | Object o = pjp.proceed(); |
| | | return o; |
| | | } catch (Throwable e) { |
| | | e.printStackTrace(); |
| | | return null; |
| | | logger.error("执行方法异常", e); |
| | | return new ResponseEntity("内部异常" + e.getLocalizedMessage(), HttpStatus.BAD_REQUEST); |
| | | } |
| | | } |
| | | |