|
|
@@ -2619,11 +2619,18 @@ class StoreOrder extends BaseModel
|
|
|
$count = 0;
|
|
|
foreach ($sps as $vvv) {
|
|
|
if (StoreOrder::where('uid', $vvv)->where('paid', 1)->where('refund_status', 0)->where('is_del', 0)->where('is_system_del', 0)
|
|
|
- ->where('id', '<>', $order['id'])->where('suit', '>', 0)->find()) {
|
|
|
+ ->where('suit', '>', 0)->find()) {
|
|
|
$count++;
|
|
|
}
|
|
|
}
|
|
|
- if ($count >= $lay_award['recommend']) {
|
|
|
+ if ($count >= $lay_award['recommend']
|
|
|
+ || StoreOrder::where('uid', $spread['uid'])
|
|
|
+ ->where('paid', 1)
|
|
|
+ ->where('refund_status', 0)
|
|
|
+ ->where('is_del', 0)
|
|
|
+ ->where('is_system_del', 0)
|
|
|
+ ->where('suit', '>', 0)
|
|
|
+ ->sum('suit') >= 25) {
|
|
|
if ($suit) {
|
|
|
$brokeragePrice = bcmul($lay_award['award'], $suit, 2);
|
|
|
if ($brokeragePrice > 0) {
|