|
|
@@ -199,6 +199,23 @@ class ChatController extends BaseController
|
|
|
util::success(['oldPice'=>$val, 'newPrice'=>$price]);
|
|
|
}
|
|
|
|
|
|
+ //用 redis key 获取商品报价
|
|
|
+ public function actionGetQuotedPrice()
|
|
|
+ {
|
|
|
+ $key = Yii::$app->request->post('key');
|
|
|
+ $keyArr = explode('-', $key);
|
|
|
+ $shopId = intval($keyArr[0]);
|
|
|
+ if ($shopId != $this->shopId) {
|
|
|
+ util::error(-1, '校验失败');
|
|
|
+ }
|
|
|
+
|
|
|
+ $val = Yii::$app->redis->executeCommand('GET', [$key]);
|
|
|
+ if (empty($val)) {
|
|
|
+ util::success(['price'=>-1]);
|
|
|
+ }
|
|
|
+ util::success(['price'=>$val]);
|
|
|
+ }
|
|
|
+
|
|
|
// message_server 远程调用专用方法,可用于:1.@商家--客户发了商品消息 2.有未读消息的通知(可以额外添加触发条件)3.哦哦
|
|
|
public function actionMessageServerCall()
|
|
|
{
|