Merge branch 'dev' of https://gitea.lihaink.cn/mkm/multi-store into dev
This commit is contained in:
commit
63e86b21d7
@ -378,12 +378,13 @@ class StoreOrderLogic extends BaseLogic
|
||||
}
|
||||
$template = getenv('SMS_TEMPLATE');
|
||||
$check =(new SmsService())->client($phone,$template,$code);
|
||||
|
||||
if($check){
|
||||
if($type == 1){
|
||||
$remark = $param['uid'].'_smsPay';
|
||||
}else{
|
||||
}elseif($type == 2){
|
||||
$remark = $param['uid'].'_giftPay';
|
||||
}else{
|
||||
$remark = $param['uid'].'_moneyPay';//余额支付
|
||||
}
|
||||
Cache::set($remark,$code,5*60);
|
||||
return true;
|
||||
|
@ -118,6 +118,10 @@ class StoreOrderController extends BaseAdminController
|
||||
if ($order['order']['pay_price'] > $user['integral']) {
|
||||
return $this->fail('当前用户礼品券不足支付');
|
||||
}
|
||||
}elseif($params['type'] == 3){
|
||||
if ($order['order']['pay_price'] > $user['now_money']) {
|
||||
return $this->fail('当前用户余额不足支付');
|
||||
}
|
||||
}
|
||||
|
||||
$res = (new StoreOrderLogic())->dealSendSms($params, $params['type']);
|
||||
@ -165,6 +169,15 @@ class StoreOrderController extends BaseAdminController
|
||||
}
|
||||
}
|
||||
|
||||
if ($pay_type == PayEnum::BALANCE_PAY) {
|
||||
$remark = $uid . '_moneyPay';
|
||||
$code = Cache::get($remark);
|
||||
if ($code && isset($params['code']) && $code != $params['code']) {
|
||||
throw new Exception('验证码错误');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$user = null;
|
||||
if ($uid) {
|
||||
$user = User::where('id', $uid)->find();
|
||||
|
Loading…
x
Reference in New Issue
Block a user