Exemple #1
0
 /**
  * 获取经纪人的永久锁定记录
  *
  * @param $brokerId
  *
  * @return Model_Mobile_CustomerForeverLockCount|null
  */
 public static function getForeverLockCount($brokerId)
 {
     $foreverLockCount = Model_Mobile_CustomerForeverLockCount::getBrokerForeverLockCount($brokerId);
     if (!$foreverLockCount) {
         $foreverLockCount = Model_Mobile_CustomerForeverLockCount::initBrokerForeverLockCount($brokerId, 0);
     }
     return $foreverLockCount;
 }
 /**
  * 初始化经纪人永久锁定记录
  *
  * @param $brokerId
  * @param int $count
  *
  * @return Model_Mobile_CustomerForeverLockCount
  */
 public static function initBrokerForeverLockCount($brokerId, $count = 0)
 {
     $foreverLockCount = Model_Mobile_CustomerForeverLockCount::create(array('brokerId' => $brokerId, 'count' => $count, 'updateTime' => date('Y-m-d H:i:s')));
     $foreverLockCount->save();
     return $foreverLockCount;
 }