Commit 0a3ee600 by zhiwj

修改bug

parent 1314dd5e
......@@ -18,4 +18,6 @@ public interface CallBackApiService {
* @return
*/
ServiceResponse<Void> weChatCallBack(String params, String openid, Integer type);
ServiceResponse<Void> weChatCallBack(String json);
}
package com.gic.enterprise.service.outer.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.auth.service.AuditorApiService;
import com.gic.enterprise.service.CallBackApiService;
......@@ -28,4 +30,14 @@ public class CallBackApiServiceImpl implements CallBackApiService {
}
return ServiceResponse.success();
}
@Override
public ServiceResponse<Void> weChatCallBack(String json) {
logger.info("回调:{}", json);
JSONObject jsonObject = JSON.parseObject(json);
if (jsonObject.getInteger("type") == 1) {
return auditorApiService.receiveOpenid(jsonObject.getString("params"), jsonObject.getString("openid"));
}
return ServiceResponse.success();
}
}
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