我的账户
This commit is contained in:
parent
d40c93d8c2
commit
ab8caac7a7
|
|
@ -27,7 +27,7 @@ using System.Threading.Tasks;
|
|||
namespace HuanMeng.MiaoYu.Code.Base
|
||||
{
|
||||
/// <summary>
|
||||
/// 默认控制器类
|
||||
/// BLL父类
|
||||
/// </summary>
|
||||
public class MiaoYuBase : BLLBase<DAO>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -346,6 +346,30 @@ namespace HuanMeng.MiaoYu.Code.Chat
|
|||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取消息聊天记录列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
//public async Task<BaseResponse<List<ChatHistoryInfo>>> GetChatHistoryList()
|
||||
//{
|
||||
// var userChatSessions = await Dao.daoDbMiaoYu.context.T_User_Chat.Where(it => it.UserId == _UserId && !it.IsDelete).ToListAsync();
|
||||
// List<ChatHistoryInfo> chatHistoryInfos = new List<ChatHistoryInfo>();
|
||||
// var charactersIds = MiaoYuCache.CharacterList.ToList();
|
||||
// userChatSessions.ForEach(it =>
|
||||
// {
|
||||
// var model = charactersIds.FirstOrDefault(item => item.Id == it.CharacterId);
|
||||
// if (model != null)
|
||||
// {
|
||||
// var info = Mapper.Map<ChatHistoryInfo>(model);
|
||||
// info.LastContactTime = it.UpdateAt;
|
||||
// chatHistoryInfos.Add(info);
|
||||
// }
|
||||
|
||||
// });
|
||||
// chatHistoryInfos = chatHistoryInfos.OrderByDescending(it => it.LastContactTime).ToList();
|
||||
// return new BaseResponse<List<ChatHistoryInfo>>(ResonseCode.Success, "", chatHistoryInfos) { };
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 获取消息聊天记录列表
|
||||
/// </summary>
|
||||
|
|
@ -353,6 +377,8 @@ namespace HuanMeng.MiaoYu.Code.Chat
|
|||
public async Task<BaseResponse<List<ChatHistoryInfo>>> GetChatHistoryList()
|
||||
{
|
||||
var userChatSessions = await Dao.daoDbMiaoYu.context.T_User_Chat.Where(it => it.UserId == _UserId && !it.IsDelete).ToListAsync();
|
||||
|
||||
|
||||
List<ChatHistoryInfo> chatHistoryInfos = new List<ChatHistoryInfo>();
|
||||
var charactersIds = MiaoYuCache.CharacterList.ToList();
|
||||
userChatSessions.ForEach(it =>
|
||||
|
|
@ -360,11 +386,17 @@ namespace HuanMeng.MiaoYu.Code.Chat
|
|||
var model = charactersIds.FirstOrDefault(item => item.Id == it.CharacterId);
|
||||
if (model != null)
|
||||
{
|
||||
|
||||
var info = Mapper.Map<ChatHistoryInfo>(model);
|
||||
//获取最新的聊天记录
|
||||
var c = Dao.daoDbMiaoYu.context.T_Chat.Where(it => it.SessionId == it.SessionId).OrderByDescending(it => it.SendMessageDay).FirstOrDefault();
|
||||
info.LastContactTime = it.UpdateAt;
|
||||
if (c != null)
|
||||
{
|
||||
info.LastMessage = c.Content;
|
||||
}
|
||||
chatHistoryInfos.Add(info);
|
||||
}
|
||||
|
||||
});
|
||||
chatHistoryInfos = chatHistoryInfos.OrderByDescending(it => it.LastContactTime).ToList();
|
||||
return new BaseResponse<List<ChatHistoryInfo>>(ResonseCode.Success, "", chatHistoryInfos) { };
|
||||
|
|
|
|||
|
|
@ -111,7 +111,8 @@ namespace HuanMeng.MiaoYu.Code.Users
|
|||
NickName = user.NickName,
|
||||
UserId = user.Id,
|
||||
Currency = userData.Currency,
|
||||
UserIconUrl = userData.UserIconUrl
|
||||
UserIconUrl = userData.UserIconUrl,
|
||||
TalkCount = 1
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,6 +83,16 @@ public partial class MiaoYuContext : MultiTenantDbContext//DbContext
|
|||
/// </summary>
|
||||
public virtual DbSet<T_Model_Config> T_Model_Config { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商城表
|
||||
/// </summary>
|
||||
public virtual DbSet<T_ShoppingMall> T_ShoppingMall { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 交易记录表
|
||||
/// </summary>
|
||||
public virtual DbSet<T_TransactionRecord> T_TransactionRecord { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户表
|
||||
/// </summary>
|
||||
|
|
@ -93,6 +103,11 @@ public partial class MiaoYuContext : MultiTenantDbContext//DbContext
|
|||
/// </summary>
|
||||
public virtual DbSet<T_User_Chat> T_User_Chat { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户货币表
|
||||
/// </summary>
|
||||
public virtual DbSet<T_User_Currency> T_User_Currency { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户信息表
|
||||
/// </summary>
|
||||
|
|
@ -103,6 +118,11 @@ public partial class MiaoYuContext : MultiTenantDbContext//DbContext
|
|||
/// </summary>
|
||||
public virtual DbSet<T_User_Phone_Account> T_User_Phone_Account { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户道具表
|
||||
/// </summary>
|
||||
public virtual DbSet<T_User_Prop> T_User_Prop { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 验证码表
|
||||
/// </summary>
|
||||
|
|
@ -128,7 +148,7 @@ public partial class MiaoYuContext : MultiTenantDbContext//DbContext
|
|||
.HasComment("创建时间")
|
||||
.HasColumnType("datetime");
|
||||
entity.Property(e => e.Gender).HasComment("性别0男1女2其他");
|
||||
entity.Property(e => e.IconImg).HasComment("角色头像");
|
||||
entity.Property(e => e.IconImg).HasComment("角色头像(是id)");
|
||||
entity.Property(e => e.ModelConfigId).HasComment("模型Id");
|
||||
entity.Property(e => e.Name)
|
||||
.HasMaxLength(50)
|
||||
|
|
@ -324,11 +344,26 @@ public partial class MiaoYuContext : MultiTenantDbContext//DbContext
|
|||
|
||||
entity.ToTable(tb => tb.HasComment("图片表"));
|
||||
|
||||
entity.Property(e => e.Bucket)
|
||||
.HasMaxLength(100)
|
||||
.HasComment("存储桶");
|
||||
entity.Property(e => e.CreateAt)
|
||||
.HasComment("创建时间")
|
||||
.HasColumnType("datetime");
|
||||
entity.Property(e => e.ImageId).HasComment("图片Id");
|
||||
entity.Property(e => e.Name)
|
||||
.HasMaxLength(50)
|
||||
.HasComment("图片名称");
|
||||
entity.Property(e => e.OssPath)
|
||||
.HasMaxLength(200)
|
||||
.HasComment("oss存放路径");
|
||||
entity.Property(e => e.Region)
|
||||
.HasMaxLength(100)
|
||||
.HasComment("地域");
|
||||
entity.Property(e => e.TenantId).HasComment("租户");
|
||||
entity.Property(e => e.UpdateAt)
|
||||
.HasComment("修改时间")
|
||||
.HasColumnType("datetime");
|
||||
entity.Property(e => e.Url)
|
||||
.HasMaxLength(500)
|
||||
.HasComment("图片地址");
|
||||
|
|
@ -373,6 +408,80 @@ public partial class MiaoYuContext : MultiTenantDbContext//DbContext
|
|||
}
|
||||
});
|
||||
|
||||
modelBuilder.Entity<T_ShoppingMall>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("PK__T_Shoppi__3214EC07DC10A165");
|
||||
|
||||
entity.ToTable(tb => tb.HasComment("商城表"));
|
||||
|
||||
entity.Property(e => e.Id)
|
||||
.ValueGeneratedNever()
|
||||
.HasComment("道具Id");
|
||||
entity.Property(e => e.CreateTime)
|
||||
.HasComment("创建时间")
|
||||
.HasColumnType("datetime");
|
||||
entity.Property(e => e.ExchangeCurrencyCount).HasComment("兑换道具所需要的金币数量");
|
||||
entity.Property(e => e.IsProductDelisting)
|
||||
.HasMaxLength(255)
|
||||
.IsUnicode(false)
|
||||
.HasComment("商品是否下架");
|
||||
entity.Property(e => e.PropDesc)
|
||||
.HasMaxLength(1)
|
||||
.HasComment("道具描述");
|
||||
entity.Property(e => e.PropImgId).HasComment("道具图片配置 图片id");
|
||||
entity.Property(e => e.PropName)
|
||||
.HasMaxLength(1)
|
||||
.HasComment("道具名称");
|
||||
entity.Property(e => e.TenantId).HasComment("租户ID");
|
||||
entity.Property(e => e.UpdateTime)
|
||||
.HasComment("更新时间")
|
||||
.HasColumnType("datetime");
|
||||
//添加全局筛选器
|
||||
if (this.TenantInfo != null)
|
||||
{
|
||||
entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
|
||||
}
|
||||
});
|
||||
|
||||
modelBuilder.Entity<T_TransactionRecord>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("PK__Transact__3214EC070BEE5E59");
|
||||
|
||||
entity.ToTable(tb => tb.HasComment("交易记录表"));
|
||||
|
||||
entity.Property(e => e.Id)
|
||||
.ValueGeneratedNever()
|
||||
.HasComment("交易记录Id");
|
||||
entity.Property(e => e.CreateTime)
|
||||
.HasComment("创建时间")
|
||||
.HasColumnType("datetime");
|
||||
entity.Property(e => e.CurrencyCount)
|
||||
.HasMaxLength(255)
|
||||
.IsUnicode(false)
|
||||
.HasComment("金币数量");
|
||||
entity.Property(e => e.CurrenyId).HasComment("货币Id 用来区分是免费还是购买");
|
||||
entity.Property(e => e.PayType)
|
||||
.HasMaxLength(255)
|
||||
.IsUnicode(false)
|
||||
.HasComment("交易类型0购买金币1兑换道具");
|
||||
entity.Property(e => e.TenantId).HasComment("租户id");
|
||||
entity.Property(e => e.TransactionAmount)
|
||||
.HasComment("交易金额 如果是购买金币,记录实际支付的金额")
|
||||
.HasColumnType("decimal(18, 0)");
|
||||
entity.Property(e => e.TransactionTime)
|
||||
.HasComment("交易时间")
|
||||
.HasColumnType("datetime");
|
||||
entity.Property(e => e.UpdateTime)
|
||||
.HasComment("更新时间")
|
||||
.HasColumnType("datetime");
|
||||
entity.Property(e => e.UserId).HasComment("用户Id");
|
||||
//添加全局筛选器
|
||||
if (this.TenantInfo != null)
|
||||
{
|
||||
entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
|
||||
}
|
||||
});
|
||||
|
||||
modelBuilder.Entity<T_User>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("PK__T_User__3214EC073733108B");
|
||||
|
|
@ -425,6 +534,9 @@ public partial class MiaoYuContext : MultiTenantDbContext//DbContext
|
|||
.HasComment("创建时间")
|
||||
.HasColumnType("datetime");
|
||||
entity.Property(e => e.IsDelete).HasComment("是否删除");
|
||||
entity.Property(e => e.LastMessage)
|
||||
.HasMaxLength(1000)
|
||||
.HasComment("最后一条消息");
|
||||
entity.Property(e => e.ModelConfigId).HasComment("使用模型Id");
|
||||
entity.Property(e => e.SessionId).HasComment("会话Id");
|
||||
entity.Property(e => e.SessionName)
|
||||
|
|
@ -442,6 +554,34 @@ public partial class MiaoYuContext : MultiTenantDbContext//DbContext
|
|||
}
|
||||
});
|
||||
|
||||
modelBuilder.Entity<T_User_Currency>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("PK__T_User_C__3214EC0728E86D78");
|
||||
|
||||
entity.ToTable(tb => tb.HasComment("用户货币表"));
|
||||
|
||||
entity.Property(e => e.CreateAt)
|
||||
.HasComment("创建时间")
|
||||
.HasColumnType("datetime");
|
||||
entity.Property(e => e.CurrencyMoney)
|
||||
.HasComment("货币余额")
|
||||
.HasColumnType("decimal(10, 2)");
|
||||
entity.Property(e => e.CurrencyName)
|
||||
.HasMaxLength(20)
|
||||
.HasComment("货币名称");
|
||||
entity.Property(e => e.CurrencyType).HasComment("货币类型 付费币、免费币");
|
||||
entity.Property(e => e.TenantId).HasComment("租户Id");
|
||||
entity.Property(e => e.UpdateAt)
|
||||
.HasComment("修改时间")
|
||||
.HasColumnType("datetime");
|
||||
entity.Property(e => e.UserId).HasComment("用户Id");
|
||||
//添加全局筛选器
|
||||
if (this.TenantInfo != null)
|
||||
{
|
||||
entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
|
||||
}
|
||||
});
|
||||
|
||||
modelBuilder.Entity<T_User_Data>(entity =>
|
||||
{
|
||||
entity.HasKey(e => new { e.Id, e.UserId }).HasName("PK__T_User_D__E36C60C3D959FD89");
|
||||
|
|
@ -510,6 +650,38 @@ public partial class MiaoYuContext : MultiTenantDbContext//DbContext
|
|||
}
|
||||
});
|
||||
|
||||
modelBuilder.Entity<T_User_Prop>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("PK__T_User_P__3214EC074CCE7A77");
|
||||
|
||||
entity.ToTable(tb => tb.HasComment("用户道具表"));
|
||||
|
||||
entity.Property(e => e.Id)
|
||||
.ValueGeneratedNever()
|
||||
.HasComment("id");
|
||||
entity.Property(e => e.CreateTime)
|
||||
.HasComment("创建时间")
|
||||
.HasColumnType("datetime");
|
||||
entity.Property(e => e.GetTime)
|
||||
.HasComment("获得时间")
|
||||
.HasColumnType("datetime");
|
||||
entity.Property(e => e.IsUse).HasComment("是否使用");
|
||||
entity.Property(e => e.PropId).HasComment("道具Id");
|
||||
entity.Property(e => e.TenantId).HasComment("租户id");
|
||||
entity.Property(e => e.UpdateTime)
|
||||
.HasComment("更新时间")
|
||||
.HasColumnType("datetime");
|
||||
entity.Property(e => e.UseTime)
|
||||
.HasComment("使用时间")
|
||||
.HasColumnType("datetime");
|
||||
entity.Property(e => e.UserId).HasComment("用户id");
|
||||
//添加全局筛选器
|
||||
if (this.TenantInfo != null)
|
||||
{
|
||||
entity.HasQueryFilter(it => it.TenantId == this.TenantInfo.TenantId);
|
||||
}
|
||||
});
|
||||
|
||||
modelBuilder.Entity<T_Verification_Code>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("PK__T_Verifi__3214EC074DE3F41A");
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
|
||||
namespace HuanMeng.MiaoYu.Model.DbSqlServer.Db_MiaoYu;
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ public partial class T_Character: MultiTenantEntity
|
|||
public int? BgImg { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 角色头像
|
||||
/// 角色头像(是id)
|
||||
/// </summary>
|
||||
public int? IconImg { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
|
||||
using System;
|
||||
|
||||
namespace HuanMeng.MiaoYu.Model.DbSqlServer.Db_MiaoYu;
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -23,4 +24,29 @@ public partial class T_Image_Config: MultiTenantEntity
|
|||
/// 图片地址
|
||||
/// </summary>
|
||||
public string Url { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime CreateAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 修改时间
|
||||
/// </summary>
|
||||
public DateTime UpdateAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// oss存放路径
|
||||
/// </summary>
|
||||
public string? OssPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 存储桶
|
||||
/// </summary>
|
||||
public string? Bucket { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 地域
|
||||
/// </summary>
|
||||
public string? Region { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,50 @@
|
|||
using System;
|
||||
|
||||
namespace HuanMeng.MiaoYu.Model.DbSqlServer.Db_MiaoYu;
|
||||
|
||||
/// <summary>
|
||||
/// 商城表
|
||||
/// </summary>
|
||||
public partial class T_ShoppingMall: MultiTenantEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 道具Id
|
||||
/// </summary>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 道具名称
|
||||
/// </summary>
|
||||
public string? PropName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 道具描述
|
||||
/// </summary>
|
||||
public string? PropDesc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 道具图片配置 图片id
|
||||
/// </summary>
|
||||
public int? PropImgId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 兑换道具所需要的金币数量
|
||||
/// </summary>
|
||||
public int? ExchangeCurrencyCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商品是否下架
|
||||
/// </summary>
|
||||
public string? IsProductDelisting { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime? CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
public DateTime? UpdateTime { get; set; }
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
using System;
|
||||
|
||||
namespace HuanMeng.MiaoYu.Model.DbSqlServer.Db_MiaoYu;
|
||||
|
||||
/// <summary>
|
||||
/// 交易记录表
|
||||
/// </summary>
|
||||
public partial class T_TransactionRecord: MultiTenantEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 交易记录Id
|
||||
/// </summary>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户Id
|
||||
/// </summary>
|
||||
public int UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 交易类型0购买金币1兑换道具
|
||||
/// </summary>
|
||||
public string? PayType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 货币Id 用来区分是免费还是购买
|
||||
/// </summary>
|
||||
public int? CurrenyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 交易时间
|
||||
/// </summary>
|
||||
public DateTime TransactionTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 金币数量
|
||||
/// </summary>
|
||||
public string? CurrencyCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 交易金额 如果是购买金币,记录实际支付的金额
|
||||
/// </summary>
|
||||
public decimal? TransactionAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
public DateTime? UpdateTime { get; set; }
|
||||
|
||||
}
|
||||
|
|
@ -46,4 +46,9 @@ public partial class T_User_Chat: MultiTenantEntity
|
|||
/// 是否删除
|
||||
/// </summary>
|
||||
public bool IsDelete { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最后一条消息
|
||||
/// </summary>
|
||||
public string? LastMessage { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
|
||||
namespace HuanMeng.MiaoYu.Model.DbSqlServer.Db_MiaoYu;
|
||||
|
||||
/// <summary>
|
||||
/// 用户货币表
|
||||
/// </summary>
|
||||
public partial class T_User_Currency: MultiTenantEntity
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 货币类型 付费币、免费币
|
||||
/// </summary>
|
||||
public int CurrencyType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 货币名称
|
||||
/// </summary>
|
||||
public string CurrencyName { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// 货币余额
|
||||
/// </summary>
|
||||
public decimal CurrencyMoney { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 修改时间
|
||||
/// </summary>
|
||||
public DateTime UpdateAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime CreateAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户Id
|
||||
/// </summary>
|
||||
public int UserId { get; set; }
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
using System;
|
||||
|
||||
namespace HuanMeng.MiaoYu.Model.DbSqlServer.Db_MiaoYu;
|
||||
|
||||
/// <summary>
|
||||
/// 用户道具表
|
||||
/// </summary>
|
||||
public partial class T_User_Prop: MultiTenantEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// id
|
||||
/// </summary>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户id
|
||||
/// </summary>
|
||||
public int? UserId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 道具Id
|
||||
/// </summary>
|
||||
public int? PropId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获得时间
|
||||
/// </summary>
|
||||
public DateTime? GetTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 使用时间
|
||||
/// </summary>
|
||||
public DateTime? UseTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否使用
|
||||
/// </summary>
|
||||
public bool? IsUse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime? CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
public DateTime? UpdateTime { get; set; }
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HuanMeng.MiaoYu.Model.Dto.Account
|
||||
{
|
||||
/// <summary>
|
||||
/// 我的账号信息
|
||||
/// </summary>
|
||||
public class MyAccountInfoDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 我的余额
|
||||
/// </summary>
|
||||
public int CurrencyMoney { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 充值页面信息
|
||||
/// </summary>
|
||||
public List<CurrencyRecharge> CurrencyRechargeList { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 充值信息
|
||||
/// </summary>
|
||||
public class CurrencyRecharge
|
||||
{
|
||||
/// <summary>
|
||||
/// 金币配置id
|
||||
/// </summary>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 金币数量
|
||||
/// </summary>
|
||||
public int CurrencyCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 价格
|
||||
/// </summary>
|
||||
public int Price { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 金币类型
|
||||
/// </summary>
|
||||
public int CurrencyType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 金币图片
|
||||
/// </summary>
|
||||
public string? ImgUrl { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
using AutoMapper;
|
||||
using HuanMeng.MiaoYu.Model.DbSqlServer.Db_MiaoYu;
|
||||
using HuanMeng.MiaoYu.Model.Dto.Character;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HuanMeng.MiaoYu.Model.Dto.Message
|
||||
{
|
||||
[AutoMap(typeof(CharacterCache))]
|
||||
public class ChatMessageList
|
||||
{
|
||||
/// <summary>
|
||||
/// 人物角色id
|
||||
/// </summary>
|
||||
public int CharacterId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 人物角色名称
|
||||
/// </summary>
|
||||
public string CharacterName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 聊天内容
|
||||
/// </summary>
|
||||
public string Content { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 时间
|
||||
/// </summary>
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 聊天类型 图片、文字
|
||||
/// </summary>
|
||||
public string ClaudeType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 头像
|
||||
/// </summary>
|
||||
public string UserIcon { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -31,5 +31,10 @@ namespace HuanMeng.MiaoYu.Model.Dto
|
|||
/// 用户昵称,需要和主表保持一致
|
||||
/// </summary>
|
||||
public string? NickName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 聊过的数量
|
||||
/// </summary>
|
||||
public int TalkCount { get;set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ using Microsoft.AspNetCore.Authorization;
|
|||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System.Numerics;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
|
|
@ -46,6 +46,7 @@ namespace HuanMeng.MiaoYu.WebApi.Controllers
|
|||
UserBLL userBLL = new UserBLL(ServiceProvider);
|
||||
return await userBLL.SendPhoneNumber(phone.PhoneNumber);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 登录- 登录
|
||||
/// </summary>
|
||||
|
|
@ -71,5 +72,16 @@ namespace HuanMeng.MiaoYu.WebApi.Controllers
|
|||
return await userBLL.GetUserInfo();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 我的账户
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
[HttpGet]
|
||||
public async Task<BaseResponse<MyAccountInfoDto>> GetMyAccount()
|
||||
{
|
||||
var obj = JsonConvert.DeserializeObject<MyAccountInfoDto>("{\"CurrencyMoney\":1,\"CurrencyRechargeList\":[{\"Id\":0,\"CurrencyCount\":100,\"Price\":10,\"CurrencyType\":0,\"ImgUrl\":\"\"},{\"Id\":1,\"CurrencyCount\":200,\"Price\":20,\"CurrencyType\":0,\"ImgUrl\":\"\"}]}");
|
||||
return new BaseResponse<MyAccountInfoDto>(ResonseCode.Success, "", obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user