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.

39 lines
1.2 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.PluginLicense;
import com.fr.plugin.PluginLicenseManager;
import com.fr.plugin.utils.MyUtils;
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 MyCheckLicenseHandler extends BaseHttpHandler {
@Override
public RequestMethod getMethod() {
return null;
}
@Override
public String getPath() {
return "/yt/check/license";
}
@Override
public boolean isPublic() {
return false;
}
@Override
public void handle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
PluginLicense var3 = PluginLicenseManager.getInstance().getPluginLicenseByID("com.fr.plugin.yituan");
JSONObject var4 = MyUtils.createSuccessResponseJSONObject();
boolean var5 = var3.isAvailable();
var4.put("authorized", var5);
WebUtils.flushSuccessMessageAutoClose(httpServletRequest, httpServletResponse, var4);
}
}