yingzi 2 лет назад
Родитель
Сommit
18c8444345
1 измененных файлов с 1 добавлено и 3 удалено
  1. 1 3
      app/api/controller/User.php

+ 1 - 3
app/api/controller/User.php

@@ -412,9 +412,7 @@ class User extends BaseController
             return app('json')->fail("系统错误");
             return app('json')->fail("系统错误");
         }
         }
         $exist = (new InfoAudit)->where('uid', $save['uid'])->find();
         $exist = (new InfoAudit)->where('uid', $save['uid'])->find();
-        if ($exist && !empty($exist['no'])) {
-            $no = $exist['no'];
-        } else {
+        if (!$exist ||!$exist['no']) {
             $id = str_pad($r, 6, "0", STR_PAD_LEFT);
             $id = str_pad($r, 6, "0", STR_PAD_LEFT);
             $no = "MYJ" . date("Ymd") . $id;
             $no = "MYJ" . date("Ymd") . $id;
             (new InfoAudit)->where("id", $r)->update(["no" => $no]);
             (new InfoAudit)->where("id", $r)->update(["no" => $no]);