From dd795a536ab51f2c62f9c34b4906696154cd8540 Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Thu, 6 Apr 2023 11:44:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=B9=E5=A4=96=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=8F=AF=E6=94=AF=E6=8C=81=E5=A4=9A=E4=B8=AAip?= =?UTF-8?q?=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/bweb/controller/ApiIpAddressController.java | 5 ++++- .../java/com/hai/service/impl/ApiIpAddressServiceImpl.java | 2 +- v1/src/main/java/com/v1/controller/orderController.java | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hai-bweb/src/main/java/com/bweb/controller/ApiIpAddressController.java b/hai-bweb/src/main/java/com/bweb/controller/ApiIpAddressController.java index 429394e9..d0f80611 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/ApiIpAddressController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/ApiIpAddressController.java @@ -69,6 +69,10 @@ public class ApiIpAddressController { ApiIpAddress apiIpAddressEdit = apiIpAddressService.findByMchId(apiIpAddress.getMchId()); + if (apiIpAddress.getIpAddress().length() > 250) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "超过最大可配置内容"); + } + // 判断是否存在ip地址内容 if (apiIpAddressEdit == null ) { apiIpAddress.setCreateTime(new Date()); @@ -81,7 +85,6 @@ public class ApiIpAddressController { } - return ResponseMsgUtil.success("新增成功"); } catch (Exception e) { log.error("ApiMerchantsController -> insertMerchant() error!",e); diff --git a/hai-service/src/main/java/com/hai/service/impl/ApiIpAddressServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/ApiIpAddressServiceImpl.java index 5e5a2bd4..247db69a 100644 --- a/hai-service/src/main/java/com/hai/service/impl/ApiIpAddressServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/ApiIpAddressServiceImpl.java @@ -55,7 +55,7 @@ public class ApiIpAddressServiceImpl implements ApiIpAddressService { public Boolean validationIpAddressLegal(String mchId, String ipAddress) { ApiIpAddressExample example = new ApiIpAddressExample(); - example.createCriteria().andMchIdEqualTo(mchId).andIpAddressEqualTo(ipAddress); + example.createCriteria().andMchIdEqualTo(mchId).andIpAddressLike("%" + ipAddress + "%"); List list = apiIpAddressMapper.selectByExample(example); diff --git a/v1/src/main/java/com/v1/controller/orderController.java b/v1/src/main/java/com/v1/controller/orderController.java index 5bcae0be..1040a9a2 100644 --- a/v1/src/main/java/com/v1/controller/orderController.java +++ b/v1/src/main/java/com/v1/controller/orderController.java @@ -62,7 +62,7 @@ public class orderController { @RequestMapping(value = "/createOrder", method = RequestMethod.POST) @ResponseBody - @ApiOperation(value = "充值预下单") + @ApiOperation(value = "创建订单") public ResponseData createOrder(@RequestBody JSONObject object , HttpServletRequest request ) { try {