You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.5 KiB
45 lines
1.5 KiB
3 years ago
|
package com.fr.plugin.web.hander;
|
||
|
|
||
|
import com.fr.decision.fun.impl.BaseHttpHandler;
|
||
|
import com.fr.json.JSONObject;
|
||
|
import com.fr.plugin.config.YituanPri;
|
||
|
import com.fr.plugin.utils.MyUtils;
|
||
|
import com.fr.plugin.utils.YiTuanMaManager;
|
||
|
import com.fr.third.springframework.web.bind.annotation.RequestMethod;
|
||
|
import com.fr.web.utils.WebUtils;
|
||
|
|
||
|
import javax.servlet.http.HttpServletRequest;
|
||
|
import javax.servlet.http.HttpServletResponse;
|
||
|
|
||
|
public class GetConfigHandler extends BaseHttpHandler {
|
||
|
@Override
|
||
|
public RequestMethod getMethod() {
|
||
|
return RequestMethod.GET;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public String getPath() {
|
||
|
return "/yt/report/server/url";
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public boolean isPublic() {
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void handle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
|
||
|
JSONObject var3 = MyUtils.createSuccessResponseJSONObject();
|
||
|
YiTuanMaManager var4 = YiTuanMaManager.getInstance();
|
||
|
var3.put("reportServerUrl", var4.getReportServerUrl());
|
||
|
var3.put("appId", var4.getClientId());
|
||
|
var3.put("eid", var4.getEid());
|
||
|
var3.put("appSecret", var4.getClientSecret());
|
||
|
var3.put("readKey", var4.getGroupId());//groupid
|
||
|
var3.put("reportServerUrl", var4.getUrl());
|
||
|
var3.put("sendUserId", var4.getSendUserId());
|
||
|
|
||
|
WebUtils.flushSuccessMessageAutoClose(httpServletRequest, httpServletResponse, var3);
|
||
|
}
|
||
|
}
|