|
@@ -759,4 +759,36 @@ class Cron
|
|
|
|
|
|
return 'ok';
|
|
return 'ok';
|
|
}
|
|
}
|
|
|
|
+ #新增
|
|
|
|
+ #平台商城订单表同步发货时间sell_order
|
|
|
|
+ public function tongSellOrder_api()
|
|
|
|
+ {
|
|
|
|
+ $data = Dever::db('shop/sell_order')->state();
|
|
|
|
+ foreach ($data as $k => $v) {
|
|
|
|
+ if (isset($v['id']) && $v['id'] ) {
|
|
|
|
+ $ps = Dever::db('shop/sell_order_ps')->find(array('order_id'=>$v['id']));
|
|
|
|
+ $where['where_id'] = $v['id'];
|
|
|
|
+ if (isset($ps) && $ps && isset($ps['cdate']) && $ps['cdate']) {
|
|
|
|
+ $where['fadate'] = $ps['cdate'];
|
|
|
|
+ Dever::db('shop/sell_order')->update($where);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ #门店采购发货时间
|
|
|
|
+ public function tongBuyOrder_api()
|
|
|
|
+ {
|
|
|
|
+ $data = Dever::db('shop/buy_order')->state();
|
|
|
|
+ foreach ($data as $k => $v) {
|
|
|
|
+ if (isset($v['id']) && $v['id']) {
|
|
|
|
+ $ps = Dever::db('shop/buy_order_ps')->find(array('order_id'=>$v['id']));
|
|
|
|
+ $where['where_id'] = $v['id'];
|
|
|
|
+ if (isset($ps) && $ps && isset($ps['cdate']) && $ps['cdate']) {
|
|
|
|
+ $where['fadate'] = $ps['cdate'];
|
|
|
|
+ Dever::db('shop/buy_order')->update($where);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|