Compare commits
5 Commits
479fab6bfa
...
96411f2225
| Author | SHA1 | Date |
|---|---|---|
|
|
96411f2225 | |
|
|
96f2baf1df | |
|
|
dde1883809 | |
|
|
b68aa6d12c | |
|
|
66c86b52f9 |
|
|
@ -9,6 +9,7 @@ use Dcat\Admin\Form;
|
||||||
use Dcat\Admin\Grid;
|
use Dcat\Admin\Grid;
|
||||||
use Dcat\Admin\Http\Controllers\AdminController;
|
use Dcat\Admin\Http\Controllers\AdminController;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
class OrderFakeController extends AdminController
|
class OrderFakeController extends AdminController
|
||||||
{
|
{
|
||||||
|
|
@ -53,7 +54,9 @@ class OrderFakeController extends AdminController
|
||||||
});
|
});
|
||||||
}, '发单人名称');
|
}, '发单人名称');
|
||||||
});
|
});
|
||||||
|
$grid->disableEditButton();
|
||||||
|
$grid->disableDeleteButton();
|
||||||
|
$grid->disableActions();
|
||||||
$grid->disableViewButton();
|
$grid->disableViewButton();
|
||||||
$grid->scrollbarX();
|
$grid->scrollbarX();
|
||||||
});
|
});
|
||||||
|
|
@ -169,6 +172,9 @@ JS
|
||||||
$form->created_by = Admin::user()->id;
|
$form->created_by = Admin::user()->id;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
$form->saved(function (Form $form) {
|
||||||
|
Order::where('order_sn', $form->order_sn)->increment('gendan_num', $form->fake_count);
|
||||||
|
});
|
||||||
|
|
||||||
$form->footer(function ($footer) {
|
$form->footer(function ($footer) {
|
||||||
$footer->disableViewCheck();
|
$footer->disableViewCheck();
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ use App\Model\Customer\CustomerFollow;
|
||||||
use App\Model\Feedback;
|
use App\Model\Feedback;
|
||||||
use App\Model\Material;
|
use App\Model\Material;
|
||||||
use App\Model\Order;
|
use App\Model\Order;
|
||||||
|
use App\Model\OrderFake;
|
||||||
use App\Model\Seller\Shop;
|
use App\Model\Seller\Shop;
|
||||||
use App\Service\CustomerService;
|
use App\Service\CustomerService;
|
||||||
use App\Service\MaterialService;
|
use App\Service\MaterialService;
|
||||||
|
|
@ -778,6 +779,16 @@ class CustomerController extends BaseController
|
||||||
|
|
||||||
$orders = $query->orderBy('id', 'desc')
|
$orders = $query->orderBy('id', 'desc')
|
||||||
->paging($size);
|
->paging($size);
|
||||||
|
|
||||||
|
foreach ($orders as $item) {
|
||||||
|
$fake = OrderFake::where('order_sn', $item->order_sn)->first();
|
||||||
|
if ($fake) {
|
||||||
|
$item->gendan_num_origin = $item->gendan_num;
|
||||||
|
$item->gendan_num += $fake->fake_count;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $this->jsonSuccess($orders);
|
return $this->jsonSuccess($orders);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -829,7 +840,7 @@ class CustomerController extends BaseController
|
||||||
'lottery:id,name',
|
'lottery:id,name',
|
||||||
'pOrder:id,pid,lottery_state,lottery_prize,lottery_tax_prize,lottery_send_prize'
|
'pOrder:id,pid,lottery_state,lottery_prize,lottery_tax_prize,lottery_send_prize'
|
||||||
])->select([
|
])->select([
|
||||||
'id', 'pid','type', 'play_type', 'lottery_state', 'lottery_prize','lottery_tax_prize','lottery_send_prize', 'lottery_id', 'pay_at','order_sn','money','union_piece_total', 'union_piece_buy','union_piece_money', 'union_money', 'union_piece_self','union_piece_keep'
|
'id', 'pid','type', 'play_type', 'lottery_state', 'lottery_prize','lottery_tax_prize','lottery_send_prize', 'lottery_id', 'pay_at','order_sn','money','union_piece_total', 'union_piece_buy','union_piece_money', 'union_money', 'union_piece_self','union_piece_keep','revoke_message','revoke_at'
|
||||||
])
|
])
|
||||||
->where('customer_id', $customer->id)
|
->where('customer_id', $customer->id)
|
||||||
->where('pay_state', PayState::SUCCESS);
|
->where('pay_state', PayState::SUCCESS);
|
||||||
|
|
|
||||||
|
|
@ -429,6 +429,12 @@ class Order extends BaseModel
|
||||||
->where('pay_state', PayState::SUCCESS)
|
->where('pay_state', PayState::SUCCESS)
|
||||||
->whereIn('lottery_state', $this->gendanLotteryState())
|
->whereIn('lottery_state', $this->gendanLotteryState())
|
||||||
->count();
|
->count();
|
||||||
|
if ($this->created_date <= '20260704') {
|
||||||
|
$fake = OrderFake::where('order_sn', $this->order_sn)->first();
|
||||||
|
if ($fake) {
|
||||||
|
$gendanCount += $fake->fake_count;
|
||||||
|
}
|
||||||
|
}
|
||||||
$info['count_gendan'] = $gendanCount;
|
$info['count_gendan'] = $gendanCount;
|
||||||
$info['count_default_show'] = 10;
|
$info['count_default_show'] = 10;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ use App\Model\Seller\Seller;
|
||||||
use App\Utils\Helps;
|
use App\Utils\Helps;
|
||||||
use App\Utils\ThrowException;
|
use App\Utils\ThrowException;
|
||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
|
|
@ -436,6 +437,19 @@ class JclqService implements IJingcai
|
||||||
*/
|
*/
|
||||||
public function validZuHe($allowPlanNum, $data, $combinationLen=2)
|
public function validZuHe($allowPlanNum, $data, $combinationLen=2)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$inputData = [];
|
||||||
|
foreach ($data as $id => $item) {
|
||||||
|
if (count($item) == 1) {
|
||||||
|
$itemValues = array_values($item);
|
||||||
|
if (isset($itemValues[0]) && count($itemValues[0]) == 1) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$inputData[$id] = $item;
|
||||||
|
}
|
||||||
|
$data = $inputData;
|
||||||
|
|
||||||
$oddsMatch = $this->generateCombinationInput($data);
|
$oddsMatch = $this->generateCombinationInput($data);
|
||||||
$zuhes = Helps::getCombinationData($oddsMatch, $combinationLen);
|
$zuhes = Helps::getCombinationData($oddsMatch, $combinationLen);
|
||||||
if (count($zuhes) > $allowPlanNum) {
|
if (count($zuhes) > $allowPlanNum) {
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ use App\Model\Zq\JczqResult;
|
||||||
use App\Utils\Helps;
|
use App\Utils\Helps;
|
||||||
use App\Utils\ThrowException;
|
use App\Utils\ThrowException;
|
||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
|
|
@ -1006,6 +1007,19 @@ class JczqService implements IJingcai
|
||||||
*/
|
*/
|
||||||
public function validZuHe($allowPlanNum, $data, $combinationLen=2)
|
public function validZuHe($allowPlanNum, $data, $combinationLen=2)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$inputData = [];
|
||||||
|
foreach ($data as $id => $item) {
|
||||||
|
if (count($item) == 1) {
|
||||||
|
$itemValues = array_values($item);
|
||||||
|
if (isset($itemValues[0]) && count($itemValues[0]) == 1) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$inputData[$id] = $item;
|
||||||
|
}
|
||||||
|
$data = $inputData;
|
||||||
|
|
||||||
$oddsMatch = $this->generateCombinationInput($data);
|
$oddsMatch = $this->generateCombinationInput($data);
|
||||||
$zuhes = Helps::getCombinationData($oddsMatch, $combinationLen);
|
$zuhes = Helps::getCombinationData($oddsMatch, $combinationLen);
|
||||||
if (count($zuhes) > $allowPlanNum) {
|
if (count($zuhes) > $allowPlanNum) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue