1.本地生活上级列表优化
This commit is contained in:
parent
d6b444670c
commit
9354532380
@ -343,7 +343,7 @@ class PayLogic extends Logic
|
||||
if (isset($order['pay_status']) && $order['pay_status'] == PayEnum::ISPAID) {
|
||||
return JsonServer::error('订单已支付');
|
||||
}
|
||||
$xy_price = Procurementxy::where("user_id",$order['user_id'])->where('xy_state',1)->find();
|
||||
$xy_price = Procurementxy::where("user_id",$order['user_id'])->where('xy_state',1)->find();
|
||||
if($xy_price == null){
|
||||
return JsonServer::error('暂无额度,无法使用');
|
||||
}elseif($xy_price['xy_y_state']!=0){
|
||||
@ -592,7 +592,7 @@ class PayLogic extends Logic
|
||||
// $order['xy_y_price'] = $o['xy_y_price'];
|
||||
$order['xy_y_price'] = 0.01;
|
||||
}
|
||||
|
||||
|
||||
$order['user_id'] = $order_id;
|
||||
$order['order_sn'] = time().'xy123456';
|
||||
$RpayModel = new Procurementxyrpay();
|
||||
@ -658,6 +658,7 @@ class PayLogic extends Logic
|
||||
}
|
||||
//本地商家支付
|
||||
public static function localWxPay($user_id,$post,$client){
|
||||
$post['lid'] = 10;
|
||||
$res = WeChatPayServer::localserverWxPay($user_id,$post, $client);
|
||||
if (false === $res) {
|
||||
return JsonServer::error(WeChatPayServer::getError());
|
||||
@ -665,6 +666,50 @@ class PayLogic extends Logic
|
||||
if ((is_object($res) || is_string($res)) && $client != Client_::pc) {
|
||||
$res = (array)($res);
|
||||
}
|
||||
$company = Db::name("local_store")->where("lstore_id",$post['lid'])->where("is_delete",0)->find();
|
||||
$dt['lstore_id'] = $post['lid'];
|
||||
$dt['payment_type'] = $company['bankType'];
|
||||
$dt['account_name'] = $company['store_nickname'];
|
||||
$dt['bank_name'] = $company['bankName'];
|
||||
$dt['bank_card'] = $company['bankCard'];
|
||||
$dt['large_number'] = $post['largeNumber'];
|
||||
$dt['separate_account'] = round($post['money']*0.6,2);
|
||||
$dt['create_time'] = date("Y-m-d H:i:s");
|
||||
$dt['user_id'] = $user_id;
|
||||
$r = Db::name("local_store_order")->save($dt);
|
||||
// 基本户 5%
|
||||
$dt1['lstore_id'] = $post['lid'];
|
||||
$dt1['payment_type'] = 1;
|
||||
$dt1['account_name'] = "东龙汇";
|
||||
$dt1['bank_name'] = "中国工商银行";
|
||||
$dt1['bank_card'] = "1204068809100138961";
|
||||
$dt1['large_number'] = "102335006882";
|
||||
$dt1['separate_account'] = round($post['money']*0.08,2);
|
||||
$dt1['create_time'] = date("Y-m-d H:i:s");
|
||||
$dt1['user_id'] = $user_id;
|
||||
$r1 = Db::name("local_store_order")->save($dt1);
|
||||
// 22% 一般户
|
||||
$dt2['lstore_id'] = $post['lid'];
|
||||
$dt2['payment_type'] = 1;
|
||||
$dt2['account_name'] = "东龙汇";
|
||||
$dt2['bank_name'] = "中国工商银行";
|
||||
$dt2['bank_card'] = "1204064019200152507";
|
||||
$dt2['large_number'] = "102335006405";
|
||||
$dt2['separate_account'] = round($post['money']*0.22,2);
|
||||
$dt2['create_time'] = date("Y-m-d H:i:s");
|
||||
$dt2['user_id'] = $user_id;
|
||||
$r2 = Db::name("local_store_order")->save($dt2);
|
||||
// 10% 一般户
|
||||
$dt3['lstore_id'] = $post['lid'];
|
||||
$dt3['payment_type'] = 1;
|
||||
$dt3['account_name'] = "东龙汇";
|
||||
$dt3['bank_name'] = "中国工商银行";
|
||||
$dt3['bank_card'] = "1204064419000115357";
|
||||
$dt3['large_number'] = "1204064419000115357";
|
||||
$dt3['separate_account'] = round($post['money']*0.1,2);
|
||||
$dt3['create_time'] = date("Y-m-d H:i:s");
|
||||
$dt3['user_id'] = $user_id;
|
||||
$r3 = Db::name("local_store_order")->save($dt3);
|
||||
if (is_string($res)) {
|
||||
$data = [
|
||||
'code' => 1,
|
||||
@ -674,6 +719,7 @@ class PayLogic extends Logic
|
||||
];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
return JsonServer::success('微信支付发起成功', $res, 1);
|
||||
}
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user