shish il y a 5 ans
Parent
commit
b425d79b8a
2 fichiers modifiés avec 11 ajouts et 12 suppressions
  1. 0 1
      app-mall/controllers/CustomController.php
  2. 11 11
      biz-hd/custom/classes/CustomClass.php

+ 0 - 1
app-mall/controllers/CustomController.php

@@ -13,7 +13,6 @@ class CustomController extends BaseController
     //生成客户信息 shish 2021.5.1
     public function actionInitCustom()
     {
-        dd($this->user);
         $custom = [];
         if(!empty($this->shopId)){
             $custom = CustomClass::replaceCustom($this->sjId, $this->user, $this->shopId);

+ 11 - 11
biz-hd/custom/classes/CustomClass.php

@@ -26,15 +26,15 @@ class CustomClass extends BaseClass
         $userId = $user['id'];
         $name = $user['name'] ?? '';
         $mobile = $user['mobile'] ?? '';
-        $key = self::getCustomCacheKey($sjId, $shopId, $userId);
-        $currentId = Yii::$app->redis->executeCommand('GET', [$key]);
-        if (!empty($currentId)) {
-            $info = self::getById($currentId);
-            if (!empty($info)) {
-                $info['avatar'] = imgUtil::groupImg($info['avatar']);
-                return $info;
-            }
-        }
+//        $key = self::getCustomCacheKey($sjId, $shopId, $userId);
+//        $currentId = Yii::$app->redis->executeCommand('GET', [$key]);
+//        if (!empty($currentId)) {
+//            $info = self::getById($currentId);
+//            if (!empty($info)) {
+//                $info['avatar'] = imgUtil::groupImg($info['avatar']);
+//                return $info;
+//            }
+//        }
 
         $info = self::getByCondition(['shopId' => $shopId, 'userId' => $userId]);
         if (empty($info)) {
@@ -54,8 +54,8 @@ class CustomClass extends BaseClass
         if (empty($info)) {
             return $info;
         }
-        $id = $info['id'];
-        Yii::$app->redis->executeCommand('SET', [$key, $id]);
+//        $id = $info['id'];
+//        Yii::$app->redis->executeCommand('SET', [$key, $id]);
         $info['avatar'] = imgUtil::groupImg($info['avatar']);
         return $info;
     }