|
|
@ -3,7 +3,7 @@ |
|
|
|
/** |
|
|
|
* 同步推送数据 |
|
|
|
*/ |
|
|
|
include_once dirname(dirname(__FILE__)).'/base/dealBase.php'; |
|
|
|
include_once(dirname(dirname(dirname(__FILE__)))."/library/publicBase.php"); |
|
|
|
|
|
|
|
class syncPushData { |
|
|
|
private $table; |
|
|
@ -18,7 +18,10 @@ class syncPushData { |
|
|
|
|
|
|
|
public function __construct() { |
|
|
|
$obj = new mOrder(); |
|
|
|
$obj->writeLog('pdd', 'sync_push_data.log', 'exec'); |
|
|
|
|
|
|
|
$info = $obj->getSyncDataModifyTime(); |
|
|
|
$obj->writeLog('pdd', 'sync_push_data.log', $info['pdp_modified']); |
|
|
|
if ($info['pdp_modified'] == '0000-00-00 00:00:00') { |
|
|
|
$sql = "select min(pdp_modified) as pdp_modified from `pdp_tb_trade`"; |
|
|
|
$r = $this->execute($sql, false, true); |
|
|
@ -30,6 +33,8 @@ class syncPushData { |
|
|
|
|
|
|
|
$end = date("Y-m-d H:i:s", strtotime($start)+300); |
|
|
|
|
|
|
|
$obj->writeLog('pdd', 'sync_push_data.log', $start."|".$end); |
|
|
|
|
|
|
|
$list = $this->selectAll('pdp_tb_trade', array('sql'=>'`pdp_modified` >=? and `pdp_modified` <= ?', 'vals'=>array($start, $end)), 'pdp_modified desc'); |
|
|
|
|
|
|
|
foreach ($list as $info) { |
|
|
@ -112,7 +117,7 @@ class syncPushData { |
|
|
|
$shop = $sobj->getShopByOwnerid($info['mall_id']); |
|
|
|
|
|
|
|
$res = $obj->addOrder($shop['id'], $shop['uid']); |
|
|
|
$obj->writeLog('pdd', 'sync_push_data.log', $start.'|'.$end.'|'.$order['order_sn'].'|'.$res); |
|
|
|
$obj->writeLog('pdd', 'sync_push_data.log', $order['order_sn'].'|'.$res); |
|
|
|
} |
|
|
|
|
|
|
|
$obj->updateSyncDataModifyTime($info['id'], $end); |
|
|
|