From 446957fb241cd6489576281c28050062aa6df073 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期三, 25 九月 2024 14:56:11 +0800
Subject: [PATCH] Merge branch 'master' of http://47.108.235.38:8080/r/cylsg

---
 cylsg/cylsg.Application/LogoInController.cs |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/cylsg/cylsg.Application/LogoInController.cs b/cylsg/cylsg.Application/LogoInController.cs
index b3a843a..0ee4cfd 100644
--- a/cylsg/cylsg.Application/LogoInController.cs
+++ b/cylsg/cylsg.Application/LogoInController.cs
@@ -84,6 +84,9 @@
                 //娌℃湁鐢ㄦ埛 锛岄渶瑕佹柊寤虹敤鎴�
                 var phone = await _wechatService.GetPhone(Param.Bindgetphonenumber);
 
+
+                 user = await UserRes.GetFirstAsync(x => x.ItCode == phone);
+                if(user == null) { 
                 user = new User
                 {
 
@@ -94,14 +97,22 @@
                     ItCode = phone,
                     PassWord = "123456",
                     WxOpenId = opeid,
-
+                    CreateBy="寰俊娉ㄥ唽鐧诲綍",
+                    CreateTime = DateTime.UtcNow,
 
 
                 };
 
-                user.Id = await UserRes.EzInsertReturnIdentityAsync(user);
 
-               
+              user=    await UserRes.InsertReturnEntityAsync(user);
+                }
+                else
+                {
+                    user.WxOpenId = opeid;
+                    await UserRes.EzUpdateAsync(user);
+                }
+
+
             }
             var jwt = new EzJwtModel()
             {
@@ -123,9 +134,7 @@
 
         }
 
-
-
-       
+      
 
     }
     /// <summary>

--
Gitblit v1.9.1