C端膨胀人数
parent
479fab6bfa
commit
66c86b52f9
|
|
@ -18,6 +18,11 @@ class OrderFakeController extends AdminController
|
||||||
|
|
||||||
protected function grid()
|
protected function grid()
|
||||||
{
|
{
|
||||||
|
$orders = OrderFake::paging(1);
|
||||||
|
foreach ($orders as $item) {
|
||||||
|
$item->fake_count += 100;
|
||||||
|
}
|
||||||
|
dd($orders->toArray());
|
||||||
return Grid::make(OrderFake::class, function (Grid $grid) {
|
return Grid::make(OrderFake::class, function (Grid $grid) {
|
||||||
$grid->model()->with([
|
$grid->model()->with([
|
||||||
'customer:id,name,nickname,phone',
|
'customer:id,name,nickname,phone',
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
if ($this->customerId() == 100) {
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -429,6 +429,10 @@ 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();
|
||||||
|
$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;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue