Пример #1
0
 public function addOrderInfo($data)
 {
     if (!$data) {
         return false;
     }
     $obj = new Model_Broker_AdSetSale();
     foreach ($data as $key => $value) {
         $obj->{$key} = $value;
     }
     $obj->updateTime = date('Y-m-d H:i:s');
     return $obj->save();
 }
Пример #2
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;
 }
Пример #3
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;
 }
Пример #4
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();
 }