Commit 96cdf453 authored by 吴贤德's avatar 吴贤德

1.实时下线接口增加安全校验

2.合作方增量媒资变更检测和推送只推送已注入的媒资
parent 68107338
......@@ -7,7 +7,7 @@
输入:
spid : 合作方标识(我们提供,每个合作方标识不一样)
mid : 媒资标识代码(经纬cms中的媒资id)
sw_time : 请求时间戳
sw_time : 请求时间戳(秒)
sw_sign : 请求签名 md5(spid&mid&sw_time&key)
如:
md5(1&33431345&1523345555&key)
......@@ -22,4 +22,8 @@
1001-传入的媒资参数有问题
1002-sp info err
2001-下线失败
msg : 结果说明
\ No newline at end of file
msg : 结果说明
小帅参数:
spid=1
key=4396a121f631e4fa777b70b7
\ No newline at end of file
......@@ -302,7 +302,7 @@ class CenterAction extends Action
. ",mw.year,mw.type,mw.score,mw.region,mw.actor,mw.director"
. ",hm.code hotelId,hm.status,hm.status_inject statusInject"
. " FROM (SELECT hm.media_id,h.code,hm.status,hm.status_inject FROM sh_hotel_media_map_$spid hm,sh_hotel h"
. " WHERE hm.hotel_id=3 AND hm.updatetime BETWEEN '$start' AND '$end' AND h.id=hm.hotel_id ORDER BY hm.updatetime,hm.media_id ASC LIMIT $limit_from,$page_size) hm"
. " WHERE hm.hotel_id=3 AND hm.status_inject=1 AND hm.updatetime BETWEEN '$start' AND '$end' AND h.id=hm.hotel_id ORDER BY hm.updatetime,hm.media_id ASC LIMIT $limit_from,$page_size) hm"
. " JOIN sh_media_wasu mw ON mw.id=hm.media_id";
// echo $sql;exit;
......@@ -342,7 +342,7 @@ class CenterAction extends Action
$end = date('Y-m-d H:i:s', strtotime($_GET["end"]));
}
$sqlTotal = "SELECT count(1) total FROM sh_hotel_media_map_$spid WHERE updatetime BETWEEN '$start' AND '$end';";
$sqlTotal = "SELECT count(1) total FROM sh_hotel_media_map_$spid WHERE status_inject=1 AND updatetime BETWEEN '$start' AND '$end';";
$totalArr = M("")->query($sqlTotal);
$total = 0;
if (count($totalArr)>0){
......@@ -396,7 +396,7 @@ class CenterAction extends Action
. ",mw.year,mw.type,mw.score,mw.region,mw.actor,mw.director"
. ",hm.code hotelId,hm.status,hm.status_inject statusInject"
. " FROM (SELECT hm.media_id,h.code,hm.status,hm.status_inject FROM sh_hotel_media_map_$spid hm,sh_hotel h"
. " WHERE hm.updatetime BETWEEN '$start' AND '$end' AND h.id=hm.hotel_id ORDER BY hm.updatetime,hm.media_id ASC LIMIT $limit_from,$page_size) hm"
. " WHERE hm.updatetime AND hm.status_inject=1 BETWEEN '$start' AND '$end' AND h.id=hm.hotel_id ORDER BY hm.updatetime,hm.media_id ASC LIMIT $limit_from,$page_size) hm"
. " JOIN sh_media_wasu mw ON mw.id=hm.media_id";
// echo $sql;exit;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment