Merge branch 'dev' of https://gitea.lihaink.cn/mkm/multi-store into dev
This commit is contained in:
commit
b8d086f35d
@ -67,16 +67,16 @@ class StoreController extends BaseApiController
|
|||||||
$recharge_type = $this->request->post('recharge_type',''); //微信支付条码
|
$recharge_type = $this->request->post('recharge_type',''); //微信支付条码
|
||||||
$code = $this->request->post('code','');//验证码
|
$code = $this->request->post('code','');//验证码
|
||||||
$phone = $params['mobile'];
|
$phone = $params['mobile'];
|
||||||
if($code && $phone){
|
// if($code && $phone){
|
||||||
$remark = $phone.'_reporting';
|
// $remark = $phone.'_reporting';
|
||||||
$codeCache = Cache::get($remark);
|
// $codeCache = Cache::get($remark);
|
||||||
if(empty($codeCache)){
|
// if(empty($codeCache)){
|
||||||
return $this->fail('验证码不存在');
|
// return $this->fail('验证码不存在');
|
||||||
}
|
// }
|
||||||
if ($codeCache != $code) {
|
// if ($codeCache != $code) {
|
||||||
return $this->fail('验证码错误');
|
// return $this->fail('验证码错误');
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if($params['price']>10000){
|
if($params['price']>10000){
|
||||||
return $this->fail('充值金额不能大于10000');
|
return $this->fail('充值金额不能大于10000');
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,8 @@ class UserLogic extends BaseLogic
|
|||||||
$data['openid'] = UserAuth::where(['user_id'=>$uid,'terminal'=>1])->value('openid');
|
$data['openid'] = UserAuth::where(['user_id'=>$uid,'terminal'=>1])->value('openid');
|
||||||
$number=UserSign::where('uid',$uid)->where('status',0)->sum('number');
|
$number=UserSign::where('uid',$uid)->where('status',0)->sum('number');
|
||||||
$data['integral']=bcadd($data['integral'],$number,2);
|
$data['integral']=bcadd($data['integral'],$number,2);
|
||||||
$number = UserSign::where('uid',$uid)->where('status',0)->sum('number');
|
|
||||||
|
$number = UserSign::where('uid',$uid)->where(['status'=>0,'financial_pm'=>1])->sum('number');
|
||||||
$GetNumber = UserSign::where('uid',$uid)->where('status',1)->sum('number');
|
$GetNumber = UserSign::where('uid',$uid)->where('status',1)->sum('number');
|
||||||
$data['number'] =bcadd($number,0,2);
|
$data['number'] =bcadd($number,0,2);
|
||||||
$data['GetNumber'] =bcadd($GetNumber,0,2);
|
$data['GetNumber'] =bcadd($GetNumber,0,2);
|
||||||
|
@ -657,6 +657,11 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
}
|
}
|
||||||
bcscale(2);
|
bcscale(2);
|
||||||
// $user->now_money = bcadd($user->now_money, $price, 2);//v.1
|
// $user->now_money = bcadd($user->now_money, $price, 2);//v.1
|
||||||
|
$check = UserSign::where(['uid'=>$order->uid,'type'=>1])->count();
|
||||||
|
if(empty($check) && $user['user_ship'] == 0){
|
||||||
|
self::dealRechargeFrozen($order);
|
||||||
|
|
||||||
|
}
|
||||||
//更新等级
|
//更新等级
|
||||||
$user->user_ship = $order['user_ship'];
|
$user->user_ship = $order['user_ship'];
|
||||||
|
|
||||||
@ -666,11 +671,7 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
if($order['other_uid']>0){
|
if($order['other_uid']>0){
|
||||||
$uid=$order['other_uid'];
|
$uid=$order['other_uid'];
|
||||||
}
|
}
|
||||||
$check = UserSign::where(['uid'=>$order->uid,'type'=>1])->count();
|
|
||||||
if(empty($check)){
|
|
||||||
self::dealRechargeFrozen($order);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
PushService::push('wechat_mmp_' . $uid, $uid, ['type'=>'INDUSTRYMEMBERS','msg'=>'订单支付成功','data'=>['id'=>$order['id'],'paid'=>1]]);
|
PushService::push('wechat_mmp_' . $uid, $uid, ['type'=>'INDUSTRYMEMBERS','msg'=>'订单支付成功','data'=>['id'=>$order['id'],'paid'=>1]]);
|
||||||
PushService::push('store_merchant_' . $order['store_id'], $order['store_id'], ['type'=>'INDUSTRYMEMBERS','msg'=>'订单支付成功','data'=>['id'=>$order['id'],'paid'=>1]]);
|
PushService::push('store_merchant_' . $order['store_id'], $order['store_id'], ['type'=>'INDUSTRYMEMBERS','msg'=>'订单支付成功','data'=>['id'=>$order['id'],'paid'=>1]]);
|
||||||
@ -770,8 +771,7 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
$financeLogic->in($transaction_id, $order['pay_price'], OrderEnum::SUPPLIER_ORDER_OBTAINS, $order['store_id'], 0, 0, $order['pay_type']);
|
$financeLogic->in($transaction_id, $order['pay_price'], OrderEnum::SUPPLIER_ORDER_OBTAINS, $order['store_id'], 0, 0, $order['pay_type']);
|
||||||
$financeLogic->out($transaction_id, $order['pay_price'], OrderEnum::SUPPLIER_ORDER_OBTAINS, $order['store_id'], $order['staff_id'], 0, $order['pay_type']);
|
$financeLogic->out($transaction_id, $order['pay_price'], OrderEnum::SUPPLIER_ORDER_OBTAINS, $order['store_id'], $order['staff_id'], 0, $order['pay_type']);
|
||||||
$financeLogic->save();
|
$financeLogic->save();
|
||||||
if ($order['uid'] > 0 && $order['total_price'] > 500 && $order['pay_type'] !=18
|
if ($order['uid'] > 0 && $order['total_price'] >= 500 ) {
|
||||||
&& $order['pay_type'] !=3) {
|
|
||||||
$user_number = bcmul($order['pay_price'], '0.10', 2);
|
$user_number = bcmul($order['pay_price'], '0.10', 2);
|
||||||
$sing = [
|
$sing = [
|
||||||
'uid' => $order['uid'],
|
'uid' => $order['uid'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user