Browse Source

添加恢复限制,补全身份证号

DuGuYang 2 years ago
parent
commit
8d3a7c92e8
1 changed files with 5 additions and 0 deletions
  1. 5 0
      Areas/Admin/Controllers/MainServer/SysToolsController.cs

+ 5 - 0
Areas/Admin/Controllers/MainServer/SysToolsController.cs

@@ -5549,11 +5549,16 @@ namespace MySystem.Areas.Admin.Controllers
             {
                 return "创客" + MakerCode + "不存在或不满足恢复条件";
             }
+            else if (user.LogOutDate.Value.ToString("yyyyMMdd") != DateTime.Now.ToString("yyyyMMdd"))
+            {
+                return "创客" + MakerCode + "注销时间和当前时间存在月份跨度,不满足恢复条件";
+            }
             else
             {
                 user.Status = 0;
                 user.LogOutDate = null;
                 user.Mobile = user.Mobile.TrimEnd('d');
+                user.CertId = user.CertId.TrimEnd('d');
                 db.UserForMobile.Add(new UserForMobile()
                 {
                     Mobile = user.Mobile,