lanzu_qinsheng 5 years ago
parent
commit
1aefbaf144
  1. 2
      app/Admin/Actions/Tools/ShowOrderStateHandle.php
  2. 6
      app/Admin/Repositories/ImsCjdcOrderMain.php

2
app/Admin/Actions/Tools/ShowOrderStateHandle.php

@ -17,7 +17,7 @@ class ShowOrderStateHandle extends AbstractTool
protected function script() protected function script()
{ {
$url = "order?state=".$this->state;
$url = "order?state=".$this->state.'&'."time=".(time()-(7*86400));
return <<<JS return <<<JS
$(".order_state_{$this->state}").on('click',function () { $(".order_state_{$this->state}").on('click',function () {
window.location.href = "{$url}" window.location.href = "{$url}"

6
app/Admin/Repositories/ImsCjdcOrderMain.php

@ -19,12 +19,16 @@ class ImsCjdcOrderMain extends EloquentRepository
{ {
$builder = new \App\Models\ImsCjdcOrderMain(); $builder = new \App\Models\ImsCjdcOrderMain();
$time = request()->input('time');
$builder = $builder::leftJoin('lanzu_user','lanzu_user.id','lanzu_order_main.user_id') $builder = $builder::leftJoin('lanzu_user','lanzu_user.id','lanzu_order_main.user_id')
->with('market') ->with('market')
->select('lanzu_order_main.*','lanzu_user.nick_name') ->select('lanzu_order_main.*','lanzu_user.nick_name')
->where('type',1) ->where('type',1)
->orderBy('lanzu_order_main.id','desc');//只取线上订单数据 ->orderBy('lanzu_order_main.id','desc');//只取线上订单数据
if ($time){
$builder = $builder->where('lanzu_order_main.created_at','>',$time);
}
$this->setSort($model); $this->setSort($model);
$this->setPaginate($model); $this->setPaginate($model);

Loading…
Cancel
Save