合并话费修改

dev-discount
袁野 2 years ago
parent bae3c80713
commit 58853e68a6
  1. 44
      hai-bweb/src/main/java/com/bweb/controller/HighOpenApiController.java

@ -95,18 +95,18 @@ public class HighOpenApiController {
public ResponseData getGuizhouSinopecList(HttpServletRequest request) {
try {
// String ip = "";
// // 有的user可能使用代理,为处理用户使用代理的情况,使用x-forwarded-for
// if (request.getHeader("x-forwarded-for") == null) {
// ip = request.getRemoteAddr();
// } else {
// ip = request.getHeader("x-forwarded-for");
// }
//
// if (!secConfigService.isConfig("IP_WHITE" , ip)) {
// log.error("getGuizhouSinopec error!", "非法ip地址,请联系管理人员!");
// throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "非法ip地址,请联系管理人员!");
// }
String ip = "";
// 有的user可能使用代理,为处理用户使用代理的情况,使用x-forwarded-for
if (request.getHeader("x-forwarded-for") == null) {
ip = request.getRemoteAddr();
} else {
ip = request.getHeader("x-forwarded-for");
}
if (!secConfigService.isConfig("IP_WHITE" , ip)) {
log.error("getGuizhouSinopec error!", "非法ip地址,请联系管理人员!");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "非法ip地址,请联系管理人员!");
}
// 获取token
String token = huiLianTongConfig.getToken();
@ -140,16 +140,16 @@ public class HighOpenApiController {
ip = request.getHeader("x-forwarded-for");
}
// if (!secConfigService.isConfig("IP_WHITE" , ip)) {
// log.error("getGuizhouSinopec error!", "非法ip地址,请联系管理人员!");
// throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "非法ip地址,请联系管理人员!");
// }
if (!secConfigService.isConfig("IP_WHITE" , ip)) {
log.error("getGuizhouSinopec error!", "非法ip地址,请联系管理人员!");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "非法ip地址,请联系管理人员!");
}
// 获取token
String token = huiLianTongConfig.getToken();
// 查询电子卡券类型
JSONObject data = HuiLianTongConfig.getCouState(token, object.getString("orderNo"));
JSONObject data = HuiLianTongConfig.getCouState(token, object.getString("couNo"));
if (!data.getString("result").equals("success")) {
log.error("HighOpenApiController -> insertCoupon() error!","查询电子券状态失败");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询电子券状态失败");
@ -175,11 +175,11 @@ public class HighOpenApiController {
} else {
ip = request.getHeader("x-forwarded-for");
}
//
// if (!secConfigService.isConfig("IP_WHITE" , ip)) {
// log.error("couJointDist error!", "非法ip地址,请联系管理人员!");
// throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "非法ip地址,请联系管理人员!");
// }
if (!secConfigService.isConfig("IP_WHITE" , ip)) {
log.error("couJointDist error!", "非法ip地址,请联系管理人员!");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "非法ip地址,请联系管理人员!");
}
// 获取token
String token = huiLianTongConfig.getToken();

Loading…
Cancel
Save