|
@ -12,6 +12,8 @@ import org.dom4j.Element;
|
|
|
import org.dom4j.io.SAXReader;
|
|
|
import org.json.JSONException;
|
|
|
import org.json.JSONObject;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@ -31,6 +33,8 @@ public class WeiXinCoreService extends BaseService {
|
|
|
@Autowired
|
|
|
private WeiXinEventProcess weiXinEventProcess;
|
|
|
|
|
|
private Logger logger= LoggerFactory.getLogger( WeiXinCoreService.class);
|
|
|
|
|
|
/**
|
|
|
* 微信推送消息处理
|
|
|
*
|
|
@ -82,7 +86,7 @@ public class WeiXinCoreService extends BaseService {
|
|
|
private String messageProcess(Map<String, String> message) throws Exception {
|
|
|
String msgType = message.get("MsgType");
|
|
|
String result = "";
|
|
|
|
|
|
logger.info("msgType:"+msgType);
|
|
|
switch (msgType) {
|
|
|
case WeiXinMessageUtils.REQ_MESSAGE_TYPE_EVENT: // 事件消息
|
|
|
result = weiXinEventProcess.eventProcess(message);
|
|
@ -91,9 +95,9 @@ public class WeiXinCoreService extends BaseService {
|
|
|
String content = message.get("Content");
|
|
|
if ("续签".equals(content)){
|
|
|
// 发送续签和签约图文消息
|
|
|
System.out.print("content======? "+content);
|
|
|
logger.info("content======? "+content);
|
|
|
result = weiXinEventProcess.replyKeyword(message);
|
|
|
System.out.print("图文结束======? ");
|
|
|
logger.info("图文结束======? ");
|
|
|
}
|
|
|
break;
|
|
|
default:
|