|
|
@ -1,7 +1,10 @@ |
|
|
|
package com.epmet.commons.tools.aspect; |
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
|
import com.epmet.commons.tools.redis.RedisUtils; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.aspectj.lang.JoinPoint; |
|
|
|
import org.aspectj.lang.annotation.Aspect; |
|
|
@ -25,6 +28,7 @@ import java.util.Map; |
|
|
|
@Aspect |
|
|
|
@Component |
|
|
|
@Order(20) |
|
|
|
@Slf4j |
|
|
|
public class ReportRequestAspect { |
|
|
|
|
|
|
|
/** |
|
|
@ -46,6 +50,11 @@ public class ReportRequestAspect { |
|
|
|
} |
|
|
|
|
|
|
|
Map<String, Object> cachedParams = redisUtils.hGetAll(paramKey); |
|
|
|
if (cachedParams == null || cachedParams.size() == 0) { |
|
|
|
log.warn("【报表服务】根据paramKey:{}未获取到有效的参数缓存。", paramKey); |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "参数失效", "参数失效"); |
|
|
|
// redis中没有此参数
|
|
|
|
} |
|
|
|
|
|
|
|
// 使用方法签名获取出参数class列表
|
|
|
|
Object[] args = point.getArgs(); |
|
|
|