From 72e71a7a31b14f30f38a2a3acecb7311049c608a Mon Sep 17 00:00:00 2001 From: 移动系统liao <liaoxujun@qq.com> Date: 星期二, 24 九月 2024 14:55:25 +0800 Subject: [PATCH] 完成微信转账到零钱所有逻辑 --- cylsg/cylsg.Application/LogoInController.cs | 20 ++++++++++++++------ 1 files changed, 14 insertions(+), 6 deletions(-) diff --git a/cylsg/cylsg.Application/LogoInController.cs b/cylsg/cylsg.Application/LogoInController.cs index 92d8070..9e941e7 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,21 @@ 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() { @@ -123,9 +133,7 @@ } - - - + } /// <summary> -- Gitblit v1.9.1