stanley-king 7 lat temu
rodzic
commit
0727102141

+ 2 - 1
admin/control/cache.php

@@ -187,7 +187,8 @@ class cacheControl extends SystemControl
                 $this->mPublisher->modify_seracher_init();
             }
             if(in_array('pay_fcode',$todo)) {
-                $this->mPublisher->modify_index_fcode();
+                $this->mPublisher->modify_index_payfcode();
+                $this->mPublisher->modify_index_presentfcode();
             }
         }
 

+ 1 - 1
helper/fcode/present_manager.php

@@ -35,7 +35,7 @@ class present_manager
             self::$stInstance = new present_manager();
         }
 
-        if(StatesHelper::fetch_state('fcode')) {
+        if(StatesHelper::fetch_state('present_fcode')) {
             Log::record("present_manager reinit data.",Log::DEBUG);
             self::$stInstance->init();
         }

+ 2 - 2
helper/fcode/send_manager.php

@@ -32,7 +32,7 @@ class send_manager
         if(self::$stInstance == null) {
             self::$stInstance = new send_manager();
         }
-        if(StatesHelper::fetch_state('fcode')) {
+        if(StatesHelper::fetch_state('pay_fcode')) {
             Log::record("fcode reinit data.",Log::DEBUG);
             self::$stInstance->init();
         }
@@ -103,8 +103,8 @@ class send_manager
 
         $result = [];
         if(!empty($normal)) {
-            $result['banner'][] = $normal['banner'];
             $result['fcode'][]  = $normal['fcode'];
+            $result['banner'][] = $normal['banner'];
         }
         if(!empty($addition)) {
             $result['fcode'][]  = $addition['fcode'];

+ 9 - 2
helper/message/publisher.php

@@ -46,10 +46,17 @@ class publisher
             $this->mRedis->publish('ch_index',serialize(array('type'=>'brands','value' => 0)));
         }
     }
-    public function modify_index_fcode()
+    public function modify_index_payfcode()
     {
         if($this->mConnected) {
-            $this->mRedis->publish('ch_index',serialize(array('type'=>'fcode','value' => 0)));
+            $this->mRedis->publish('ch_index',serialize(array('type'=>'pay_fcode','value' => 0)));
+        }
+    }
+
+    public function modify_index_presentfcode()
+    {
+        if($this->mConnected) {
+            $this->mRedis->publish('ch_index',serialize(array('type'=>'present_fcode','value' => 0)));
         }
     }
     public function modify_index_special()