|
|
|
|
@ -91,10 +91,12 @@ class Feedback_model extends CI_Model {
|
|
|
|
|
|
|
|
|
|
$feedback_query =
|
|
|
|
|
$this->HT->query("
|
|
|
|
|
select top 40 tai_url,tad_content, tai_customerid, tai_title, tai_getdate, vci.cii2_name
|
|
|
|
|
select top 40 tai_url,tad_content, tai_customerid, tai_title, tai_getdate, vci.cii2_name, g.GRI_EntranceDate, country.COI2_Country
|
|
|
|
|
from Eva_TAInfo
|
|
|
|
|
left join Eva_TADetail on TAD_TAI_SN=TAI_SN
|
|
|
|
|
left join V_CIty_Info vci on vci.cii_sn = tai_cii_sn and vci.LGC_LGC = 1
|
|
|
|
|
left join GRoupInfo g on g.GRI_SN = TAI_GRI_SN
|
|
|
|
|
left JOIN V_Country_Info country on country.COI_SN = g.GRI_Country and country.LGC_LGC = 1
|
|
|
|
|
where TAD_Content is not null and vci.cii2_name = ? and tai_url not LIKE '%trustpilot.com%'
|
|
|
|
|
order by tai_getdate desc",
|
|
|
|
|
array($city_name_list[0]));
|
|
|
|
|
@ -103,10 +105,12 @@ class Feedback_model extends CI_Model {
|
|
|
|
|
$feedback_query =
|
|
|
|
|
$this->HT->query("
|
|
|
|
|
select top 40
|
|
|
|
|
tad_content, tai_customerid, tai_title, tai_getdate, tai_url, vci.cii2_name
|
|
|
|
|
tad_content, tai_customerid, tai_title, tai_getdate, tai_url, vci.cii2_name, g.GRI_EntranceDate, country.COI2_Country
|
|
|
|
|
from Eva_TAInfo
|
|
|
|
|
left join Eva_TADetail on TAD_TAI_SN=TAI_SN
|
|
|
|
|
left join V_CIty_Info vci on vci.cii_sn = tai_cii_sn and vci.LGC_LGC = 1
|
|
|
|
|
left join GRoupInfo g on g.GRI_SN = TAI_GRI_SN
|
|
|
|
|
left JOIN V_Country_Info country on country.COI_SN = g.GRI_Country and country.LGC_LGC = 1
|
|
|
|
|
where TAD_Content is not null and vci.cii2_name = ?
|
|
|
|
|
order by tai_getdate desc",
|
|
|
|
|
array($city_name_list[0]));
|
|
|
|
|
@ -120,6 +124,10 @@ class Feedback_model extends CI_Model {
|
|
|
|
|
foreach ($feedback_result as $feedback_row) {
|
|
|
|
|
$createdOn = new DateTime($feedback_row->tai_getdate);
|
|
|
|
|
$createdOnString = $createdOn->format('M Y');
|
|
|
|
|
|
|
|
|
|
$entranceDate = new DateTime($feedback_row->GRI_EntranceDate);
|
|
|
|
|
$entranceDateString = $entranceDate->format('M Y');
|
|
|
|
|
|
|
|
|
|
$feedback_count = COUNT($feedback_list);
|
|
|
|
|
|
|
|
|
|
if (!in_array($feedback_row->tai_customerid, $customer_id_list) && $feedback_count < 20) {
|
|
|
|
|
@ -128,7 +136,9 @@ class Feedback_model extends CI_Model {
|
|
|
|
|
'customer' => $feedback_row->tai_customerid,
|
|
|
|
|
'content' => $feedback_row->tad_content,
|
|
|
|
|
'url' => $feedback_row->tai_url,
|
|
|
|
|
'createdOn' => $createdOnString
|
|
|
|
|
'createdOn' => $createdOnString,
|
|
|
|
|
'entranceDate' => $entranceDateString,
|
|
|
|
|
'nationality' => $feedback_row->COI2_Country
|
|
|
|
|
];
|
|
|
|
|
$feedback_list[] = $feedback;
|
|
|
|
|
$customer_id_list[] = $feedback_row->tai_customerid;
|
|
|
|
|
@ -142,10 +152,12 @@ class Feedback_model extends CI_Model {
|
|
|
|
|
$feedback_query =
|
|
|
|
|
$this->HT->query("
|
|
|
|
|
select top ?
|
|
|
|
|
tad_content, tai_customerid, tai_title, tai_getdate, tai_url, vci.cii2_name
|
|
|
|
|
tad_content, tai_customerid, tai_title, tai_getdate, tai_url, vci.cii2_name, g.GRI_EntranceDate, country.COI2_Country
|
|
|
|
|
from Eva_TAInfo
|
|
|
|
|
left join Eva_TADetail on TAD_TAI_SN=TAI_SN
|
|
|
|
|
left join V_CIty_Info vci on vci.cii_sn = tai_cii_sn and vci.LGC_LGC = 1
|
|
|
|
|
left join GRoupInfo g on g.GRI_SN = TAI_GRI_SN
|
|
|
|
|
left JOIN V_Country_Info country on country.COI_SN = g.GRI_Country and country.LGC_LGC = 1
|
|
|
|
|
where TAD_Content is not null and vci.cii2_name = ? and tai_url not LIKE '%trustpilot.com%'
|
|
|
|
|
order by tai_getdate desc",
|
|
|
|
|
array($enough_count, $city_name_list[1]));
|
|
|
|
|
@ -154,10 +166,12 @@ class Feedback_model extends CI_Model {
|
|
|
|
|
$feedback_query =
|
|
|
|
|
$this->HT->query("
|
|
|
|
|
select top ?
|
|
|
|
|
tad_content, tai_customerid, tai_title, tai_getdate, tai_url, vci.cii2_name
|
|
|
|
|
tad_content, tai_customerid, tai_title, tai_getdate, tai_url, vci.cii2_name, g.GRI_EntranceDate, country.COI2_Country
|
|
|
|
|
from Eva_TAInfo
|
|
|
|
|
left join Eva_TADetail on TAD_TAI_SN=TAI_SN
|
|
|
|
|
left join V_CIty_Info vci on vci.cii_sn = tai_cii_sn and vci.LGC_LGC = 1
|
|
|
|
|
left join GRoupInfo g on g.GRI_SN = TAI_GRI_SN
|
|
|
|
|
left JOIN V_Country_Info country on country.COI_SN = g.GRI_Country and country.LGC_LGC = 1
|
|
|
|
|
where TAD_Content is not null and vci.cii2_name = ?
|
|
|
|
|
order by tai_getdate desc",
|
|
|
|
|
array($enough_count, $city_name_list[1]));
|
|
|
|
|
@ -167,6 +181,10 @@ class Feedback_model extends CI_Model {
|
|
|
|
|
foreach ($feedback_result as $feedback_row) {
|
|
|
|
|
$createdOn = new DateTime($feedback_row->tai_getdate);
|
|
|
|
|
$createdOnString = $createdOn->format('M Y');
|
|
|
|
|
|
|
|
|
|
$entranceDate = new DateTime($feedback_row->GRI_EntranceDate);
|
|
|
|
|
$entranceDateString = $entranceDate->format('M Y');
|
|
|
|
|
|
|
|
|
|
$feedback_count = COUNT($feedback_list);
|
|
|
|
|
|
|
|
|
|
if (!in_array($feedback_row->tai_customerid, $customer_id_list) && $feedback_count < 20) {
|
|
|
|
|
@ -175,7 +193,9 @@ class Feedback_model extends CI_Model {
|
|
|
|
|
'customer' => $feedback_row->tai_customerid,
|
|
|
|
|
'content' => $feedback_row->tad_content,
|
|
|
|
|
'url' => $feedback_row->tai_url,
|
|
|
|
|
'createdOn' => $createdOnString
|
|
|
|
|
'createdOn' => $createdOnString,
|
|
|
|
|
'entranceDate' => $entranceDateString,
|
|
|
|
|
'nationality' => $feedback_row->COI2_Country
|
|
|
|
|
];
|
|
|
|
|
$feedback_list[] = $feedback;
|
|
|
|
|
$customer_id_list[] = $feedback_row->tai_customerid;
|
|
|
|
|
|