Browse Source

Merge branch 'master' of http://39.106.8.246:3003/persagy/dmp

lixing 4 years ago
parent
commit
1fbb471ada

+ 5 - 0
dmp-admin/src/main/java/com/persagy/dmp/admin/controller/DmpGatewayController.java

@@ -29,6 +29,11 @@ public class DmpGatewayController {
 	@Value("${persagy.dmp.server}")
 	private String dmpServer;
 
+	@PostMapping("/report/**")
+	public void report(HttpServletRequest request, HttpServletResponse response, @RequestBody JsonNode param) {
+		dispatch(request, response, param);
+	}
+
 	@PostMapping("/dic/**")
 	public void dic(HttpServletRequest request, HttpServletResponse response, @RequestBody JsonNode param) {
 		dispatch(request, response, param);

+ 1 - 5
dmp-admin/src/main/java/com/persagy/dmp/admin/jms/executor/TransObjectExecutor.java

@@ -58,17 +58,13 @@ public class TransObjectExecutor implements MessageExecutor {
 			// 处理失效数据
 			transObjectService.transInvalidObject(ctx);
 
-
 		} catch (Exception e) {
-			e.printStackTrace();
+			transObjectService.error(ctx, e.getMessage());
 		} finally {
 			transObjectService.over(ctx);
 		}
-
-
 	}
 
-
 	private TransObjectContext prepareContext(DmpMessage message) {
 		String groupCode = message.getGroupCode();
 		String projectId = message.getProjectId();

+ 4 - 0
dmp-admin/src/main/java/com/persagy/dmp/admin/service/DmpTransObjectService.java

@@ -285,6 +285,10 @@ public class DmpTransObjectService {
         transUtils.transInvalidObject(ctx);
     }
 
+    public void error(TransObjectContext context, String message) {
+        transUtils.writeInfo(context, "error", message);
+    }
+
     public void over(TransObjectContext context) {
         transUtils.writeInfo(context, "over", null);
         String key = KEY_TRANS + context.getProjectId();