修改用户信息
This commit is contained in:
parent
bd98226b6d
commit
9e624108ac
|
|
@ -5,7 +5,7 @@ using HuanMeng.MiaoYu.Code.Users.UserAccount.Contract;
|
||||||
using HuanMeng.MiaoYu.Code.Users.UserAccount.PhoneAccount;
|
using HuanMeng.MiaoYu.Code.Users.UserAccount.PhoneAccount;
|
||||||
using HuanMeng.MiaoYu.Model.Dto;
|
using HuanMeng.MiaoYu.Model.Dto;
|
||||||
using HuanMeng.MiaoYu.Model.Dto.Account;
|
using HuanMeng.MiaoYu.Model.Dto.Account;
|
||||||
|
using HuanMeng.MiaoYu.Model.Dto.Character;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.IdentityModel.Tokens;
|
using Microsoft.IdentityModel.Tokens;
|
||||||
|
|
@ -16,6 +16,7 @@ using System.Linq;
|
||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using static System.Net.Mime.MediaTypeNames;
|
||||||
|
|
||||||
namespace HuanMeng.MiaoYu.Code.Users
|
namespace HuanMeng.MiaoYu.Code.Users
|
||||||
{
|
{
|
||||||
|
|
@ -115,7 +116,13 @@ namespace HuanMeng.MiaoYu.Code.Users
|
||||||
UserId = user.Id,
|
UserId = user.Id,
|
||||||
Currency = userData.Currency,
|
Currency = userData.Currency,
|
||||||
UserIconUrl = userData.UserIconUrl,
|
UserIconUrl = userData.UserIconUrl,
|
||||||
RemainingChatCount= 1
|
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"
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,11 @@ namespace HuanMeng.MiaoYu.Model.Dto.Account
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int Price { get; set; }
|
public int Price { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 折扣 -0.1 -10%
|
||||||
|
/// </summary>
|
||||||
|
public string Discount { get;set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 金币类型
|
/// 金币类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -49,4 +49,25 @@ namespace HuanMeng.MiaoYu.Model.Dto.Character
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<LabelDto> Label { get; set; }
|
public List<LabelDto> Label { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创作中心:人物模型信息
|
||||||
|
/// </summary>
|
||||||
|
public class CreateCharacterInfo
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 人物id
|
||||||
|
/// </summary>
|
||||||
|
public int CharacterId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 人物名字
|
||||||
|
/// </summary>
|
||||||
|
public string? CharacterName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 背景图片
|
||||||
|
/// </summary>
|
||||||
|
public string BgImage { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
using HuanMeng.MiaoYu.Model.Dto.Character;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
@ -36,5 +37,10 @@ namespace HuanMeng.MiaoYu.Model.Dto
|
||||||
/// 聊天次数
|
/// 聊天次数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int RemainingChatCount { get; set; }
|
public int RemainingChatCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创作中心:人物模型信息
|
||||||
|
/// </summary>
|
||||||
|
public CreateCharacterInfo CharacterInfo { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ namespace HuanMeng.MiaoYu.WebApi.Controllers
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public async Task<BaseResponse<MyAccountInfoDto>> GetMyAccount()
|
public async Task<BaseResponse<MyAccountInfoDto>> GetMyAccount()
|
||||||
{
|
{
|
||||||
var obj = JsonConvert.DeserializeObject<MyAccountInfoDto>("{\"Currency\":1,\"CurrencyRechargeList\":[{\"Id\":0,\"CurrencyCount\":100,\"Price\":10,\"CurrencyType\":0,\"ImgUrl\":\"\"},{\"Id\":1,\"CurrencyCount\":200,\"Price\":20,\"CurrencyType\":0,\"ImgUrl\":\"\"}]}");
|
var obj = JsonConvert.DeserializeObject<MyAccountInfoDto>("{\"Currency\":1,\"CurrencyRechargeList\":[{\"Id\":0,\"CurrencyCount\":100,\"Price\":10,\"Discount\":\" 0%\",\"CurrencyType\":0,\"ImgUrl\":\"\"},{\"Id\":1,\"CurrencyCount\":200,\"Price\":20,\"Discount\":\" -10%\",\"CurrencyType\":0,\"ImgUrl\":\"\"}]}");
|
||||||
return new BaseResponse<MyAccountInfoDto>(ResonseCode.Success, "", obj);
|
return new BaseResponse<MyAccountInfoDto>(ResonseCode.Success, "", obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user