修改实体
This commit is contained in:
parent
e1554fa2c7
commit
11bf4f23a0
|
|
@ -118,12 +118,8 @@ namespace HuanMeng.MiaoYu.Code.Users
|
|||
Currency = userData.Currency,
|
||||
UserIconUrl = userData.UserIconUrl,
|
||||
RemainingChatCount = 1,//这里先写1,我不会decimal转int
|
||||
//CharacterInfo = new CreateCharacterInfo
|
||||
//{
|
||||
// CharacterId =1,
|
||||
// CharacterName = "林婉儿",
|
||||
// BgImage= "https://cos.shhuanmeng.com/image/icon/%E6%9E%97%E5%A9%89%E5%84%BF.png"
|
||||
//}
|
||||
HasTalked=1,
|
||||
Photographs=1,
|
||||
CharacterInfo = new List<CreateCharacterInfo>
|
||||
{
|
||||
new CreateCharacterInfo
|
||||
|
|
@ -139,6 +135,11 @@ namespace HuanMeng.MiaoYu.Code.Users
|
|||
BgImage = "https://cos.shhuanmeng.com/image/icon/%E6%9E%97%E5%A9%89%E5%84%BF.png"
|
||||
}
|
||||
// 可以继续添加更多的 CreateCharacterInfo 对象
|
||||
},
|
||||
InviteNewUser = new InviteNewUserDto
|
||||
{
|
||||
ImgUrl = "https://cos.shhuanmeng.com/image/icon/20240720205857.png",
|
||||
Type = 0
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,102 +58,5 @@ namespace HuanMeng.MiaoYu.Model.Dto.Account
|
|||
public string? ImgUrl { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 交易
|
||||
/// </summary>
|
||||
public class Transaction
|
||||
{
|
||||
/// <summary>
|
||||
/// 交易内容
|
||||
/// </summary>
|
||||
public string TransactionContent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 交易时间
|
||||
/// </summary>
|
||||
public DateTime TransactionTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 交易数量
|
||||
/// </summary>
|
||||
public decimal TransactionAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 0充值金币1赠送金币2兑换道具
|
||||
/// </summary>
|
||||
public int TransactionType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 0语珠
|
||||
/// </summary>
|
||||
public int CurrencyType { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 商城在售
|
||||
/// </summary>
|
||||
public class MallItemDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 道具id
|
||||
/// </summary>
|
||||
public int PropId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 道具名称
|
||||
/// </summary>
|
||||
public string PropName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 道具剩余数量
|
||||
/// </summary>
|
||||
public int PropCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 道具类型
|
||||
/// </summary>
|
||||
public int PropType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 金额
|
||||
/// </summary>
|
||||
public decimal Price { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付类型 0 语珠 1 RMB
|
||||
/// </summary>
|
||||
public int PriceType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 图片地址
|
||||
/// </summary>
|
||||
public string ImgUrl { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 已拥有
|
||||
/// </summary>
|
||||
public class PurchasedItemDto: MallItemDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 购买时间
|
||||
/// </summary>
|
||||
public DateTime BuyingTime { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 商城
|
||||
/// </summary>
|
||||
public class ShopInfoDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 商城在售
|
||||
/// </summary>
|
||||
public List<MallItemDto> Mall { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 已拥有
|
||||
/// </summary>
|
||||
public List<PurchasedItemDto> Purchased { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
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 TransactionDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 交易内容
|
||||
/// </summary>
|
||||
public string TransactionContent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 交易时间
|
||||
/// </summary>
|
||||
public DateTime TransactionTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 交易数量
|
||||
/// </summary>
|
||||
public decimal TransactionAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 0充值金币1赠送金币2兑换道具
|
||||
/// </summary>
|
||||
public int TransactionType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 0语珠
|
||||
/// </summary>
|
||||
public int CurrencyType { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -34,7 +34,7 @@ namespace HuanMeng.MiaoYu.Model.Dto
|
|||
public string? NickName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 聊天次数
|
||||
/// 剩余聊天次数
|
||||
/// </summary>
|
||||
public int RemainingChatCount { get; set; }
|
||||
|
||||
|
|
@ -46,6 +46,37 @@ namespace HuanMeng.MiaoYu.Model.Dto
|
|||
/// <summary>
|
||||
/// 记忆卡数量
|
||||
/// </summary>
|
||||
public int MemoryCardCount { get; set; }
|
||||
public int MemoryCardCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 邀请新用户
|
||||
/// </summary>
|
||||
public InviteNewUserDto InviteNewUser { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 聊过
|
||||
/// </summary>
|
||||
public int HasTalked { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 相册
|
||||
/// </summary>
|
||||
public int Photographs { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 邀请新用户
|
||||
/// </summary>
|
||||
public class InviteNewUserDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 图片地址
|
||||
/// </summary>
|
||||
public string ImgUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 图片类型 0分享邀请新人
|
||||
/// </summary>
|
||||
public int Type { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
99
src/0-core/HuanMeng.MiaoYu.Model/Dto/Shop/ShopInfoDto.cs
Normal file
99
src/0-core/HuanMeng.MiaoYu.Model/Dto/Shop/ShopInfoDto.cs
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
using HuanMeng.MiaoYu.Model.Dto.Account;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HuanMeng.MiaoYu.Model.Dto.Shop
|
||||
{
|
||||
/// <summary>
|
||||
/// 商城页面实体
|
||||
/// </summary>
|
||||
public class ShopInfoDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 商城在售
|
||||
/// </summary>
|
||||
public List<MallItemDto> Mall { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 已拥有
|
||||
/// </summary>
|
||||
public List<PurchasedItemDto> Purchased { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 商城在售
|
||||
/// </summary>
|
||||
public class MallItemDto : PropInfoDto
|
||||
{
|
||||
///// <summary>
|
||||
///// 道具id
|
||||
///// </summary>
|
||||
//public int PropId { get; set; }
|
||||
|
||||
///// <summary>
|
||||
///// 道具名称
|
||||
///// </summary>
|
||||
//public string PropName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 道具剩余数量
|
||||
/// </summary>
|
||||
public int PropCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 道具类型
|
||||
/// </summary>
|
||||
public int PropType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 金额
|
||||
/// </summary>
|
||||
public decimal Price { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付类型 0 语珠 1 RMB
|
||||
/// </summary>
|
||||
public int PriceType { get; set; }
|
||||
|
||||
|
||||
///// <summary>
|
||||
///// 图片地址
|
||||
///// </summary>
|
||||
//public string ImgUrl { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 商城已拥有
|
||||
/// </summary>
|
||||
public class PurchasedItemDto : MallItemDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 购买时间
|
||||
/// </summary>
|
||||
public DateTime BuyingTime { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 道具基本信息
|
||||
/// </summary>
|
||||
public class PropInfoDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 道具id
|
||||
/// </summary>
|
||||
public int PropId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 道具名称
|
||||
/// </summary>
|
||||
public string PropName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 图片地址
|
||||
/// </summary>
|
||||
public string ImgUrl { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -90,10 +90,10 @@ namespace HuanMeng.MiaoYu.WebApi.Controllers
|
|||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
[HttpGet]
|
||||
public async Task<BaseResponse<List<Transaction>>> GetTransactionRecords()
|
||||
public async Task<BaseResponse<List<TransactionDto>>> GetTransactionRecords()
|
||||
{
|
||||
var obj = JsonConvert.DeserializeObject<List<Transaction>>("[{\"TransactionContent\":\"购买记忆提升道具卡\",\"TransactionTime\":\"2024-07-18 12:58:52.963\",\"TransactionAmount\":\"-10\",\"TransactionType\":0,\"CurrencyType\":0},{\"TransactionContent\":\"充值语珠\",\"TransactionTime\":\"2024-07-17 12:58:52.963\",\"TransactionAmount\":\"+100\",\"TransactionType\":0,\"CurrencyType\":0},{\"TransactionContent\":\"充值语珠\",\"TransactionTime\":\"2024-07-16 12:58:52.963\",\"TransactionAmount\":\"+200\",\"TransactionType\":0,\"CurrencyType\":0}]");
|
||||
return new BaseResponse<List<Transaction>>(ResonseCode.Success, "", obj);
|
||||
var obj = JsonConvert.DeserializeObject<List<TransactionDto>>("[{\"TransactionContent\":\"购买记忆提升道具卡\",\"TransactionTime\":\"2024-07-18 12:58:52.963\",\"TransactionAmount\":\"-10\",\"TransactionType\":0,\"CurrencyType\":0},{\"TransactionContent\":\"充值语珠\",\"TransactionTime\":\"2024-07-17 12:58:52.963\",\"TransactionAmount\":\"+100\",\"TransactionType\":0,\"CurrencyType\":0},{\"TransactionContent\":\"充值语珠\",\"TransactionTime\":\"2024-07-16 12:58:52.963\",\"TransactionAmount\":\"+200\",\"TransactionType\":0,\"CurrencyType\":0}]");
|
||||
return new BaseResponse<List<TransactionDto>>(ResonseCode.Success, "", obj);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using HuanMeng.MiaoYu.Code.Character;
|
|||
using HuanMeng.MiaoYu.Code.Chat;
|
||||
using HuanMeng.MiaoYu.Model.Dto.Character;
|
||||
using HuanMeng.MiaoYu.Model.Dto.Chat;
|
||||
using HuanMeng.MiaoYu.Model.Dto.Shop;
|
||||
using HuanMeng.MiaoYu.WebApi.Base;
|
||||
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
|
|
@ -129,10 +130,23 @@ namespace HuanMeng.MiaoYu.WebApi.Controllers
|
|||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[AllowAnonymous]
|
||||
public async Task<BaseResponse<List<ChatHistoryInfo>>> GetChatHistoryList()
|
||||
{
|
||||
var obj = await _chatBLL.GetChatHistoryList();
|
||||
return obj;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取记忆卡列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[AllowAnonymous]
|
||||
public async Task<BaseResponse<List<PropInfoDto>>> GetMemoryCardInfo()
|
||||
{
|
||||
var obj = JsonConvert.DeserializeObject<List<PropInfoDto>>("[{\"PropId\":\"1\",\"PropName\":\"记忆卡1\",\"ImgUrl\":\"\"},{\"PropId\":\"2\",\"PropName\":\"记忆卡2\",\"ImgUrl\":\"\"}]");
|
||||
return new BaseResponse<List<PropInfoDto>>(ResonseCode.Success, "", obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
|
|
|
|||
5
src/2-api/HuanMeng.MiaoYu.WebApi/Pay-config/wxpay.json
Normal file
5
src/2-api/HuanMeng.MiaoYu.WebApi/Pay-config/wxpay.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"AppID": "", //网站的唯一标识
|
||||
"MchID": "", //商户ID
|
||||
"Key": ""
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user