|
|
@ -5,13 +5,11 @@ import com.alibaba.fastjson.JSON; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.ccsens.cloudutil.annotation.MustLogin; |
|
|
|
import com.ccsens.cloudutil.feign.Tall3FeignClient; |
|
|
|
import com.ccsens.cloudutil.feign.TallFeignClient; |
|
|
|
import com.ccsens.util.CodeEnum; |
|
|
|
import com.ccsens.util.JsonResponse; |
|
|
|
import com.ccsens.util.WebConstant; |
|
|
|
import com.ccsens.util.bean.dto.QueryDto; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.poi.ss.formula.functions.T; |
|
|
|
import org.aspectj.lang.ProceedingJoinPoint; |
|
|
|
import org.aspectj.lang.Signature; |
|
|
|
import org.aspectj.lang.annotation.Around; |
|
|
@ -27,7 +25,6 @@ import org.springframework.web.context.request.ServletRequestAttributes; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
import java.lang.reflect.*; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
/** |
|
|
@ -72,7 +69,7 @@ public class MustLoginAspect { |
|
|
|
Method targetMethod = methodSignature.getMethod(); |
|
|
|
|
|
|
|
MustLogin mustLoginAnnotation = targetMethod.getAnnotation(MustLogin.class); |
|
|
|
fillSeptial(dto, mustLoginAnnotation); |
|
|
|
fillSpecial(dto, mustLoginAnnotation); |
|
|
|
if (mustLoginAnnotation == null) { |
|
|
|
log.info("不是必须登录,有token,则添加userId,没有则不添加"); |
|
|
|
if (response != null && response.getCode().intValue() == CodeEnum.SUCCESS.getCode().intValue() && response.getData() != null) { |
|
|
@ -122,7 +119,10 @@ public class MustLoginAspect { |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
private void fillSeptial(QueryDto dto, MustLogin mustLoginAnnotation) { |
|
|
|
private void fillSpecial(QueryDto dto, MustLogin mustLoginAnnotation) { |
|
|
|
if (mustLoginAnnotation == null) { |
|
|
|
return; |
|
|
|
} |
|
|
|
if (dto != null && mustLoginAnnotation.type() > -1) { |
|
|
|
switch (mustLoginAnnotation.type()) { |
|
|
|
case 0: |
|
|
|