| | |
| | | package com.ruoyi.framework.aspectj; |
| | | |
| | | import com.ruoyi.common.annotation.SdkOperate; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.domain.model.LoginUser; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | |
| | | import com.ruoyi.device.camera.service.IArdCamerasService; |
| | | import com.ruoyi.system.service.ISysUserService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.aspectj.lang.JoinPoint; |
| | | import org.aspectj.lang.ProceedingJoinPoint; |
| | | import org.aspectj.lang.annotation.Around; |
| | | import org.aspectj.lang.annotation.Aspect; |
| | | import org.aspectj.lang.annotation.Before; |
| | | import org.aspectj.lang.annotation.Pointcut; |
| | | import org.aspectj.lang.reflect.MethodSignature; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Nullable; |
| | | import javax.annotation.Resource; |
| | | import java.lang.reflect.Method; |
| | | import java.util.Date; |
| | | |
| | | import static jdk.nashorn.internal.runtime.regexp.joni.Config.log; |
| | |
| | | |
| | | @Around("dsPointCut()") |
| | | public Object around(ProceedingJoinPoint point) throws Throwable { |
| | | MethodSignature signature = (MethodSignature) point.getSignature(); |
| | | Method method = signature.getMethod(); |
| | | Boolean result = controlScopeFilter(point); |
| | | if (result) { |
| | | log.debug("已获取相机控制权"); |
| | | log.debug("已获取相机控制权--" + method.getName()); |
| | | return point.proceed(); |
| | | } else { |
| | | log.debug("未获取相机控制权"); |
| | | log.debug("未获取相机控制权--" + method.getName()); |
| | | return false;//代替目标方法的返回值 |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |