mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-05-23 23:29:19 +08:00
Update Order.php
This commit is contained in:
parent
01dd3048e6
commit
13616e8049
@ -60,12 +60,12 @@ class Order extends Auth
|
|||||||
$order = ['uid' => $this->uuid];
|
$order = ['uid' => $this->uuid];
|
||||||
$order['order_no'] = CodeExtend::uniqidDate(18, 'N');
|
$order['order_no'] = CodeExtend::uniqidDate(18, 'N');
|
||||||
// 推荐人处理
|
// 推荐人处理
|
||||||
$order['from'] = input('from_uid', $this->user['pid1']);
|
$order['puid1'] = input('puid1', $this->user['pid1']);
|
||||||
if ($order['from'] == $this->uuid) $order['from'] = 0;
|
if ($order['puid1'] == $this->uuid) $order['puid1'] = 0;
|
||||||
if ($order['from'] > 0) {
|
if ($order['puid1'] > 0) {
|
||||||
$map = ['id' => $order['from'], 'status' => 1];
|
$map = ['id' => $order['puid1'], 'status' => 1];
|
||||||
$fromer = $this->app->db->name('DataUser')->where($map)->find();
|
$order['puid2'] = $this->app->db->name('DataUser')->where($map)->value('pid2');
|
||||||
if (empty($fromer)) $this->error('推荐人异常');
|
if (is_null($order['puid2'])) $this->error('推荐人异常');
|
||||||
}
|
}
|
||||||
foreach (explode('||', $rules) as $rule) {
|
foreach (explode('||', $rules) as $rule) {
|
||||||
[$code, $spec, $count] = explode('@', $rule);
|
[$code, $spec, $count] = explode('@', $rule);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user