35 lines
745 B
PHP
35 lines
745 B
PHP
<?php
|
|
|
|
/**
|
|
* @author Any
|
|
* @description KISS
|
|
* @date 2021年10月21日
|
|
* @version 1.0.0
|
|
*
|
|
* _____LOG_____
|
|
*
|
|
*/
|
|
namespace app\models\common;
|
|
|
|
use RedisCache\RedisPublish;
|
|
use app\models\Model;
|
|
|
|
class CommonRedisPsubscribe
|
|
{
|
|
private $redis;
|
|
|
|
public function __construct() {
|
|
//@TODO redis
|
|
$this->redis = new RedisPublish();
|
|
$this->redis->setKeyPrefix(\Yii::$app->params['cacheKeyPrefix']);
|
|
}
|
|
/**
|
|
* @param string $action_option 订单操作类型,不能含有下划线
|
|
*/
|
|
public function orderPublish($action_option,$order_id, $expire)
|
|
{
|
|
return $this->redis->publishMsg('order', $action_option, $order_id, $expire);
|
|
}
|
|
}
|
|
|