Commit 2b9604d1 by 徐高华

Merge branch 'feature/xgh/2406企微托管' into 'developer'

托管回调

See merge request !2044
parents bc067075 b7a296d6
...@@ -12,6 +12,7 @@ import com.gic.haoban.task.manage.api.enums.OpenQwMsgTypeEnum; ...@@ -12,6 +12,7 @@ import com.gic.haoban.task.manage.api.enums.OpenQwMsgTypeEnum;
import com.gic.mq.sdk.GicMQClient; import com.gic.mq.sdk.GicMQClient;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -21,6 +22,7 @@ import org.springframework.web.bind.annotation.ResponseBody; ...@@ -21,6 +22,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.sql.Struct;
import java.util.*; import java.util.*;
@Controller @Controller
...@@ -41,6 +43,9 @@ public class QywxCallbackController extends WebBaseController { ...@@ -41,6 +43,9 @@ public class QywxCallbackController extends WebBaseController {
try { try {
String body = IOUtils.toString(request.getInputStream()) ; String body = IOUtils.toString(request.getInputStream()) ;
logger.info("企微消息下发={}",body); logger.info("企微消息下发={}",body);
if(StringUtils.isBlank(body)) {
return "ok" ;
}
JSONObject jsonObject = JSONObject.parseObject(body) ; JSONObject jsonObject = JSONObject.parseObject(body) ;
int type = jsonObject.getIntValue("type") ; int type = jsonObject.getIntValue("type") ;
String uuid = jsonObject.getString("uuid") ; String uuid = jsonObject.getString("uuid") ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment