Merge branch 'master' of github.com:hainatravel/information-system

hotfix/paypal-note
LiaoYijun 4 years ago
commit d5077c1ecc

@ -193,7 +193,7 @@ class Api extends CI_Controller {
}else if (!empty($row->pic1)){ }else if (!empty($row->pic1)){
$picurl = $row->pic1; $picurl = $row->pic1;
}else{ }else{
$picurl="//data.chinatravel.com/images/loading2.gif"; $picurl="//data.chinatravel.com/images/no-photos.jpg";
} }
// if (strpos($picurl,"chinatravel.com")!== false){ // if (strpos($picurl,"chinatravel.com")!== false){
// }else{ // }else{

@ -263,16 +263,42 @@ class Api_model extends CI_Model {
* @Date Changed: * @Date Changed:
*/ */
function getGuideList($old_pid,$new_pid){ function getGuideList($old_pid,$new_pid){
$sql = " select top 1 ic_url from dbo.infoContents
inner join infoStructures on ic_id=is_ic_id
where is_id = ? ";
$query = $this->HT->query ($sql ,array($new_pid));
if ($query->num_rows()>0){
$url = $query->row()->ic_url;
}else{
$url = "";
}
if ($url==""){$url="nourl";}
////原来读取旧信息数据
// SELECT ic_url,ic_url_title,ic_photo
// ,(select top 1 im_value from infoMetas where im_key='meta_addon_picture_mobile' and im_ic_id=ic_id) as pic2
// ,'2' as sortby
// FROM dbo.infoContents
// inner join infoStructures on ic_id=is_ic_id
// WHERE is_sitecode='ct'
// and ic_status=1
// and is_parent_id = ?
$sql = " $sql = "
select * from ( select * from (
SELECT ic_url,ic_url_title,ic_photo SELECT ic_url,ic_url_title,ic_photo
,(select top 1 im_value from infoMetas where im_key='meta_addon_picture_mobile' and im_ic_id=ic_id) as pic2 ,(select top 1 im_value from infoMetas where im_key='meta_addon_picture_mobile' and im_ic_id=ic_id) as pic2
,'2' as sortby ,'2' as sortby
FROM dbo.infoContents FROM dbo.infoContents
inner join infoStructures on ic_id=is_ic_id inner join infoStructures on ic_id=is_ic_id
WHERE is_sitecode='ct' WHERE is_sitecode='chinatravel'
and ic_status=1 and ic_status=1
and is_parent_id = ? and ic_url like ?
UNION ALL UNION ALL
@ -287,9 +313,8 @@ class Api_model extends CI_Model {
) allbt ) allbt
order by sortby order by sortby
"; ";
$qurey = $this->HT->query($sql,array($url."/%",$new_pid));
$qurey = $this->HT->query($sql,array("-1",$new_pid));
return $qurey->result(); return $qurey->result();
} }

Loading…
Cancel
Save