From 43aeb693beea084193b95e7fd759995ffc779ada Mon Sep 17 00:00:00 2001
From: zxc <954985706@qq.com>
Date: Mon, 6 Jul 2020 10:42:59 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E7=AC=AC=E4=B8=89=E6=96=B9?=
=?UTF-8?q?=E5=B9=B3=E5=8F=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../epmet-third-platform-client.iml | 148 -----------
.../epmet-third-platform-server.iml | 240 ------------------
.../ComponentVerifyTicketController.java | 18 +-
.../service/impl/DbyWechatExtServiceImpl.java | 2 +-
.../java/com/epmet/util/ModuleConstant.java | 8 +-
.../epmet-third-platform.iml | 51 ----
6 files changed, 15 insertions(+), 452 deletions(-)
delete mode 100644 epmet-module/epmet-third-platform/epmet-third-platform-client/epmet-third-platform-client.iml
delete mode 100644 epmet-module/epmet-third-platform/epmet-third-platform-server/epmet-third-platform-server.iml
delete mode 100644 epmet-module/epmet-third-platform/epmet-third-platform.iml
diff --git a/epmet-module/epmet-third-platform/epmet-third-platform-client/epmet-third-platform-client.iml b/epmet-module/epmet-third-platform/epmet-third-platform-client/epmet-third-platform-client.iml
deleted file mode 100644
index 157930f00d..0000000000
--- a/epmet-module/epmet-third-platform/epmet-third-platform-client/epmet-third-platform-client.iml
+++ /dev/null
@@ -1,148 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/epmet-module/epmet-third-platform/epmet-third-platform-server/epmet-third-platform-server.iml b/epmet-module/epmet-third-platform/epmet-third-platform-server/epmet-third-platform-server.iml
deleted file mode 100644
index f42456d14c..0000000000
--- a/epmet-module/epmet-third-platform/epmet-third-platform-server/epmet-third-platform-server.iml
+++ /dev/null
@@ -1,240 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/epmet-module/epmet-third-platform/epmet-third-platform-server/src/main/java/com/epmet/controller/ComponentVerifyTicketController.java b/epmet-module/epmet-third-platform/epmet-third-platform-server/src/main/java/com/epmet/controller/ComponentVerifyTicketController.java
index 001b78d1e4..42ee066a70 100644
--- a/epmet-module/epmet-third-platform/epmet-third-platform-server/src/main/java/com/epmet/controller/ComponentVerifyTicketController.java
+++ b/epmet-module/epmet-third-platform/epmet-third-platform-server/src/main/java/com/epmet/controller/ComponentVerifyTicketController.java
@@ -1,14 +1,15 @@
package com.epmet.controller;
+import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.ThirdPlatformEventFormDTO;
import com.epmet.dto.result.ResultBean;
import com.epmet.service.DbyWechatExtService;
+import com.epmet.util.ModuleConstant;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
@@ -22,23 +23,18 @@ public class ComponentVerifyTicketController {
private DbyWechatExtService dbyWechatExtService;
@PostMapping(value = "/event")
- public ResponseEntity wechatPlatformEvent(@RequestBody ThirdPlatformEventFormDTO formDTO) {
+ public Result wechatPlatformEvent(@RequestBody ThirdPlatformEventFormDTO formDTO) {
ResultBean resultBean = new ResultBean();
ResponseEntity responseEntity;
- log.info("授权事件接收URL,验证票据");
+ log.info(ModuleConstant.URL_TICKET);
try {
resultBean.setData(dbyWechatExtService.parseRequest(formDTO));
responseEntity = new ResponseEntity(resultBean, HttpStatus.OK);
- log.info("第三方平台授权事件接收URL,验证票据成功");
+ log.info(ModuleConstant.SUCCESS_TICKET);
} catch (Exception e) {
- log.error("第三方平台授权事件接收URL,验证票据异常", e.getMessage(), e);
- ResultBean errorResultBean = new ResultBean();
- errorResultBean.setMsg("第三方平台授权事件接收URL,验证票据异常");
- errorResultBean.setErrorMsg(e.getMessage());
- errorResultBean.setCode(422);
- responseEntity = new ResponseEntity(errorResultBean, HttpStatus.UNPROCESSABLE_ENTITY);
+ log.error(ModuleConstant.ERROR_URL_TICKET, e.getMessage(), e);
}
- return responseEntity;
+ return new Result();
}
diff --git a/epmet-module/epmet-third-platform/epmet-third-platform-server/src/main/java/com/epmet/service/impl/DbyWechatExtServiceImpl.java b/epmet-module/epmet-third-platform/epmet-third-platform-server/src/main/java/com/epmet/service/impl/DbyWechatExtServiceImpl.java
index fab5f0137d..df02a38ada 100644
--- a/epmet-module/epmet-third-platform/epmet-third-platform-server/src/main/java/com/epmet/service/impl/DbyWechatExtServiceImpl.java
+++ b/epmet-module/epmet-third-platform/epmet-third-platform-server/src/main/java/com/epmet/service/impl/DbyWechatExtServiceImpl.java
@@ -53,7 +53,7 @@ public class DbyWechatExtServiceImpl implements DbyWechatExtService {
} catch (AesException e) {
e.printStackTrace();
}
- log.info(ModuleConstant.SUCCESS_TICKET);
+ log.info(ModuleConstant.END_TICKET);
return ModuleConstant.SUCCESS;
}
}
diff --git a/epmet-module/epmet-third-platform/epmet-third-platform-server/src/main/java/com/epmet/util/ModuleConstant.java b/epmet-module/epmet-third-platform/epmet-third-platform-server/src/main/java/com/epmet/util/ModuleConstant.java
index 0706f08250..98dd15baa5 100644
--- a/epmet-module/epmet-third-platform/epmet-third-platform-server/src/main/java/com/epmet/util/ModuleConstant.java
+++ b/epmet-module/epmet-third-platform/epmet-third-platform-server/src/main/java/com/epmet/util/ModuleConstant.java
@@ -16,8 +16,14 @@ public interface ModuleConstant {
String ERROR_TICKET = "微信开放平台,第三方平台获取【验证票据】失败";
- String SUCCESS_TICKET = "==============================结束授权事件接收URL=================================";
+ String END_TICKET = "==============================结束授权事件接收URL=================================";
String SUCCESS = "success";
+ String URL_TICKET = "授权事件接收URL,验证票据";
+
+ String SUCCESS_TICKET = "第三方平台授权事件接收URL,验证票据成功";
+
+ String ERROR_URL_TICKET = "第三方平台授权事件接收URL,验证票据异常";
+
}
diff --git a/epmet-module/epmet-third-platform/epmet-third-platform.iml b/epmet-module/epmet-third-platform/epmet-third-platform.iml
deleted file mode 100644
index 0d9345ff78..0000000000
--- a/epmet-module/epmet-third-platform/epmet-third-platform.iml
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file