Commit b7a296d6 by 徐高华

托管回调

parent 3b7005bb
......@@ -12,6 +12,7 @@ import com.gic.haoban.task.manage.api.enums.OpenQwMsgTypeEnum;
import com.gic.mq.sdk.GicMQClient;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -21,6 +22,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.sql.Struct;
import java.util.*;
@Controller
......@@ -41,6 +43,9 @@ public class QywxCallbackController extends WebBaseController {
try {
String body = IOUtils.toString(request.getInputStream()) ;
logger.info("企微消息下发={}",body);
if(StringUtils.isBlank(body)) {
return "ok" ;
}
JSONObject jsonObject = JSONObject.parseObject(body) ;
int type = jsonObject.getIntValue("type") ;
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