Kirin 1 year ago
parent
commit
9ba5345dc3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/models/user/Cert.php

+ 1 - 1
app/models/user/Cert.php

@@ -136,7 +136,7 @@ class Cert extends BaseModel
         if (!$str) $str = 'UK';
         $str .= ($info['level'] == '4' ? 'T' : ('0' . $info['level']));
         $str .= '-021-' . substr($info['idcard'], strlen($info['idcard']) - 4, 4);
-        $str .= '-' . str_pad(self::where('status', 1)->count() + 1, 4, 0, STR_PAD_LEFT);
+        $str .= '-' . str_pad(self::where('status', 1)->count(), 4, 0, STR_PAD_LEFT);
 //        do {
 //            $str = date('ymd') . strtoupper(substr(md5($id . rand(100000, 999999)), 3, 8));
 //        } while (self::be(['code' => $str]));