hrjy 2 years ago
parent
commit
091d953872

+ 10 - 3
Application/Mobile/Controller/AutoexeController.class.php

@@ -1991,7 +1991,7 @@ class AutoexeController extends \Think\Controller
                 }
                 }
                 M('market')->where(['id' => $market['id']])->save(['new_price' => $price]);
                 M('market')->where(['id' => $market['id']])->save(['new_price' => $price]);
                 if ($market['hou_time'] < strtotime('today')) {
                 if ($market['hou_time'] < strtotime('today')) {
-                    M('market')->where(['id' => $market['id']])->save(['hou_price' => $price, 'hou_time' => strtotime('today')]);
+                    M('market')->where(['id' => $market['id']])->save(['hou_price' => $price, 'hou_time' => strtotime('today'), 'max_day' => $price, 'min_day' => $price]);
                 }
                 }
             }else{
             }else{
                 if ($market['zhang'] > 0 and $market['die'] == 0){
                 if ($market['zhang'] > 0 and $market['die'] == 0){
@@ -2004,7 +2004,7 @@ class AutoexeController extends \Think\Controller
                     }
                     }
                     M('market')->where(['id' => $market['id']])->save(['new_price' => $price]);
                     M('market')->where(['id' => $market['id']])->save(['new_price' => $price]);
                     if ($market['hou_time'] < strtotime('today')) {
                     if ($market['hou_time'] < strtotime('today')) {
-                        M('market')->where(['id' => $market['id']])->save(['hou_price' => $price, 'hou_time' => strtotime('today')]);
+                        M('market')->where(['id' => $market['id']])->save(['hou_price' => $price, 'hou_time' => strtotime('today'), 'max_day' => $price, 'min_day' => $price]);
                     }
                     }
                 }
                 }
 
 
@@ -2018,7 +2018,7 @@ class AutoexeController extends \Think\Controller
                     }
                     }
                     M('market')->where(['id' => $market['id']])->save(['new_price' => $price]);
                     M('market')->where(['id' => $market['id']])->save(['new_price' => $price]);
                     if ($market['hou_time'] < strtotime('today')) {
                     if ($market['hou_time'] < strtotime('today')) {
-                        M('market')->where(['id' => $market['id']])->save(['hou_price' => $price, 'hou_time' => strtotime('today')]);
+                        M('market')->where(['id' => $market['id']])->save(['hou_price' => $price, 'hou_time' => strtotime('today'), 'max_day' => $price, 'min_day' => $price]);
                     }
                     }
                 }
                 }
             }
             }
@@ -2037,6 +2037,13 @@ class AutoexeController extends \Think\Controller
                     ]);
                     ]);
                 }
                 }
 
 
+                if ($price > $market['max_day']){
+                    M('market')->where(['id' => $market['id']])->save(['max_day' => $price]);
+                }
+
+                if ($price < $market['min_day']){
+                    M('market')->where(['id' => $market['id']])->save(['min_day' => $price]);
+                }
 
 
                 if ($price > $market['max_price']){
                 if ($price > $market['max_price']){
                     M('market')->where(['id' => $market['id']])->save(['max_price' => $price]);
                     M('market')->where(['id' => $market['id']])->save(['max_price' => $price]);

+ 3 - 3
Application/Mobile/Controller/LevertadeController.class.php

@@ -775,11 +775,11 @@ class LevertadeController extends MobileController
 
 
         $data = [
         $data = [
             'name' => 'GCB-USDT',
             'name' => 'GCB-USDT',
-            'last' => $market['new_price'],
+            'last' => number_format($market['new_price'], 2),
             'sodUtc0' => $market['hou_price'],
             'sodUtc0' => $market['hou_price'],
             'hou_price' => $market['hou_price'],
             'hou_price' => $market['hou_price'],
-            'min_price' => $market['min_price'],
+            'min_price' => $market['min_day'],
-            'max_price' => $market['max_price'],
+            'max_price' => $market['max_day'],
             'purchase' => $list1,
             'purchase' => $list1,
             'sell' => $list2
             'sell' => $list2
         ];
         ];