linwu 1 éve
szülő
commit
d7ea441476

+ 17 - 1
app/love/controller/RegisterController.php

@@ -242,7 +242,7 @@ class RegisterController extends HomeBaseController
                 'native'     => Constant::NATIVE,
                 'education'  => $education,
                 'income'     => Constant::COND_INCOME,
-                'id_type'    => array_merge(Constant::ID_TYPE,['不限']),
+                'id_type'    => array_merge(Constant::ID_TYPE, ['不限']),
                 'smoke'      => Constant::SMOKE,
                 'drink'      => Constant::DRINK,
                 'tinyint'    => Constant::COND_TINYINT,
@@ -256,6 +256,22 @@ class RegisterController extends HomeBaseController
         }
     }
 
+    public function t1()
+    {
+        $auth = UserAuthModel::all();
+        $num = 0;
+        foreach ($auth as $v) {
+            $birth = strtotime(Fun::getBirthDayByIdCard($v['idcard']));
+            $check = UserModel::where('mobile',$v['mobile'])->find();
+            if (!empty($check) && $check->birthday != $birth) {
+                $check->birthday = $birth;
+                $check->save();
+                $num++;
+            }
+        }
+
+        return $num;
+    }
 
     /**
      * 健康码上传

+ 2 - 2
app/user/controller/AdminUserController.php

@@ -199,10 +199,10 @@ class AdminUserController extends AdminBaseController
                     $this->error("第" . ($k + 2) . "行的手机号已存在");
                 }
                 if (!in_array($v['id_type'], $idtype)) {
-                    unset($v['id_type']);
+                    $this->error("第" . ($k + 2) . "行的身份类型错误");
                 }
                 if (!in_array($v['marry'], $marry)) {
-                    unset($v['marry']);
+                    $this->error("第" . ($k + 2) . "行的婚姻状况错误");
                 }
                 UserAuthModel::create($v);
             }