rabin 1 month ago
parent
commit
56b2e45dc6
2 changed files with 4 additions and 4 deletions
  1. 3 3
      lib/Util.php
  2. 1 1
      manage/core.php

+ 3 - 3
lib/Util.php

@@ -3,15 +3,15 @@ use Dever;
 class Util
 {
     # 生成订单号
-    public function createNumber($prefix, $table, $where = array())
+    public function createNumber($prefix, $table, $where = array(), $key = 'order_num')
     {
         $number = \Dever\Helper\Str::order($prefix);
-        $where['order_num'] = $number;
+        $where[$key] = $number;
         $state = Dever::db($table)->find($where);
         if (!$state) {
             return $number;
         }
-        return $this->createNumber($prefix, $table, $where);
+        return $this->createNumber($prefix, $table, $where, $key);
     }
 
     # 获取openid 仅jspai和小程序需要openid

+ 1 - 1
manage/core.php

@@ -7,7 +7,7 @@ return array
         (
             'name' => '万接',
             'icon' => 'contacts-line',
-            'sort' => '10',
+            'sort' => '900',
             'module' => 'platform',
             'app' => 'api',
         ),