if ($theme['theme_installation']['type'] == ThemeInstallation::TYPE_UPDATE && ($theme['theme_installation']['processing'] || (!$theme['theme_installation']['processing'] && $theme['theme_installation']['processing_failed']))) {
$themeSaasTasks = ThemeSaasTask::whereJsonContains('theme_task_ids', $theme['theme_installation']['theme_installation_version_preset']['theme_installation_tasks'][0]['id'])->get()->toArray();
if (!empty($themeSaasTasks)) {
return true;
}
}
return false;
$themeInstallationIds = ThemeInstallation::select('theme_installation.id')
->join('theme_installation_task', function ($join) use ($themeTaskIds) {
$join->on('theme_installation.id', '=', 'theme_installation_task.theme_installation_id')
->where('theme_installation.type', ThemeInstallation::TYPE_UPDATE)
->where(function ($query) {
$query->where('theme_installation.processing', true)
->orWhere(function ($query) {
$query->where('theme_installation.processing', false)
->where('theme_installation.processing_failed', true);
});
})
->whereIn('theme_installation_task.id', $themeTaskIds);
})
->get();

select
`theme_installation`.`id`
from
`theme_installation`
inner join `theme_installation_task` on `theme_installation`.`id` = `theme_installation_task`.`theme_installation_id`
and `theme_installation`.`type` = 3
and (
`theme_installation`.`processing` = 1
or (
`theme_installation`.`processing` = 0
and `theme_installation`.`processing_failed` = 1
)
)
and `theme_installation_task`.`id` in (
513,
514,
515,
516,
517,
518,
519,
520,
521,
522,
523,
524,
525,
526,
527,
528,
529,
530,
531,
532,
533,
534,
535,
536,
537,
538,
539,
540,
541,
542,
543,
544,
545,
546,
547,
548,
549,
550,
551,
552,
553,
554,
557,
558,
559,
560,
561,
562,
563,
564,
565,
566,
567,
568,
569,
570,
571,
572,
573,
574,
575,
576,
577,
578,
579,
580,
581,
582,
583,
584,
585,
586,
587,
588,
589,
590,
591,
592,
593,
594,
595,
598,
599,
600,
613,
614,
615,
616,
617,
618
)
where
`theme_installation`.`deleted_at` is null
PHP / Laravel / Yii2 老项目维护与长期技术支持
如果你的 PHP / Laravel / Yii2 项目已经上线,但遇到原开发离职、Bug 长期无人修复、接口不稳定、性能下降、代码难以接手等问题,可以联系我做一次远程技术排查。
适合以下情况:
✅ 老旧 PHP 系统无人维护
✅ Laravel / Yii2 项目 Bug 修复
✅ 后台管理系统小功能迭代
✅ RESTful API 接口排查
✅ MySQL / Redis / Nginx 性能问题
✅ 长期远程兼职维护
可先从一次小问题开始:
✅ 线上报错排查
✅ 接口异常分析
✅ 慢查询与性能瓶颈定位
✅ 代码结构初步评估
✅ 部署环境与日志检查
如需咨询,请联系我,并注明:PHP 维护咨询。
联系方式:
Telegram:@shuijingwan
微信:13980074657
邮箱:shuijingwanwq@gmail.com

发表回复