From 2ccb8c94fcfe6891b6db60995e83cd7b54e389a6 Mon Sep 17 00:00:00 2001 From: 移动系统liao <liaoxujun@qq.com> Date: 星期日, 29 九月 2024 17:33:23 +0800 Subject: [PATCH] Merge branch 'master' of http://47.108.235.38:8080/r/cylsg --- cylsg/cylsg.Application/LogoInController.cs | 23 ++++++++++++++++------- 1 files changed, 16 insertions(+), 7 deletions(-) diff --git a/cylsg/cylsg.Application/LogoInController.cs b/cylsg/cylsg.Application/LogoInController.cs index a97ec29..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,18 +97,26 @@ ItCode = phone, PassWord = "123456", WxOpenId = opeid, - + CreateBy="寰俊娉ㄥ唽鐧诲綍", + CreateTime = DateTime.UtcNow, }; - await UserRes.EzInsertAsync(user); - + user= await UserRes.InsertReturnEntityAsync(user); + } + else + { + user.WxOpenId = opeid; + await UserRes.EzUpdateAsync(user); + } + + } var jwt = new EzJwtModel() { - ITCode = user.ItCode, + // ITCode = user.ItCode, NickName = user.Nickname, UserID = user.Id, @@ -123,9 +134,7 @@ } - - - + } /// <summary> -- Gitblit v1.9.1