|
@@ 55-58 (lines=4) @@
|
| 52 |
|
|
| 53 |
|
public function getRecommendedCollect() |
| 54 |
|
{ |
| 55 |
|
if (!$this->recommendedCollect) { |
| 56 |
|
$this->recommendedCollect = Yii::app()->redis->getClient()->get(self::ID_RECOMMENDED_COLLECT); |
| 57 |
|
Yii::app()->redis->getClient()->del(self::ID_RECOMMENDED_COLLECT); |
| 58 |
|
} |
| 59 |
|
|
| 60 |
|
if (!in_array($this->recommendedCollect, $this->collectTypes)) { |
| 61 |
|
$randomId = array_rand($this->collectTypes); |
|
@@ 70-73 (lines=4) @@
|
| 67 |
|
|
| 68 |
|
public function getRecommendedPrize() |
| 69 |
|
{ |
| 70 |
|
if (!$this->recommendedPrize) { |
| 71 |
|
$this->recommendedPrize = Yii::app()->redis->getClient()->get(self::ID_RECOMMENDED_PRIZE); |
| 72 |
|
Yii::app()->redis->getClient()->del(self::ID_RECOMMENDED_PRIZE); |
| 73 |
|
} |
| 74 |
|
|
| 75 |
|
if (!$this->recommendedPrize) { |
| 76 |
|
$this->recommendedPrize = self::PRIZE; |