From fbaa8f0208add7482e7cef6afcee2de1de31517f Mon Sep 17 00:00:00 2001 From: mzeros Date: Sat, 7 Dec 2024 12:26:35 +0800 Subject: [PATCH] =?UTF-8?q?feat(gateway):=20=E6=96=B0=E5=A2=9E=E6=8A=96?= =?UTF-8?q?=E9=9F=B3=E4=BA=A7=E5=93=81=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增抖音币的验证规则和错误提示 - 增加商户日限额和上游充值失败的错误提示 - 针对抖音币添加数量和面值的验证逻辑 --- app/gateway/controller/v4/Core.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/gateway/controller/v4/Core.php b/app/gateway/controller/v4/Core.php index 25c458e..2b9ffe3 100644 --- a/app/gateway/controller/v4/Core.php +++ b/app/gateway/controller/v4/Core.php @@ -68,9 +68,13 @@ class Core extends Controller -102 => '订单号重复', -103 => '请求错误,请求格式不正确,请使用json请求', -104 => '回调渠道订单号不匹配,请核对', + -105 => '该产品验证规则不过,请联系管理员', -201 => '安全进价低于实际进价', + -601 => '该商户已经超过日限额,下单失败', + -602 => '充值失败,请核对上游', + -801 => 'ip: 请求错误,不在白名单', -802 => '方法不存在', -803 => '版本号不正确', @@ -118,6 +122,7 @@ class Core extends Controller } $this->input['proid'] = $this->proid; $this->product = $pinfo['key']; + if ($this->product != 'dhcz') { if (!str_contains($this->product, '_cash')) { $this->input['cash'] = $pinfo['value']; @@ -158,6 +163,17 @@ class Core extends Controller $this->input(); $input = $this->input; + + if($this->product == 'dy'){ + if(!isset($this->input['num'])){ + $this->no(-105,'该产品需要输入数量'); + } + $num_cash = $this->input['cash'] * $this->input['num']??1; + if($num_cash < 10){ + $this->no(-105,'面值至少10元及以上'); + } + } + $ip_white_data = $this->merchant['ip_white']; $request_ip = $this->getRealIp(); // if()