소스 검색

记录移动端错误日志

zouxuan 1 년 전
부모
커밋
fa943846ee
2개의 변경된 파일9개의 추가작업 그리고 1개의 파일을 삭제
  1. 8 0
      mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/web/controller/ExceptionLogController.java
  2. 1 1
      mec-auth/pom.xml

+ 8 - 0
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/web/controller/ExceptionLogController.java

@@ -1,9 +1,11 @@
 package com.ym.mec.auth.web.controller;
 
+import com.dayaedu.cbs.common.enums.EAppKey;
 import com.dayaedu.cbs.openfeign.client.SysExceptionLogFeignClientService;
 import com.dayaedu.cbs.openfeign.wrapper.courseware.SysExceptionLogVo;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
+import org.apache.commons.collections.CollectionUtils;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
@@ -19,6 +21,12 @@ public class ExceptionLogController extends BaseController {
 
 	@PostMapping("sysExceptionLog/save")
 	public HttpResponseResult save(@RequestBody List<SysExceptionLogVo.SysExceptionLog> sysExceptionLogVos) {
+		if(CollectionUtils.isEmpty(sysExceptionLogVos)){
+			return succeed();
+		}
+		sysExceptionLogVos.forEach(sysExceptionLogVo -> {
+			sysExceptionLogVo.setAppKey(EAppKey.GYM);
+		});
 		sysExceptionLogFeignClientService.add(sysExceptionLogVos).feignData();
 		return succeed();
 	}

+ 1 - 1
mec-auth/pom.xml

@@ -18,7 +18,7 @@
 		<dependency>
 			<groupId>com.dayaedu.cbs.openfeign</groupId>
 			<artifactId>dayaedu-openfeign-api</artifactId>
-			<version>1.0.0</version>
+			<version>1.0.2</version>
 		</dependency>
 		<!-- 引用Mybatis 和 Mysql驱动开始 -->
 		<dependency>