Browse Source

2023-5-22-1 新增服务区

yingzi 2 years ago
parent
commit
62dfb9814b
1 changed files with 6 additions and 4 deletions
  1. 6 4
      app/api/controller/User.php

+ 6 - 4
app/api/controller/User.php

@@ -411,10 +411,12 @@ class User extends BaseController
         if(!$r){
             return app('json')->fail("系统错误");
         }
-        $id = str_pad($r, 6, "0", STR_PAD_LEFT);
-        $no = "MYJ".date("Ymd").$id;
-        $exist = (new InfoAudit)->where('no', $no)->find();
-        if(!$exist){
+        $exist = (new InfoAudit)->where('uid', $save['uid'])->find();
+        if($exist && !empty($exist['no'])){
+            $no = $exist['no'];
+        }else{
+            $id = str_pad($r, 6, "0", STR_PAD_LEFT);
+            $no = "MYJ".date("Ymd").$id;
             (new InfoAudit)->where("id",$r)->update(["no"=>$no]);
         }
         return app('json')->success("提交成功,请耐心等待审核");