作者 lyh

gx

... ... @@ -9,6 +9,7 @@
namespace App\Console\Commands\DeleteCategory;
use App\Models\Com\NoticeLog;
use Illuminate\Console\Command;
/**
... ... @@ -52,6 +53,15 @@ class DeleteProductCategory extends Command
* @time :2024/5/16 15:02
*/
public function handle(){
while (true){
$noticeLogModel = new NoticeLog();
$list = $noticeLogModel->list(['status'=>NoticeLog::STATUS_PENDING,'type'=>NoticeLog::DELETE_PRODUCT_CATEGORY],'id',['*'],'asc','100');
if(empty($list)){
sleep(100);
}
foreach ($list as $v){
}
}
}
}
... ...
... ... @@ -77,8 +77,8 @@ class NewsController extends BaseController
if(isset($this->map['name']) && !empty($this->map['name'])){
$query = $query->where('name',$this->map['name'][0],'%'.$this->map['name'][1].'%');
}
if(!empty($this->map['start_at']) && !empty($this->map['end_at'])){
$query->whereBetween('created_at', [$this->map['start_at'],$this->map['end_at']]);
if(!empty($this->param['start_at']) && !empty($this->param['end_at'])){
$query->whereBetween('created_at', [$this->param['start_at'],$this->param['end_at']]);
}
return $query;
}
... ...
... ... @@ -2,9 +2,10 @@
namespace App\Models\Com;
use App\Helper\Arr;
use App\Models\Base;
use Illuminate\Database\Eloquent\Model;
class NoticeLog extends Model
class NoticeLog extends Base
{
//设置关联表名
protected $table = 'gl_notice_log';
... ...