Exemplo n.º 1
0
 public function addOrderInfo($data)
 {
     if (!$data) {
         return false;
     }
     $obj = new Model_Broker_AdSetRent();
     foreach ($data as $key => $value) {
         $obj->{$key} = $value;
     }
     $obj->updateTime = date('Y-m-d H:i:s');
     return $obj->save();
 }
Exemplo n.º 2
0
 public static function updateOrderInfo($data)
 {
     $obj = new Model_Broker_AdSetRent();
     if (!$data['brokerId']) {
         return false;
     }
     $order = $obj->getBrokerInfo($data['brokerId']);
     if (!$order) {
         return false;
     }
     if (!empty($data['endDate'])) {
         $order->endDate = $data['endDate'];
     }
     if (!empty($data['isStop'])) {
         $order->isStop = $data['isStop'];
     }
     $order->save();
 }
Exemplo n.º 3
0
 public function getTasks()
 {
     $condition = array(array('id', '>', $this->lastLogId), array('cityId', 'in', Bll_City::getCloseShowCaseCities()), array('status', '=', Const_ShowcaseOrders::STATUS_VALID));
     $sort = array('id', 'asc');
     if ($this->dataBase == Const_ShowcaseOrders::SALE_DB) {
         $tasks = Model_Broker_AdSetSale::getList($condition, $this->limit, $sort);
     } else {
         $tasks = Model_Broker_AdSetRent::getList($condition, $this->limit, $sort);
     }
     return $tasks;
 }
Exemplo n.º 4
0
 public function getTasks()
 {
     $condition = array(array('id', '>', $this->lastFlagId));
     $sort = array('id', 'asc');
     if ($this->_dataBase == Const_ShowcaseOrders::SALE_DB) {
         $tasks = Model_Broker_AdSetSale::getList($condition, $this->limit, $sort);
     } else {
         $tasks = Model_Broker_AdSetRent::getList($condition, $this->limit, $sort);
     }
     return $tasks;
 }
Exemplo n.º 5
0
 /**
  * 获取ID大于传入ID的过期订单
  * @param $id
  * @param int $limit
  * @return array
  */
 public function getOverTimeMoreThanId($id, $limit = 100, $type = Const_ShowcaseOrders::SALE_DB)
 {
     if ($type == Const_ShowcaseOrders::SALE_DB) {
         return Model_Broker_AdSetSale::getInstance()->getOverTimeMoreThanId($id, $limit);
     } elseif ($type == Const_ShowcaseOrders::RENT_DB) {
         return Model_Broker_AdSetRent::getInstance()->getOverTimeMoreThanId($id, $limit);
     }
     return array();
 }