From 74f5570dceeb1a5a88c0a685705a9e4cc88881ce Mon Sep 17 00:00:00 2001
From: lingling <kety1122@163.com>
Date: 星期三, 19 三月 2025 17:03:15 +0800
Subject: [PATCH] 格式化
---
LifePayment/LifePayment.Application/User/AccountService.cs | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/LifePayment/LifePayment.Application/User/AccountService.cs b/LifePayment/LifePayment.Application/User/AccountService.cs
index 3f8cd2e..0837679 100644
--- a/LifePayment/LifePayment.Application/User/AccountService.cs
+++ b/LifePayment/LifePayment.Application/User/AccountService.cs
@@ -6,6 +6,7 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using System;
+using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp;
@@ -27,20 +28,25 @@
private readonly IConfiguration _configuration;
private readonly IIdentityModelAuthenticationService _authenticator;
private readonly IRepository<User, Guid> _userRepository;
+ private readonly IRepository<UserChannle, Guid> _userChannleRep;
private readonly IIdentityUserAppService _identityUserService;
public AccountService(
IWxManager wxManager,
IConfiguration configuration,
IIdentityModelAuthenticationService authenticator,
+ IRepository<User, Guid> userRepository,
IIdentityUserAppService identityUserService,
- IRepository<LifePayUser, Guid> lifePayUserRepository)
+ IRepository<LifePayUser, Guid> lifePayUserRepository,
+ IRepository<UserChannle, Guid> userChannleRep)
{
_configuration = configuration;
_wxManager = wxManager;
_identityUserService = identityUserService;
_lifePayUserRepository = lifePayUserRepository;
_authenticator = authenticator;
+ _userRepository = userRepository;
+ _userChannleRep = userChannleRep;
}
#region 鏌ヨ
@@ -90,6 +96,7 @@
lifeUser = new LifePayUser()
{
Id = GuidGenerator.Create(),
+ CreationChannleNum = input.CheckChannelId,
PhoneNumber = input.PhoneNumber,
LastLoginTime = DateTime.Now
};
@@ -98,6 +105,7 @@
}
else
{
+ lifeUser.LastLoginChannleNum = input.CheckChannelId;
lifeUser.LastLoginTime = DateTime.Now;
await _lifePayUserRepository.UpdateAsync(lifeUser);
}
@@ -166,6 +174,19 @@
DepartmentOrgId = input.ClientId == LifePaymentConstant.ClientId.Back ? input.DepartmentOrgId : null,
CompanyOrgId = input.ClientId == LifePaymentConstant.ClientId.Back ? input.CompanyOrgId : null
});
+
+ List<UserChannle> userChannles = new List<UserChannle>();
+ foreach (var item in input.ChannlesId)
+ {
+ userChannles.Add(new UserChannle()
+ {
+ Id = Guid.NewGuid(),
+ ChannleId = item,
+ UserId = user.Id
+ });
+ }
+
+ await _userChannleRep.InsertManyAsync(userChannles);
//if (input.ClientId == Constant.ClientType.Back)
//{
// await _distributedEventBus.PublishAsync(new SendPhoneMessageInput
--
Gitblit v1.9.1