Commit bfde03c8 by 徐高华

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

Feature/xgh/2406企微托管

See merge request !2043
parents 3d83a746 b7a296d6
......@@ -12,14 +12,17 @@ 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;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
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
......@@ -35,10 +38,14 @@ public class QywxCallbackController extends WebBaseController {
@RequestMapping("qywx-msg-notice")
@IgnoreLogin
@ResponseBody
public Object callback(HttpServletRequest request , HttpServletResponse response) {
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