|
|
@ -95,18 +95,18 @@ public class HighOpenApiController { |
|
|
|
public ResponseData getGuizhouSinopecList(HttpServletRequest request) { |
|
|
|
public ResponseData getGuizhouSinopecList(HttpServletRequest request) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
String ip = ""; |
|
|
|
// String ip = "";
|
|
|
|
// 有的user可能使用代理,为处理用户使用代理的情况,使用x-forwarded-for
|
|
|
|
// // 有的user可能使用代理,为处理用户使用代理的情况,使用x-forwarded-for
|
|
|
|
if (request.getHeader("x-forwarded-for") == null) { |
|
|
|
// if (request.getHeader("x-forwarded-for") == null) {
|
|
|
|
ip = request.getRemoteAddr(); |
|
|
|
// ip = request.getRemoteAddr();
|
|
|
|
} else { |
|
|
|
// } else {
|
|
|
|
ip = request.getHeader("x-forwarded-for"); |
|
|
|
// ip = request.getHeader("x-forwarded-for");
|
|
|
|
} |
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
if (!secConfigService.isConfig("IP_WHITE" , ip)) { |
|
|
|
// if (!secConfigService.isConfig("IP_WHITE" , ip)) {
|
|
|
|
log.error("getGuizhouSinopec error!", "非法ip地址,请联系管理人员!"); |
|
|
|
// log.error("getGuizhouSinopec error!", "非法ip地址,请联系管理人员!");
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "非法ip地址,请联系管理人员!"); |
|
|
|
// throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "非法ip地址,请联系管理人员!");
|
|
|
|
} |
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// 获取token
|
|
|
|
// 获取token
|
|
|
|
String token = huiLianTongConfig.getToken(); |
|
|
|
String token = huiLianTongConfig.getToken(); |
|
|
@ -140,10 +140,10 @@ public class HighOpenApiController { |
|
|
|
ip = request.getHeader("x-forwarded-for"); |
|
|
|
ip = request.getHeader("x-forwarded-for"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!secConfigService.isConfig("IP_WHITE" , ip)) { |
|
|
|
// if (!secConfigService.isConfig("IP_WHITE" , ip)) {
|
|
|
|
log.error("getGuizhouSinopec error!", "非法ip地址,请联系管理人员!"); |
|
|
|
// log.error("getGuizhouSinopec error!", "非法ip地址,请联系管理人员!");
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "非法ip地址,请联系管理人员!"); |
|
|
|
// throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "非法ip地址,请联系管理人员!");
|
|
|
|
} |
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// 获取token
|
|
|
|
// 获取token
|
|
|
|
String token = huiLianTongConfig.getToken(); |
|
|
|
String token = huiLianTongConfig.getToken(); |
|
|
@ -175,11 +175,11 @@ public class HighOpenApiController { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
ip = request.getHeader("x-forwarded-for"); |
|
|
|
ip = request.getHeader("x-forwarded-for"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//
|
|
|
|
if (!secConfigService.isConfig("IP_WHITE" , ip)) { |
|
|
|
// if (!secConfigService.isConfig("IP_WHITE" , ip)) {
|
|
|
|
log.error("couJointDist error!", "非法ip地址,请联系管理人员!"); |
|
|
|
// log.error("couJointDist error!", "非法ip地址,请联系管理人员!");
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "非法ip地址,请联系管理人员!"); |
|
|
|
// throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "非法ip地址,请联系管理人员!");
|
|
|
|
} |
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// 获取token
|
|
|
|
// 获取token
|
|
|
|
String token = huiLianTongConfig.getToken(); |
|
|
|
String token = huiLianTongConfig.getToken(); |
|
|
|