diff --git a/src/0-core/HuanMeng.MiaoYu.Code/Base/MiaoYuBase.cs b/src/0-core/HuanMeng.MiaoYu.Code/Base/MiaoYuBase.cs
index 52d8826..4b843f8 100644
--- a/src/0-core/HuanMeng.MiaoYu.Code/Base/MiaoYuBase.cs
+++ b/src/0-core/HuanMeng.MiaoYu.Code/Base/MiaoYuBase.cs
@@ -27,7 +27,7 @@ using System.Threading.Tasks;
namespace HuanMeng.MiaoYu.Code.Base
{
///
- /// 默认控制器类
+ /// BLL父类
///
public class MiaoYuBase : BLLBase
{
diff --git a/src/0-core/HuanMeng.MiaoYu.Code/Chat/ChatBLL.cs b/src/0-core/HuanMeng.MiaoYu.Code/Chat/ChatBLL.cs
index 30422d4..e5b9909 100644
--- a/src/0-core/HuanMeng.MiaoYu.Code/Chat/ChatBLL.cs
+++ b/src/0-core/HuanMeng.MiaoYu.Code/Chat/ChatBLL.cs
@@ -346,6 +346,30 @@ namespace HuanMeng.MiaoYu.Code.Chat
return true;
}
+ ///
+ /// 获取消息聊天记录列表
+ ///
+ ///
+ //public async Task>> GetChatHistoryList()
+ //{
+ // var userChatSessions = await Dao.daoDbMiaoYu.context.T_User_Chat.Where(it => it.UserId == _UserId && !it.IsDelete).ToListAsync();
+ // List chatHistoryInfos = new List();
+ // var charactersIds = MiaoYuCache.CharacterList.ToList();
+ // userChatSessions.ForEach(it =>
+ // {
+ // var model = charactersIds.FirstOrDefault(item => item.Id == it.CharacterId);
+ // if (model != null)
+ // {
+ // var info = Mapper.Map(model);
+ // info.LastContactTime = it.UpdateAt;
+ // chatHistoryInfos.Add(info);
+ // }
+
+ // });
+ // chatHistoryInfos = chatHistoryInfos.OrderByDescending(it => it.LastContactTime).ToList();
+ // return new BaseResponse>(ResonseCode.Success, "", chatHistoryInfos) { };
+ //}
+
///
/// 获取消息聊天记录列表
///
@@ -353,6 +377,8 @@ namespace HuanMeng.MiaoYu.Code.Chat
public async Task>> GetChatHistoryList()
{
var userChatSessions = await Dao.daoDbMiaoYu.context.T_User_Chat.Where(it => it.UserId == _UserId && !it.IsDelete).ToListAsync();
+
+
List chatHistoryInfos = new List();
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(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>(ResonseCode.Success, "", chatHistoryInfos) { };
diff --git a/src/0-core/HuanMeng.MiaoYu.Code/Users/UserBLL.cs b/src/0-core/HuanMeng.MiaoYu.Code/Users/UserBLL.cs
index e8be460..7a28070 100644
--- a/src/0-core/HuanMeng.MiaoYu.Code/Users/UserBLL.cs
+++ b/src/0-core/HuanMeng.MiaoYu.Code/Users/UserBLL.cs
@@ -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
});
}
}
diff --git a/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/MiaoYuContext.cs b/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/MiaoYuContext.cs
index d8a537d..dd6bfb4 100644
--- a/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/MiaoYuContext.cs
+++ b/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/MiaoYuContext.cs
@@ -83,6 +83,16 @@ public partial class MiaoYuContext : MultiTenantDbContext//DbContext
///
public virtual DbSet T_Model_Config { get; set; }
+ ///
+ /// 商城表
+ ///
+ public virtual DbSet T_ShoppingMall { get; set; }
+
+ ///
+ /// 交易记录表
+ ///
+ public virtual DbSet T_TransactionRecord { get; set; }
+
///
/// 用户表
///
@@ -93,6 +103,11 @@ public partial class MiaoYuContext : MultiTenantDbContext//DbContext
///
public virtual DbSet T_User_Chat { get; set; }
+ ///
+ /// 用户货币表
+ ///
+ public virtual DbSet T_User_Currency { get; set; }
+
///
/// 用户信息表
///
@@ -103,6 +118,11 @@ public partial class MiaoYuContext : MultiTenantDbContext//DbContext
///
public virtual DbSet T_User_Phone_Account { get; set; }
+ ///
+ /// 用户道具表
+ ///
+ public virtual DbSet T_User_Prop { get; set; }
+
///
/// 验证码表
///
@@ -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(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(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(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(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(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(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(entity =>
{
entity.HasKey(e => e.Id).HasName("PK__T_Verifi__3214EC074DE3F41A");
diff --git a/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_Character.cs b/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_Character.cs
index 1adee90..eea1696 100644
--- a/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_Character.cs
+++ b/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_Character.cs
@@ -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; }
///
- /// 角色头像
+ /// 角色头像(是id)
///
public int? IconImg { get; set; }
}
diff --git a/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_Image_Config.cs b/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_Image_Config.cs
index a593bd1..b943c7e 100644
--- a/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_Image_Config.cs
+++ b/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_Image_Config.cs
@@ -1,4 +1,5 @@
-
+using System;
+
namespace HuanMeng.MiaoYu.Model.DbSqlServer.Db_MiaoYu;
///
@@ -23,4 +24,29 @@ public partial class T_Image_Config: MultiTenantEntity
/// 图片地址
///
public string Url { get; set; } = null!;
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateAt { get; set; }
+
+ ///
+ /// 修改时间
+ ///
+ public DateTime UpdateAt { get; set; }
+
+ ///
+ /// oss存放路径
+ ///
+ public string? OssPath { get; set; }
+
+ ///
+ /// 存储桶
+ ///
+ public string? Bucket { get; set; }
+
+ ///
+ /// 地域
+ ///
+ public string? Region { get; set; }
}
diff --git a/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_ShoppingMall.cs b/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_ShoppingMall.cs
new file mode 100644
index 0000000..6a623f8
--- /dev/null
+++ b/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_ShoppingMall.cs
@@ -0,0 +1,50 @@
+using System;
+
+namespace HuanMeng.MiaoYu.Model.DbSqlServer.Db_MiaoYu;
+
+///
+/// 商城表
+///
+public partial class T_ShoppingMall: MultiTenantEntity
+{
+ ///
+ /// 道具Id
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 道具名称
+ ///
+ public string? PropName { get; set; }
+
+ ///
+ /// 道具描述
+ ///
+ public string? PropDesc { get; set; }
+
+ ///
+ /// 道具图片配置 图片id
+ ///
+ public int? PropImgId { get; set; }
+
+ ///
+ /// 兑换道具所需要的金币数量
+ ///
+ public int? ExchangeCurrencyCount { get; set; }
+
+ ///
+ /// 商品是否下架
+ ///
+ public string? IsProductDelisting { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime? CreateTime { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ public DateTime? UpdateTime { get; set; }
+
+}
diff --git a/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_TransactionRecord.cs b/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_TransactionRecord.cs
new file mode 100644
index 0000000..6a76d44
--- /dev/null
+++ b/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_TransactionRecord.cs
@@ -0,0 +1,55 @@
+using System;
+
+namespace HuanMeng.MiaoYu.Model.DbSqlServer.Db_MiaoYu;
+
+///
+/// 交易记录表
+///
+public partial class T_TransactionRecord: MultiTenantEntity
+{
+ ///
+ /// 交易记录Id
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 用户Id
+ ///
+ public int UserId { get; set; }
+
+ ///
+ /// 交易类型0购买金币1兑换道具
+ ///
+ public string? PayType { get; set; }
+
+ ///
+ /// 货币Id 用来区分是免费还是购买
+ ///
+ public int? CurrenyId { get; set; }
+
+ ///
+ /// 交易时间
+ ///
+ public DateTime TransactionTime { get; set; }
+
+ ///
+ /// 金币数量
+ ///
+ public string? CurrencyCount { get; set; }
+
+ ///
+ /// 交易金额 如果是购买金币,记录实际支付的金额
+ ///
+ public decimal? TransactionAmount { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ public DateTime? UpdateTime { get; set; }
+
+}
diff --git a/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_User_Chat.cs b/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_User_Chat.cs
index cfbbfa5..a52d312 100644
--- a/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_User_Chat.cs
+++ b/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_User_Chat.cs
@@ -46,4 +46,9 @@ public partial class T_User_Chat: MultiTenantEntity
/// 是否删除
///
public bool IsDelete { get; set; }
+
+ ///
+ /// 最后一条消息
+ ///
+ public string? LastMessage { get; set; }
}
diff --git a/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_User_Currency.cs b/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_User_Currency.cs
new file mode 100644
index 0000000..7f13d44
--- /dev/null
+++ b/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_User_Currency.cs
@@ -0,0 +1,42 @@
+using System;
+
+namespace HuanMeng.MiaoYu.Model.DbSqlServer.Db_MiaoYu;
+
+///
+/// 用户货币表
+///
+public partial class T_User_Currency: MultiTenantEntity
+{
+ public int Id { get; set; }
+
+ ///
+ /// 货币类型 付费币、免费币
+ ///
+ public int CurrencyType { get; set; }
+
+ ///
+ /// 货币名称
+ ///
+ public string CurrencyName { get; set; } = null!;
+
+ ///
+ /// 货币余额
+ ///
+ public decimal CurrencyMoney { get; set; }
+
+ ///
+ /// 修改时间
+ ///
+ public DateTime UpdateAt { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateAt { get; set; }
+
+ ///
+ /// 用户Id
+ ///
+ public int UserId { get; set; }
+
+}
diff --git a/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_User_Prop.cs b/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_User_Prop.cs
new file mode 100644
index 0000000..32843fd
--- /dev/null
+++ b/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/T_User_Prop.cs
@@ -0,0 +1,50 @@
+using System;
+
+namespace HuanMeng.MiaoYu.Model.DbSqlServer.Db_MiaoYu;
+
+///
+/// 用户道具表
+///
+public partial class T_User_Prop: MultiTenantEntity
+{
+ ///
+ /// id
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 用户id
+ ///
+ public int? UserId { get; set; }
+
+
+ ///
+ /// 道具Id
+ ///
+ public int? PropId { get; set; }
+
+ ///
+ /// 获得时间
+ ///
+ public DateTime? GetTime { get; set; }
+
+ ///
+ /// 使用时间
+ ///
+ public DateTime? UseTime { get; set; }
+
+ ///
+ /// 是否使用
+ ///
+ public bool? IsUse { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime? CreateTime { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ public DateTime? UpdateTime { get; set; }
+}
diff --git a/src/0-core/HuanMeng.MiaoYu.Model/Dto/Account/MyAccountInfoDto.cs b/src/0-core/HuanMeng.MiaoYu.Model/Dto/Account/MyAccountInfoDto.cs
new file mode 100644
index 0000000..07075a9
--- /dev/null
+++ b/src/0-core/HuanMeng.MiaoYu.Model/Dto/Account/MyAccountInfoDto.cs
@@ -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
+{
+ ///
+ /// 我的账号信息
+ ///
+ public class MyAccountInfoDto
+ {
+ ///
+ /// 我的余额
+ ///
+ public int CurrencyMoney { get; set; }
+
+ ///
+ /// 充值页面信息
+ ///
+ public List CurrencyRechargeList { get; set; }
+ }
+
+ ///
+ /// 充值信息
+ ///
+ public class CurrencyRecharge
+ {
+ ///
+ /// 金币配置id
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 金币数量
+ ///
+ public int CurrencyCount { get; set; }
+
+ ///
+ /// 价格
+ ///
+ public int Price { get; set; }
+
+ ///
+ /// 金币类型
+ ///
+ public int CurrencyType { get; set; }
+
+ ///
+ /// 金币图片
+ ///
+ public string? ImgUrl { get; set; }
+ }
+}
diff --git a/src/0-core/HuanMeng.MiaoYu.Model/Dto/Message/ChatMessageList.cs b/src/0-core/HuanMeng.MiaoYu.Model/Dto/Message/ChatMessageList.cs
new file mode 100644
index 0000000..2424c51
--- /dev/null
+++ b/src/0-core/HuanMeng.MiaoYu.Model/Dto/Message/ChatMessageList.cs
@@ -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
+ {
+ ///
+ /// 人物角色id
+ ///
+ public int CharacterId { get; set; }
+
+ ///
+ /// 人物角色名称
+ ///
+ public string CharacterName { get; set; }
+
+ ///
+ /// 聊天内容
+ ///
+ public string Content { get; set; }
+
+ ///
+ /// 时间
+ ///
+ public DateTime UpdateTime { get; set; }
+
+ ///
+ /// 聊天类型 图片、文字
+ ///
+ public string ClaudeType { get; set; }
+
+ ///
+ /// 头像
+ ///
+ public string UserIcon { get; set; }
+ }
+}
diff --git a/src/0-core/HuanMeng.MiaoYu.Model/Dto/ResponseUserInfo.cs b/src/0-core/HuanMeng.MiaoYu.Model/Dto/ResponseUserInfo.cs
index 2d1353b..84877d3 100644
--- a/src/0-core/HuanMeng.MiaoYu.Model/Dto/ResponseUserInfo.cs
+++ b/src/0-core/HuanMeng.MiaoYu.Model/Dto/ResponseUserInfo.cs
@@ -31,5 +31,10 @@ namespace HuanMeng.MiaoYu.Model.Dto
/// 用户昵称,需要和主表保持一致
///
public string? NickName { get; set; }
+
+ ///
+ /// 聊过的数量
+ ///
+ public int TalkCount { get;set; }
}
}
diff --git a/src/2-api/HuanMeng.MiaoYu.WebApi/Controllers/AccountController.cs b/src/2-api/HuanMeng.MiaoYu.WebApi/Controllers/AccountController.cs
index 4363d7d..4e2c5ca 100644
--- a/src/2-api/HuanMeng.MiaoYu.WebApi/Controllers/AccountController.cs
+++ b/src/2-api/HuanMeng.MiaoYu.WebApi/Controllers/AccountController.cs
@@ -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);
}
+
///
/// 登录- 登录
///
@@ -71,5 +72,16 @@ namespace HuanMeng.MiaoYu.WebApi.Controllers
return await userBLL.GetUserInfo();
}
+ ///
+ /// 我的账户
+ ///
+ ///
+ [AllowAnonymous]
+ [HttpGet]
+ public async Task> GetMyAccount()
+ {
+ var obj = JsonConvert.DeserializeObject("{\"CurrencyMoney\":1,\"CurrencyRechargeList\":[{\"Id\":0,\"CurrencyCount\":100,\"Price\":10,\"CurrencyType\":0,\"ImgUrl\":\"\"},{\"Id\":1,\"CurrencyCount\":200,\"Price\":20,\"CurrencyType\":0,\"ImgUrl\":\"\"}]}");
+ return new BaseResponse(ResonseCode.Success, "", obj);
+ }
}
}