@@ -273,6 +273,15 @@ class CenterAction extends Action
}
return$str;
}
functionremakeImageUrlForCache($url){
$imageDomain="image.hotel.wasu.tv";
if($url!=""&&!is_null($url)){
$url="http://$imageDomain/".substr($url,7);
}else{
$url="";
}
return$url;
}
/*
* 媒资自动转推函数
* 批量修改媒资状态
...
...
@@ -344,7 +353,7 @@ class CenterAction extends Action
$end=date('Y-m-d H:i:s',strtotime($_GET["end"]));
$page=$_GET["page"];
$sqlTotal="SELECT count(1) total FROM sh_hotel_media_map_$spid WHERE $whereHotelid AND hm.status_inject=1 AND updatetime BETWEEN '$start' AND '$end';";
$sqlTotal="SELECT count(1) total FROM sh_hotel_media_map_$spid WHERE $whereHotelid AND status_inject=1 AND updatetime BETWEEN '$start' AND '$end';";
@@ -64,12 +72,20 @@ class InjectAction extends CommonAction{
$media_lists=$mediaModel->join(" A join sh_sp B on A.site_id = B.site_id ")->field("concat(A.id,'_',A.code) id,A.title,group_concat(B.id) sp_ids,A.`type`,A.`status`,A.programType")->group(" A.id ")->select();
if($userInfo['sp_ids']&&$userInfo['grade']>=3){
$sp_lists=$spModel->field("id,`name`")->where("`status`=0 and id in(".$userInfo['sp_ids'].")")->select();
$hotel_lists=$hotelModel->field("id,`name`,sp_id")->where("`status`=0 and sp_id in(".$userInfo['sp_ids'].")")->select();
$play_lists=$spPlaylistModel->join(" A join sh_sp_playlist_media_map B on A.id = B.playlist_id ")->field("A.id,A.`name`,A.sp_id,group_concat(B.media_id) media_ids")->where("A.sp_id in(".$userInfo['sp_ids'].") and A.`status` = 0")->group("A.id")->select();
$play_lists=$spPlaylistModel->join(" A join sh_sp_playlist_media_map B on A.id = B.playlist_id ")->field("A.id,A.`name`,A.sp_id,group_concat(B.media_id) media_ids")->where("A.`status` = 0")->group("A.id")->select();
$play_lists=$spPlaylistModel->join(" A join sh_sp_playlist_media_map B on A.id = B.playlist_id ")
->join(" join sh_media_wasu C on B.media_id=C.id ")
$play_lists=$model->join(" A join sh_sp_playlist_media_map B on A.id = B.playlist_id ")->field("A.id,A.`name`,A.sp_id,group_concat(B.media_id) media_ids")->group("A.id")->select();
}
$media_lists=$mediaModel->join(" A join sh_sp B on A.site_id = B.site_id ")->field("concat(A.id,'_',A.code) id,A.title,group_concat(B.id) sp_ids")->group(" A.id ")->select();
// $media_lists = $mediaModel->join(" A join sh_sp B on A.site_id = B.site_id ")->field("concat(A.id,'_',A.code) id,A.title,group_concat(B.id) sp_ids")->group(" A.id ")->select();
$media_lists=$mediaModel->join(" A join sh_sp B on A.site_id = B.site_id ")->field("A.id,A.title,group_concat(B.id) sp_ids")->group(" A.id ")->select();
@@ -68,12 +76,19 @@ class PlayCtrlAction extends CommonAction{
$media_lists=$mediaModel->join(" A join sh_sp B on A.site_id = B.site_id ")->field("concat(A.id,'_',A.code) id,A.title,group_concat(B.id) sp_ids")->group(" A.id ")->select();
if($userInfo['sp_ids']&&$userInfo['grade']>=3){
$sp_lists=$spModel->field("id,`name`")->where("`status`=0 and id in(".$userInfo['sp_ids'].")")->select();
$hotel_lists=$hotelModel->field("id,`name`,sp_id,region_id")->where("`status`=0 and sp_id in(".$userInfo['sp_ids'].")")->select();
$play_lists=$spPlaylistModel->join(" A join sh_sp_playlist_media_map B on A.id = B.playlist_id ")->field("A.id,A.`name`,A.sp_id,group_concat(B.media_id) media_ids")->where("A.sp_id in(".$userInfo['sp_ids'].")")->group("A.id")->select();
$play_lists=$spPlaylistModel->join(" A join sh_sp_playlist_media_map B on A.id = B.playlist_id ")->field("A.id,A.`name`,A.sp_id,group_concat(B.media_id) media_ids")->group("A.id")->select();
$play_lists=$spPlaylistModel->join(" A join sh_sp_playlist_media_map B on A.id = B.playlist_id ")
->join(" join sh_media_wasu C on B.media_id=C.id ")
@@ -54,7 +54,7 @@ class HotelMediaMapModel extends RelationModel{
//返回列表(limit分页)
if($queryType=="list"){
$where.=$sort." ".$limit;
$fields=" A.*,B.id mid,B.code mcode,B.programType,B.url_pic,B.title,C.`name` hotel_name,case A.`status` when 1 then '<font color=green>上线</font>' when 2 then '<font color=red>下线</font>' when 0 then '<font color=red>删除</font>' end as `status` ";
$fields=" A.*,B.id mid,B.code mcode,B.programType,B.url_pic,B.title,C.`name` hotel_name,A.`status` status1,case A.`status` when 1 then '<font color=green>上线</font>' when 2 then '<font color=red>下线</font>' when 0 then '<font color=red>删除</font>' end as `status` ";
}
$sql="select ".$fields." from ".$this->tableName." A join sh_media_wasu B on A.media_id = B.id join sh_hotel C on A.hotel_id = C.id and C.sp_id = $searchSp where 1=1 ".$where.";";
$where=" and (`name` like '%".$searchValue."%') ";
$where.=" and (t.`name` like '%".$searchValue."%') ";
}
$model=newModel();
...
...
@@ -25,9 +28,11 @@ class PlayCtrlModel extends RelationModel{
//返回列表(limit分页)
if($queryType=="list"){
$where.=$sort." ".$limit;
$fields=" *,case `status` when 0 then '<font color=red>删除</font>' when 1 then '<font color=green>上线</font>' when 2 then '<font color=red>下线</font>' end as `status` ";
$fields=" t.*,s.name sp_name,case t.`status` when 0 then '<font color=red>删除</font>'
when 1 then '<font color=green>上线</font>'
when 2 then '<font color=red>下线</font>' end as `status` ";
}
$sql="select ".$fields." from sh_task_ctrl where 1=1 ".$where.";";
$sql="select ".$fields." from sh_task_ctrl t,sh_sp s where 1=1 and t.sp_id=s.id ".$where.";";