aggiunto :

->where(function ($query) {
                $query->where('DescrizioneStatoProdotto', 'In commercio')
                    ->orWhere('DescrizioneStatoProdotto', '2023 in commercio')
                    ->orWhere('DescrizioneStatoProdotto', 'Vendita sito')
                    ->orWhere('DescrizioneStatoProdotto', 'In prevendita')
                    ->orWhere('DescrizioneStatoProdotto', 'Prossima uscita');
            })
This commit is contained in:
paoloar77
2025-04-16 15:48:50 +02:00
parent 89f44f02d9
commit 9d64036519
7 changed files with 53 additions and 15 deletions

View File

@@ -68,10 +68,12 @@ class ProductUpdateDataPubb extends Command
->where(function ($query) { ->where(function ($query) {
$query->where('DescrizioneStatoProdotto', 'In commercio') $query->where('DescrizioneStatoProdotto', 'In commercio')
->orWhere('DescrizioneStatoProdotto', '2023 in commercio')
->orWhere('DescrizioneStatoProdotto', 'Vendita sito')
->orWhere('DescrizioneStatoProdotto', 'In prevendita') ->orWhere('DescrizioneStatoProdotto', 'In prevendita')
->orWhere('DescrizioneStatoProdotto', 'Prossima uscita'); ->orWhere('DescrizioneStatoProdotto', 'Prossima uscita');
}) })
->orderBy('Titolo') ->orderBy('Titolo')
->take(1) ->take(1)
->get(); ->get();

View File

@@ -85,10 +85,12 @@ class ProductUpdateGm extends Command
->where('data', '>=', $fromtime) ->where('data', '>=', $fromtime)
->where(function ($query) { ->where(function ($query) {
$query->where('DescrizioneStatoProdotto', 'In commercio') $query->where('DescrizioneStatoProdotto', 'In commercio')
->orWhere('DescrizioneStatoProdotto', '2023 in commercio')
->orWhere('DescrizioneStatoProdotto', 'Vendita sito')
->orWhere('DescrizioneStatoProdotto', 'In prevendita') ->orWhere('DescrizioneStatoProdotto', 'In prevendita')
->orWhere('DescrizioneStatoProdotto', 'Prossima uscita'); ->orWhere('DescrizioneStatoProdotto', 'Prossima uscita');
}) })
//->where('DescrizioneTipologia','Video Streaming') //->where('DescrizioneTipologia','Video Streaming')
->orderBy('Titolo') ->orderBy('Titolo')
->get(); ->get();

View File

@@ -82,6 +82,8 @@ class ProductUpdateISBN extends Command
->where('data', '>=', $fromtime) ->where('data', '>=', $fromtime)
->where(function ($query) { ->where(function ($query) {
$query->where('DescrizioneStatoProdotto', 'In commercio') $query->where('DescrizioneStatoProdotto', 'In commercio')
->orWhere('DescrizioneStatoProdotto', '2023 in commercio')
->orWhere('DescrizioneStatoProdotto', 'Vendita sito')
->orWhere('DescrizioneStatoProdotto', 'In prevendita') ->orWhere('DescrizioneStatoProdotto', 'In prevendita')
->orWhere('DescrizioneStatoProdotto', 'Prossima uscita'); ->orWhere('DescrizioneStatoProdotto', 'Prossima uscita');
}) })

View File

@@ -84,10 +84,12 @@ class TestPao extends Command
->where('data', '>=', $fromtime) ->where('data', '>=', $fromtime)
->where(function ($query) { ->where(function ($query) {
$query->where('DescrizioneStatoProdotto', 'In commercio') $query->where('DescrizioneStatoProdotto', 'In commercio')
->orWhere('DescrizioneStatoProdotto', '2023 in commercio')
->orWhere('DescrizioneStatoProdotto', 'Vendita sito')
->orWhere('DescrizioneStatoProdotto', 'In prevendita') ->orWhere('DescrizioneStatoProdotto', 'In prevendita')
->orWhere('DescrizioneStatoProdotto', 'Prossima uscita'); ->orWhere('DescrizioneStatoProdotto', 'Prossima uscita');
}) })
//->where('DescrizioneTipologia','Video Streaming') //->where('DescrizioneTipologia','Video Streaming')
->orderBy('Titolo') ->orderBy('Titolo')
->take(2) ->take(2)
->get(); ->get();

View File

@@ -2445,6 +2445,7 @@ function getArticoloById($idarticolo)
//->where('T_WEB_Articoli.DataOra','>',$settingora->value) //->where('T_WEB_Articoli.DataOra','>',$settingora->value)
->where(function ($query) { ->where(function ($query) {
$query->where('DescrizioneStatoProdotto', 'In commercio') $query->where('DescrizioneStatoProdotto', 'In commercio')
->orWhere('DescrizioneStatoProdotto', '2023 in commercio')
->orWhere('DescrizioneStatoProdotto', 'In prevendita') ->orWhere('DescrizioneStatoProdotto', 'In prevendita')
->orWhere('DescrizioneStatoProdotto', 'Prossima uscita'); ->orWhere('DescrizioneStatoProdotto', 'Prossima uscita');
}) })
@@ -2476,7 +2477,13 @@ function getArticoliCartolibro()
->leftJoin(DB::raw('(SELECT l.IdTipoFormato, l.Descrizione as DescrizioneFormato FROM T_WEB_TipiFormato l JOIN (SELECT IdTipoFormato, MAX(DataOra) as data1 from T_WEB_TipiFormato GROUP BY IdTipoFormato) m ON l.IdTipoFormato = m.IdTipoFormato AND l.DataOra = m.data1 ) n'), function ($join) { ->leftJoin(DB::raw('(SELECT l.IdTipoFormato, l.Descrizione as DescrizioneFormato FROM T_WEB_TipiFormato l JOIN (SELECT IdTipoFormato, MAX(DataOra) as data1 from T_WEB_TipiFormato GROUP BY IdTipoFormato) m ON l.IdTipoFormato = m.IdTipoFormato AND l.DataOra = m.data1 ) n'), function ($join) {
$join->on('T_WEB_Articoli.IdTipoFormato', '=', 'n.IdTipoFormato'); $join->on('T_WEB_Articoli.IdTipoFormato', '=', 'n.IdTipoFormato');
}) })
->where('DescrizioneStatoProdotto', 'In commercio') ->where(function ($query) {
$query->where('DescrizioneStatoProdotto', 'In commercio')
->orWhere('DescrizioneStatoProdotto', '2023 in commercio')
->orWhere('DescrizioneStatoProdotto', 'Vendita sito')
->orWhere('DescrizioneStatoProdotto', 'In prevendita')
->orWhere('DescrizioneStatoProdotto', 'Prossima uscita');
})
->where('DescrizioneTipologia', 'Cartolibro') ->where('DescrizioneTipologia', 'Cartolibro')
->orderBy('Titolo') ->orderBy('Titolo')
->get(); ->get();
@@ -2502,7 +2509,13 @@ function getArticoliRiviste()
->leftJoin(DB::raw('(SELECT l.IdTipoFormato, l.Descrizione as DescrizioneFormato FROM T_WEB_TipiFormato l JOIN (SELECT IdTipoFormato, MAX(DataOra) as data1 from T_WEB_TipiFormato GROUP BY IdTipoFormato) m ON l.IdTipoFormato = m.IdTipoFormato AND l.DataOra = m.data1 ) n'), function ($join) { ->leftJoin(DB::raw('(SELECT l.IdTipoFormato, l.Descrizione as DescrizioneFormato FROM T_WEB_TipiFormato l JOIN (SELECT IdTipoFormato, MAX(DataOra) as data1 from T_WEB_TipiFormato GROUP BY IdTipoFormato) m ON l.IdTipoFormato = m.IdTipoFormato AND l.DataOra = m.data1 ) n'), function ($join) {
$join->on('T_WEB_Articoli.IdTipoFormato', '=', 'n.IdTipoFormato'); $join->on('T_WEB_Articoli.IdTipoFormato', '=', 'n.IdTipoFormato');
}) })
->where('DescrizioneStatoProdotto', 'In commercio') ->where(function ($query) {
$query->where('DescrizioneStatoProdotto', 'In commercio')
->orWhere('DescrizioneStatoProdotto', '2023 in commercio')
->orWhere('DescrizioneStatoProdotto', 'Vendita sito')
->orWhere('DescrizioneStatoProdotto', 'In prevendita')
->orWhere('DescrizioneStatoProdotto', 'Prossima uscita');
})
->where('DescrizioneTipologia', 'Rivista') ->where('DescrizioneTipologia', 'Rivista')
->orderBy('Titolo') ->orderBy('Titolo')
->get(); ->get();
@@ -2541,6 +2554,8 @@ function updateArticoloFromGM($idarticolo)
//->where('T_WEB_Articoli.DataOra','>',$settingora->value) //->where('T_WEB_Articoli.DataOra','>',$settingora->value)
->where(function ($query) { ->where(function ($query) {
$query->where('DescrizioneStatoProdotto', 'In commercio') $query->where('DescrizioneStatoProdotto', 'In commercio')
->orWhere('DescrizioneStatoProdotto', '2023 in commercio')
->orWhere('DescrizioneStatoProdotto', 'Vendita sito')
->orWhere('DescrizioneStatoProdotto', 'In prevendita') ->orWhere('DescrizioneStatoProdotto', 'In prevendita')
->orWhere('DescrizioneStatoProdotto', 'Prossima uscita'); ->orWhere('DescrizioneStatoProdotto', 'Prossima uscita');
}) })

View File

@@ -285,7 +285,13 @@ class ArticleController extends Controller
DB::raw('COALESCE(r.rank1Y, 0) as rank1Y'), DB::raw('COALESCE(r.rank1Y, 0) as rank1Y'),
DB::raw('s.ultimoOrdine') DB::raw('s.ultimoOrdine')
) )
->where('DescrizioneStatoProdotto', 'In commercio') ->where(function ($query) {
$query->where('DescrizioneStatoProdotto', 'In commercio')
->orWhere('DescrizioneStatoProdotto', '2023 in commercio')
->orWhere('DescrizioneStatoProdotto', 'Vendita sito')
->orWhere('DescrizioneStatoProdotto', 'In prevendita')
->orWhere('DescrizioneStatoProdotto', 'Prossima uscita');
})
->where('DescrizioneTipologia', 'Libri') ->where('DescrizioneTipologia', 'Libri')
->orderBy('totVen', 'desc') ->orderBy('totVen', 'desc')
->get(); ->get();
@@ -394,7 +400,13 @@ class ArticleController extends Controller
DB::raw('COALESCE(r.rank1Y, 0) as rank1Y'), DB::raw('COALESCE(r.rank1Y, 0) as rank1Y'),
DB::raw('s.ultimoOrdine') DB::raw('s.ultimoOrdine')
) )
->where('DescrizioneStatoProdotto', 'In commercio') ->where(function ($query) {
$query->where('DescrizioneStatoProdotto', 'In commercio')
->orWhere('DescrizioneStatoProdotto', '2023 in commercio')
->orWhere('DescrizioneStatoProdotto', 'Vendita sito')
->orWhere('DescrizioneStatoProdotto', 'In prevendita')
->orWhere('DescrizioneStatoProdotto', 'Prossima uscita');
})
->where('DescrizioneTipologia', 'Libri') ->where('DescrizioneTipologia', 'Libri')
//->orderBy('rank1Y', 'asc') //->orderBy('rank1Y', 'asc')
->orderBy('totFat', 'desc') ->orderBy('totFat', 'desc')

View File

@@ -3863,9 +3863,12 @@ Route::get('/updateproducts', function () {
->where('data', '>=', $fromtime) ->where('data', '>=', $fromtime)
->where(function ($query) { ->where(function ($query) {
$query->where('DescrizioneStatoProdotto', 'In commercio') $query->where('DescrizioneStatoProdotto', 'In commercio')
->orWhere('DescrizioneStatoProdotto', '2023 in commercio')
->orWhere('DescrizioneStatoProdotto', 'Vendita sito')
->orWhere('DescrizioneStatoProdotto', 'In prevendita')
->orWhere('DescrizioneStatoProdotto', 'Prossima uscita'); ->orWhere('DescrizioneStatoProdotto', 'Prossima uscita');
}) })
//->where('DescrizioneTipologia','Video Streaming') //->where('DescrizioneTipologia','Video Streaming')
->orderBy('Titolo') ->orderBy('Titolo')
->get(); ->get();
ob_end_flush(); ob_end_flush();