Parcourir la source

手机端增加日志输出

Wang-Xiao-Ran il y a 1 an
Parent
commit
946b0b528c

+ 123 - 0
src/main/java/com/sooka/sponest/mobile/log/FeignLogAspect.java

@@ -0,0 +1,123 @@
+package com.sooka.sponest.mobile.log;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.ruoyi.common.core.utils.StringUtils;
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.annotation.AfterReturning;
+import org.aspectj.lang.annotation.AfterThrowing;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Before;
+import org.aspectj.lang.reflect.MethodSignature;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.core.annotation.AnnotationUtils;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import java.lang.reflect.Method;
+import java.util.Arrays;
+
+@Aspect //@Aspect注解是 Spring AOP(Aspect-Oriented Programming,面向方面编程)框架的一部分,用于标识一个类为一个切面(Aspect)
+@Component //@Component注解是 Spring 框架的一部分,用于标识一个类为 Spring 组件。
+public class FeignLogAspect {
+
+    private Logger logger = LoggerFactory.getLogger(FeignLogAspect.class);
+
+    /**
+     * 在执行被@logFeignCall注解的方法或在logFeignCall注解的类内部执行的方法之前,执行一些额外的逻辑。
+     * @Before 是 Spring AOP(Aspect-Oriented Programming,面向方面编程)中的一个注解,用于在方法执行之前执行一些额外的逻辑。
+     * @within(logFeignCall): 这是一个条件,表示在执行被@logFeignCall注解的类内部的方法时触发@Before注解的逻辑。
+     * @annotation(logFeignCall): 这是一个条件,表示在执行被@logFeignCall注解的方法时触发@Before注
+     * @param joinPoint 是 Spring AOP(Aspect-Oriented Programming,面向方面编程)框架中的一个接口,用于表示被拦截的方法执行点。
+     * @param logFeignCall 调用的注解
+     */
+    @Before("@within(logFeignCall) || @annotation(logFeignCall)")
+    public void logFeignCall(JoinPoint joinPoint, LogFeignCall logFeignCall) {
+        // 获取requestPath注解值,用于记录请求路径
+        String requestPath = logFeignCall.requestPath();
+        if (StringUtils.isEmpty(requestPath)) {
+            // 如果请求路径为空, 则尝试获取特定类型请求注解中的 value 值
+            requestPath = getRequestPathFromFeignAnnotation(joinPoint);
+        }
+        // 获取方法参数
+        Object[] args = joinPoint.getArgs();
+
+        // 记录请求信息
+        logger.info("1. 路径:->" + requestPath);
+        logger.info("2. 请求方式:" +logFeignCall.requestType() + "请求参数: " + Arrays.toString(args));
+    }
+
+    /**
+     * @AfterReturning:这是一个 Spring AOP 注解,表示在方法执行后返回结果时触发的环绕通知(around advice)。它可以在方法成功执行后,捕获返回值并执行相应的逻辑。
+     * value = "@annotation(logFeignCall)":这部分指定了一个条件表达式,只有当当前方法上存在@logFeignCall注解时,才会触发@AfterReturning的逻辑。
+     * returning = "response":这部分指定了返回值的名称,在这里将返回值命名为response。这样在@AfterReturning的逻辑中,可以通过response来访问方法的返回结果。
+     * @param joinPoint
+     * @param logFeignCall
+     * @param response
+     */
+    @AfterReturning(value = "@within(logFeignCall) ||@annotation(logFeignCall)", returning = "response")
+    public void logFeignResponse(JoinPoint joinPoint, LogFeignCall logFeignCall, JSONObject response) {
+        // 获取请求路径
+        String requestPath = logFeignCall.requestPath();
+        if (StringUtils.isEmpty(requestPath)) {
+            // 如果请求路径为空, 则尝试获取 @RequestMapping 注解中的 value 值
+            requestPath = getRequestPathFromFeignAnnotation(joinPoint);
+        }
+        // 记录响应信息
+        logger.info("3. 路径->" + requestPath + "的响应:->" + response.toJSONString());
+    }
+
+    @AfterThrowing(value = "@within(logFeignCall) ||@annotation(logFeignCall)", throwing = "ex")
+    public void logFeignException(JoinPoint joinPoint, LogFeignCall logFeignCall, Exception ex) {
+        // 获取请求路径
+        String requestPath = logFeignCall.requestPath();
+        if (StringUtils.isEmpty(requestPath)) {
+            // 如果请求路径为空, 则尝试获取 @RequestMapping 注解中的 value 值
+            requestPath = getRequestPathFromFeignAnnotation(joinPoint);
+        }
+
+        // 记录异常信息
+        logger.error("路径 " + requestPath + " 调用发生异常: " + ex.getMessage());
+    }
+
+    private String getRequestPathFromFeignAnnotation(JoinPoint joinPoint) {
+        // 获取方法签名对象
+        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
+        // 获取方法对象
+        Method method = signature.getMethod();
+        // 尝试获取 PostMapping 注解
+        PostMapping postMapping = AnnotationUtils.findAnnotation(method, PostMapping.class);
+        if (postMapping != null) {
+            // 如果找到了 PostMapping 注解,返回 value 属性中的第一个值
+            return postMapping.value()[0];
+        }
+        // 尝试获取 PutMapping 注解
+        PutMapping putMapping = AnnotationUtils.findAnnotation(method, PutMapping.class);
+        if (putMapping != null) {
+            // 如果找到了 PutMapping 注解,返回 value 属性中的第一个值
+            return putMapping.value()[0];
+        }
+        // 尝试获取 GetMapping 注解
+        GetMapping getMapping = AnnotationUtils.findAnnotation(method, GetMapping.class);
+        if (getMapping != null) {
+            // 如果找到了 GetMapping 注解,返回 value 属性中的第一个值
+            return getMapping.value()[0];
+        }
+        // 如果以上特定类型的请求注解都不符合,则尝试获取 @RequestMapping 注解中的 value 值
+        RequestMapping requestMapping = AnnotationUtils.findAnnotation(method, RequestMapping.class);
+        if (requestMapping != null) {
+            // 获取 @RequestMapping 注解的 value 属性值数组
+            String[] value = requestMapping.value();
+            // 如果 value 属性值数组的长度大于 0,则返回第一个值
+            if (value.length > 0) {
+                return value[0];
+            }
+        }
+        // 如果没有找到任何请求注解,则返回空字符串
+        return "";
+    }
+}

+ 13 - 0
src/main/java/com/sooka/sponest/mobile/log/LogFeignCall.java

@@ -0,0 +1,13 @@
+package com.sooka.sponest.mobile.log;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ElementType.TYPE, ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface LogFeignCall {
+    String requestPath() default "";
+    String requestType() default "feign";
+}

+ 3 - 0
src/main/java/com/sooka/sponest/mobile/remoteapi/RemoteAuthService.java

@@ -2,6 +2,7 @@ package com.sooka.sponest.mobile.remoteapi;
 
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.sooka.sponest.mobile.log.LogFeignCall;
 import com.sooka.sponest.mobile.base.domain.ModulesServiceNameContants;
 import com.sooka.sponest.mobile.remoteapi.factory.RemoteAuthServiceFallbackFactory;
 import com.sooka.sponest.mobile.remoteapi.domain.LoginBody;
@@ -23,6 +24,7 @@ public interface RemoteAuthService {
      * @since 2023/2/22 8:43
      */
     @PostMapping("/getSecretKeys/{sessionId}")
+    @LogFeignCall
     AjaxResult getSecretKeys(@PathVariable("sessionId") String sessionId);
 
     /**
@@ -34,5 +36,6 @@ public interface RemoteAuthService {
      * @since 2023/2/22 8:46
      */
     @PostMapping("loginApp")
+    @LogFeignCall
     R<?> loginApp(@RequestBody LoginBody form);
 }

+ 2 - 0
src/main/java/com/sooka/sponest/mobile/remoteapi/RemoteCenterBaseService.java

@@ -5,6 +5,7 @@ import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.sooka.sponest.mobile.base.domain.ModulesServiceNameContants;
 import com.sooka.sponest.mobile.event.domain.AppCentereventTEventcatalogueVO;
 import com.sooka.sponest.mobile.event.domain.CentereventTFireLog;
+import com.sooka.sponest.mobile.log.LogFeignCall;
 import com.sooka.sponest.mobile.remoteapi.factory.RemoteBaseServiceCenterFactory;
 import com.sooka.sponest.mobile.remoteapi.domain.CentereventTEmergencyDanger;
 import com.sooka.sponest.mobile.remoteapi.domain.CentereventTEmergencyDangerprocess;
@@ -24,6 +25,7 @@ public interface RemoteCenterBaseService {
 
     //新增安全隐患
     @PostMapping("/danger")
+    @LogFeignCall
     R insertDanger(@RequestBody CentereventTEmergencyDanger centereventTEmergencyDanger);
 
     //根据id查询安全隐患

+ 5 - 0
src/main/java/com/sooka/sponest/mobile/remoteapi/RemoteMessageBaseService.java

@@ -2,6 +2,7 @@ package com.sooka.sponest.mobile.remoteapi;
 
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.sooka.sponest.mobile.log.LogFeignCall;
 import com.sooka.sponest.mobile.base.domain.ModulesServiceNameContants;
 import com.sooka.sponest.mobile.event.domain.CentereventMeetingSystemBO;
 import com.sooka.sponest.mobile.remoteapi.factory.RemoteBaseServiceMessageFactory;
@@ -16,12 +17,15 @@ import org.springframework.web.bind.annotation.RequestBody;
 public interface RemoteMessageBaseService {
 
     @GetMapping("/centerMessageFeign/selectMessageList/{userId}")
+    @LogFeignCall
     public AjaxResult selectAppMessageList(@PathVariable("userId") String userId);
 
     @GetMapping("/centerMessageFeign/selectMessageCount/{userId}")
+    @LogFeignCall
     public AjaxResult selectAppMessageCount(@PathVariable("userId") String userId);
 
     @GetMapping("/centerMessageFeign/selectMessageById/{id}")
+    @LogFeignCall
     public AjaxResult selectAppMessageById(@PathVariable("id") String id);
 
     /**
@@ -31,5 +35,6 @@ public interface RemoteMessageBaseService {
      * @return
      */
     @PostMapping("/centerMessageFeign/sendMeetingMsg")
+    @LogFeignCall
     public R remoteSendMeetingMsg(@RequestBody CentereventMeetingSystemBO centereventMeetingSystemBO);
 }

+ 4 - 0
src/main/java/com/sooka/sponest/mobile/remoteapi/RemoteMiddlewareService.java

@@ -2,6 +2,7 @@ package com.sooka.sponest.mobile.remoteapi;
 
 
 import com.ruoyi.common.core.domain.R;
+import com.sooka.sponest.mobile.log.LogFeignCall;
 import com.sooka.sponest.mobile.appbigdata.domain.bo.VisualBO;
 import com.sooka.sponest.mobile.base.domain.ModulesServiceNameContants;
 import com.sooka.sponest.mobile.remoteapi.domain.DataVO;
@@ -18,11 +19,14 @@ import java.util.List;
         fallbackFactory = RemoteAuthServiceFallbackFactory.class, url = "${sooka.service.middleware}")
 public interface RemoteMiddlewareService {
     @GetMapping("/visual/getResourceList")
+    @LogFeignCall
     R getResourceList(@RequestParam("assort") String assort, @RequestParam("name") String name, @RequestParam("type") String type, @RequestParam("deptId") Long deptId, @RequestParam("longitude") String longitude, @RequestParam("latitude") String latitude, @RequestParam("radius") Long radius);
 
     @PostMapping("/visual/getResourcePoint")
+    @LogFeignCall
     R<List<DataVO>> getResourcePoint(@RequestBody VisualBO bo);
 
     @GetMapping("/visual/getResourceDetail")
+    @LogFeignCall
     R getResourcePointById(@RequestParam("id") String id, @RequestParam("type") String type);
 }

+ 18 - 1
src/main/java/com/sooka/sponest/mobile/remoteapi/RemoteMonitorBaseService.java

@@ -2,6 +2,7 @@ package com.sooka.sponest.mobile.remoteapi;
 
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.sooka.sponest.mobile.log.LogFeignCall;
 import com.sooka.sponest.mobile.base.domain.ModulesServiceNameContants;
 import com.sooka.sponest.mobile.remoteapi.factory.RemoteMonitorBaseServiceFallbackFactory;
 import com.sooka.sponest.mobile.system.camera.domain.AppCameraChannelBO;
@@ -12,7 +13,6 @@ import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
-import java.util.Map;
 
 @FeignClient(contextId = "remoteMonitorService", value = ModulesServiceNameContants.CENTER_MONITOR,
         fallbackFactory = RemoteMonitorBaseServiceFallbackFactory.class, url = "${sooka.service.monitor}")
@@ -27,53 +27,70 @@ public interface RemoteMonitorBaseService {
      * @since 2023/2/22 10:47
      */
     @GetMapping("/camera/selectFjsxt/{longitude}/{latitude}")
+    @LogFeignCall
     public AjaxResult selectFjsxt(@PathVariable("longitude") String longitude, @PathVariable("latitude") String latitude);
 
     @PostMapping("/camera/cameraList")
+    @LogFeignCall
     public AjaxResult cameraList(@RequestBody CentermonitorTCamera centermonitorTCamera);
 
     @GetMapping("/centerMonitorFeign/selectByCameraId/{id}")
+    @LogFeignCall
     public R<AppCameraDetailsBO> getInfo(@PathVariable("id") String id);
 
     @GetMapping("/camerachannel/selectCameraChannelList")
+    @LogFeignCall
     public R<List<AppCameraChannelBO>> selectCameraChannelList(@RequestParam("cameraId") String cameraId);
 
     @GetMapping("/DahuaController/getDahuaVideoServerApp")
+    @LogFeignCall
     public AjaxResult getDahuaVideoServer();
 
     @PostMapping("/camera/selectCameraByDeptId")
+    @LogFeignCall
     public AjaxResult selectCameraByDeptId(@RequestBody VisuForestMonitorCenterVO vo);
 
     @GetMapping("/broadcast/getDlblistBydeptId")
+    @LogFeignCall
     public AjaxResult getDlblistBydeptId(@RequestParam("deptId") Long deptId, @RequestParam("broadcastUse") String broadcastUse, @RequestParam("type") String type, @RequestParam("name") String name);
 
     @GetMapping("device/getSensorListByDeptId")
+    @LogFeignCall
     public AjaxResult getSensorListByDeptId(@RequestParam("deptId") Long deptId);
 
     @GetMapping("/DahuaController/rotation")
+    @LogFeignCall
     public AjaxResult rotation(@RequestParam("lng") String lng, @RequestParam("lat") String lat, @RequestParam("list") List<String> list);
 
     @GetMapping("/camera/findCameraByEventCoordinate/{longitude}/{latitude}/{type}")
+    @LogFeignCall
     public AjaxResult findCameraByEventCoordinate(@PathVariable("longitude") String lng, @PathVariable("latitude") String lat, @PathVariable("type") String type);
 
     @GetMapping("/device/getMonitorDeviceAndDataList")
+    @LogFeignCall
     public AjaxResult getMonitorDeviceAndDataList(@RequestParam("deptId") String deptId, @RequestParam("deviceType") String deviceType, @RequestParam("deviceName") String deviceName);
 
     @GetMapping("/DahuaController/getToken")
+    @LogFeignCall
     String getToken();
 
     @PostMapping("centerMonitorFeign/remoteList")
+    @LogFeignCall
     R<List<CentermonitorTCamera>> remoteList(@RequestBody CentermonitorTCamera camera);
 
     @GetMapping("/camera/selectIdTCameraByIds/{ids}")
+    @LogFeignCall
     AjaxResult selectIdTCameraByIds(@PathVariable("ids") String[] ids);
 
     @GetMapping("/camera/selectByCameraId/{id}")
+    @LogFeignCall
     AjaxResult selectByCameraId(@PathVariable("id") String cameraId);
 
     @GetMapping("/device/selectByDeviceId/{id}")
+    @LogFeignCall
     AjaxResult selectByDeviceId(@PathVariable("id")String id);
 
     @GetMapping("/broadcast/selectByBroadcastId/{id}")
+    @LogFeignCall
     AjaxResult selectByBroadcastId(@PathVariable("id")String id);
 }

+ 32 - 0
src/main/java/com/sooka/sponest/mobile/remoteapi/RemoteSystemBaseService.java

@@ -11,6 +11,7 @@ import com.ruoyi.system.api.model.LoginUser;
 import com.sooka.sponest.mobile.base.domain.ModulesServiceNameContants;
 import com.sooka.sponest.mobile.base.domain.SysAttendance;
 import com.sooka.sponest.mobile.event.domain.SysUserSystem;
+import com.sooka.sponest.mobile.log.LogFeignCall;
 import com.sooka.sponest.mobile.remoteapi.factory.RemoteSystemBaseServiceFallbackFactory;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.*;
@@ -30,6 +31,7 @@ public interface RemoteSystemBaseService {
      * @date 2023/2/22 14:45
      **/
     @RequestMapping("/retaion/selectList")
+    @LogFeignCall
     public TableDataInfo selectList();
 
     /**
@@ -40,6 +42,7 @@ public interface RemoteSystemBaseService {
      * @date 2023/2/22 14:46
      **/
     @PostMapping("/version/getVersionInfo")
+    @LogFeignCall
     public AjaxResult getVersionInfo();
 
     /**
@@ -52,26 +55,32 @@ public interface RemoteSystemBaseService {
     /*@GetMapping("/notice/noticlist")
     public TableDataInfo noticlist(@RequestParam(value = "pageNum") Integer pageNum, @RequestParam(value = "pageSize") Integer pageSize);*/
     @GetMapping("/notice/listNoticeByDeptId")
+    @LogFeignCall
     public AjaxResult noticlist(@RequestParam(value = "pageNum") Integer pageNum, @RequestParam(value = "pageSize") Integer pageSize);
 
     //根据通知公告编号获取详细信息(App)
     @RequestMapping("/notice/getInfoApp")
+    @LogFeignCall
     public AjaxResult getInfoApp(@RequestParam(value = "noticeId") Long noticeId);
 
     //根据参数键名查询参数值
     @GetMapping(value = "/config/configKey/{configKey}")
+    @LogFeignCall
     public AjaxResult getConfigKey(@PathVariable(value = "configKey") String configKey);
 
     //根据用户编号获取详细信息远程接口
     @RequestMapping(value = "/user/selectById/{userId}")
+    @LogFeignCall
     public R<SysUser> selectById(@PathVariable("userId") Long userId);
 
     //根据部门编号获取详细信息
     @RequestMapping("/dept/selectDeptById/{deptId}")
+    @LogFeignCall
     public R<SysDept> selectDeptById(@PathVariable("deptId") Long deptId);
 
     //获取全部部门
     @GetMapping("/dept/getDeptListAll")
+    @LogFeignCall
     R<List<SysDept>> treeselectAll();
 
     /**
@@ -83,6 +92,7 @@ public interface RemoteSystemBaseService {
      * @since 2023/2/22 14:30
      */
     @RequestMapping("/config/selectConfigKey/{configKey}")
+    @LogFeignCall
     public R<String> selectConfigKey(@PathVariable("configKey") String configKey);
 
     /**
@@ -94,6 +104,7 @@ public interface RemoteSystemBaseService {
      * @since 2023/2/22 14:31
      */
     @PostMapping(value = "/config/getConfigMap")
+    @LogFeignCall
     R<Map<String, String>> remotegetConfigMap(@RequestParam("keys") List<String> keys);
 
     /**
@@ -105,6 +116,7 @@ public interface RemoteSystemBaseService {
      * @since 2023/2/22 8:43
      */
     @GetMapping("/user/info/{username}")
+    @LogFeignCall
     public R<LoginUser> getUserInfo(@PathVariable("username") String username, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
 
 
@@ -117,6 +129,7 @@ public interface RemoteSystemBaseService {
      * @since 2023/2/22 8:43
      */
     @GetMapping("/user/updateUserJg/{userName}/{deviceid}")
+    @LogFeignCall
     public R updateUserJg(@PathVariable("userName") String userName, @PathVariable("deviceid") String deviceid);
 
     /**
@@ -128,6 +141,7 @@ public interface RemoteSystemBaseService {
      * @date 2023/2/21 16:23
      */
     @PutMapping("/sysAttendance/addAttendance")
+    @LogFeignCall
     public AjaxResult addAttendance(@RequestBody SysAttendance sys);
 
     /**
@@ -139,6 +153,7 @@ public interface RemoteSystemBaseService {
      * @date 2023/2/21 16:23
      */
     @GetMapping("/sysAttendance/getAttendance/{userId}")
+    @LogFeignCall
     public AjaxResult getAttendance(@PathVariable("userId") Long userId);
 
     /**
@@ -150,6 +165,7 @@ public interface RemoteSystemBaseService {
      * @date 2023/2/21 16:23
      */
     @GetMapping("/sysutils/deptselector")
+    @LogFeignCall
     public AjaxResult deptselector(@RequestParam("userName") String userName);
 
     /**
@@ -160,6 +176,7 @@ public interface RemoteSystemBaseService {
      * @date 2023/2/21 16:23
      */
     @GetMapping("/dept/appList")
+    @LogFeignCall
     public AjaxResult getDeptList(@RequestParam("deptName") String deptName);
 
     /**
@@ -168,6 +185,7 @@ public interface RemoteSystemBaseService {
      * @return: AjaxResult
      */
     @PostMapping(value = "/menuEventType/selectByMenuId")
+    @LogFeignCall
     R<List<SysMenuEventType>> selectByMenuId(@RequestBody SysMenuEventType sysMenuEventType);
 
     /**
@@ -178,44 +196,58 @@ public interface RemoteSystemBaseService {
      * @date 2023/5/26 16:23
      */
     @GetMapping("/user/selectRoleMenuVisuTreest")
+    @LogFeignCall
     public AjaxResult selectRoleMenuVisuTreest();
 
     @GetMapping("/menuEventType/selectByMenuIds/{ids}")
+    @LogFeignCall
     R<List<SysMenuEventType>> selectByMenuIds(@PathVariable("ids") String[] ids);
 
     @GetMapping("/user/selectUserWithPostByDeptId")
+    @LogFeignCall
     R<List<SysUserSystem>> selectUserWithPostByDeptId(@RequestParam("deptId") Long deptId);
 
     @GetMapping("/hwMeeting/joinConferences/{eventId}/{meetingSubject}/{userName}")
+    @LogFeignCall
     public AjaxResult joinConferences(@PathVariable("eventId") String eventId, @PathVariable("meetingSubject") String meetingSubject, @PathVariable("userName") String userName);
 
     @GetMapping("/menuApp/getAppChildrenMenuOrButtonByParentId")
+    @LogFeignCall
     AjaxResult getAppChildrenMenuOrButtonByParentId(@RequestParam("parentId") String parentId,@RequestParam("menuType") String menuType);
 
     @GetMapping("/dict/data/type/{dictType}")
+    @LogFeignCall
     AjaxResult getSortByType(@PathVariable("dictType") String dictType);
 
     @GetMapping("/menuApp/selectMenuListByParentIdAndRoleId/{parentId}")
+    @LogFeignCall
     AjaxResult getMenuListByParentId(@PathVariable("parentId") String parentId);
 
     @PostMapping("/user/userFeginlist")
+    @LogFeignCall
     R<List<SysUser>> getUserList(@RequestBody SysUser sysUser);
 
     @PostMapping("/user/userFeginlistWithPage")
+    @LogFeignCall
     List<SysUser> getUserListByPage(@RequestBody SysUser sysUser);
 
     @GetMapping(value = "/dept/userDeptSelectIncludeChildren/{deptId}")
+    @LogFeignCall
     AjaxResult userDeptSelectIncludeChildren(@PathVariable("deptId") String deptId);
 
     @GetMapping("/dept/userDeptSelect")
+    @LogFeignCall
     AjaxResult getUserDeptSelect();
 
     @GetMapping("/dept/getChildren/{deptId}/{postId}")
+    @LogFeignCall
     AjaxResult getChildren(@PathVariable("deptId") String deptId, @PathVariable("postId") String postId);
 
     @GetMapping("/dict/data/internetOfThings/{dictType}")
+    @LogFeignCall
     AjaxResult getSortByTypeAndCount(@PathVariable("dictType") String dictType);
 
     @PostMapping("/dept/getDeptsByDeptType")
+    @LogFeignCall
     AjaxResult getDeptsByDeptType(@RequestBody SysDept sysDept);
 }

+ 6 - 0
src/main/java/com/sooka/sponest/mobile/remoteapi/RemoteTaskBaseService.java

@@ -2,6 +2,7 @@ package com.sooka.sponest.mobile.remoteapi;
 
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.sooka.sponest.mobile.log.LogFeignCall;
 import com.sooka.sponest.mobile.base.domain.ModulesServiceNameContants;
 import com.sooka.sponest.mobile.event.domain.CenterTaskSelectTaskVO;
 import com.sooka.sponest.mobile.event.domain.CenterTaskTaskDeptVO;
@@ -25,6 +26,7 @@ public interface RemoteTaskBaseService {
      * @date 2023/2/22 15:00
      **/
     @PostMapping("/centerTaskFeign/selectTaskDtpts")
+    @LogFeignCall
     R selectTaskDtpts(@RequestBody CenterTaskTaskDeptVO vo);
 
     /**
@@ -36,6 +38,7 @@ public interface RemoteTaskBaseService {
      * @date 2023/2/22 15:03
      **/
     @PostMapping("/centerTaskFeign/receiveTask")
+    @LogFeignCall
     AjaxResult receiveTask(@RequestBody ReceiveTaskVO vo);
 
     /**
@@ -47,11 +50,14 @@ public interface RemoteTaskBaseService {
      * @date 2023/2/22 15:03
      **/
     @PostMapping("/centerTaskFeign/refusedTask")
+    @LogFeignCall
     AjaxResult refusedTask(@RequestBody RefusedTaskVO vo);
 
     @PostMapping("/centerTaskFeign/selectReceivedTaskBO")
+    @LogFeignCall
     R selectReceivedTaskBO(@RequestBody CenterTaskSelectTaskVO vo);
 
     @PostMapping("/centerTaskFeign/selectUnclaimedTaskBO")
+    @LogFeignCall
     R selectUnclaimedTaskBO(@RequestBody CenterTaskSelectTaskVO vo);
 }