diff --git a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application.Contracts/Dtos/AiUserRoleMenuDto.cs b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application.Contracts/Dtos/AiUserRoleMenuDto.cs
new file mode 100644
index 00000000..d3297f59
--- /dev/null
+++ b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application.Contracts/Dtos/AiUserRoleMenuDto.cs
@@ -0,0 +1,11 @@
+using Yi.Framework.Rbac.Domain.Shared.Dtos;
+
+namespace Yi.Framework.AiHub.Application.Contracts.Dtos;
+
+public class AiUserRoleMenuDto:UserRoleMenuDto
+{
+ ///
+ /// 是否绑定服务号
+ ///
+ public bool IsBindFuwuhao { get; set; }
+}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/AiAccountService.cs b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/AiAccountService.cs
new file mode 100644
index 00000000..e5290f0d
--- /dev/null
+++ b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/AiAccountService.cs
@@ -0,0 +1,39 @@
+using Mapster;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Mvc;
+using Volo.Abp.Application.Services;
+using Volo.Abp.Users;
+using Yi.Framework.AiHub.Application.Contracts.Dtos;
+using Yi.Framework.AiHub.Domain.Entities;
+using Yi.Framework.Rbac.Application.Contracts.IServices;
+using Yi.Framework.Rbac.Domain.Shared.Dtos;
+using Yi.Framework.SqlSugarCore.Abstractions;
+
+namespace Yi.Framework.AiHub.Application.Services;
+
+public class AiAccountService : ApplicationService
+{
+ private IAccountService _accountService;
+ private ISqlSugarRepository _userRepository;
+
+ public AiAccountService(IAccountService accountService, ISqlSugarRepository userRepository)
+ {
+ _accountService = accountService;
+ _userRepository = userRepository;
+ }
+
+ ///
+ /// 获取ai用户信息
+ ///
+ ///
+ [Authorize]
+ [HttpGet("account/ai")]
+ public async Task GetAsync()
+ {
+ var userId = CurrentUser.GetId();
+ var userAccount = await _accountService.GetAsync(null, null, userId: CurrentUser.GetId());
+ var output = userAccount.Adapt();
+ output.IsBindFuwuhao = await _userRepository.IsAnyAsync(x => userId == x.UserId);
+ return output;
+ }
+}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IAccountService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IAccountService.cs
index 1dd7c6e6..d0c21f00 100644
--- a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IAccountService.cs
+++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IAccountService.cs
@@ -24,8 +24,9 @@ namespace Yi.Framework.Rbac.Application.Contracts.IServices
///
///
///
+ ///
///
- Task GetAsync(string? userName, long? phone);
+ Task GetAsync(string? userName, long? phone,Guid? userId = null);
///
/// 校验电话验证码,需要与电话号码绑定
diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/AccountService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/AccountService.cs
index b898feda..5f9c6654 100644
--- a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/AccountService.cs
+++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/AccountService.cs
@@ -284,11 +284,12 @@ namespace Yi.Framework.Rbac.Application.Services
}
[RemoteService(isEnabled: false)]
- public async Task GetAsync(string? userName, long? phone)
+ public async Task GetAsync(string? userName, long? phone = null, Guid? userId = null)
{
var user = await _userRepository._DbQueryable
.WhereIF(userName is not null, x => x.UserName == userName)
.WhereIF(phone is not null, x => x.Phone == phone)
+ .WhereIF(userId is not null, x => x.Id == userId)
.Where(x => x.State == true)
.FirstAsync();
diff --git a/Yi.Abp.Net8/src/Yi.Abp.Web/YiAbpWebModule.cs b/Yi.Abp.Net8/src/Yi.Abp.Web/YiAbpWebModule.cs
index 4c55ef9c..9e08520e 100644
--- a/Yi.Abp.Net8/src/Yi.Abp.Web/YiAbpWebModule.cs
+++ b/Yi.Abp.Net8/src/Yi.Abp.Web/YiAbpWebModule.cs
@@ -106,7 +106,7 @@ namespace Yi.Abp.Web
//本地开发环境,可以禁用作业执行
if (host.IsDevelopment())
{
- Configure(options => { options.IsEnabled = true; });
+ Configure(options => { options.IsEnabled = false; });
}
//请求日志