提交代码

This commit is contained in:
zpc 2024-08-19 02:39:57 +08:00
parent 87f75266a3
commit 957b38b863
17 changed files with 427 additions and 131 deletions

View File

@ -5,7 +5,9 @@
# 在解决方案下运行
docker build -t miaoyu:dev-0.0.3 -f src/2-api/HuanMeng.MiaoYu.WebApi/Dockerfile .
docker build -t miaoyu:dev-0.0.4 --build-arg VERSION=7.0 --build-arg TARGET=dev -f src/2-api/HuanMeng.MiaoYu.WebApi/Dockerfile .
docker build -t miaoyuapi:dev-1.2.7 --build-arg VERSION=1.2.7 --build-arg TARGET=dev -f src/2-api/HuanMeng.MiaoYu.WebApi/Dockerfile .
docker build -t miaoyuapi:dev-1.2.8 -t miaoyuapi:latest -t 123.207.203.228:92/miaoyuapi:dev-1.2.8 -t 123.207.203.228:92/miaoyuapi:latest --build-arg VERSION=1.2.8 --build-arg TARGET=dev -f src/2-api/HuanMeng.MiaoYu.WebApi/Dockerfile .
docker push 123.207.203.228:92/miaoyuapi:dev-1.2.8
docker push 123.207.203.228:92/miaoyuapi:latest
docker tag miaoyuapi:dev-1.2.7 123.207.203.228:92/miaoyuapi:dev-1.2.7
docker push 123.207.203.228:92/miaoyuapi:dev-1.2.7
//docker build -t myregistry.com/myusername/myapp:v1.0 .

View File

@ -17,7 +17,7 @@ namespace HuanMeng.MiaoYu.Code.Cache.Special
public class CharacterEntityCache(CacheBase cacheBase, object CharacterCacheLock) : MiaoYuDataEntityCache<CharacterCache>(cacheBase, CharacterCacheLock)
{
/// <summary>
///
///
/// </summary>
private IMapper mapper = cacheBase.Mapper;

View File

@ -0,0 +1,150 @@
using AutoMapper;
using HuanMeng.MiaoYu.Code.Cache.Contract;
using HuanMeng.MiaoYu.Model.Dto.Account;
using HuanMeng.MiaoYu.Model.Dto.Cache;
using HuanMeng.MiaoYu.Model.Dto.Shop;
using HuanMeng.MiaoYu.Model.EnumModel.Product;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HuanMeng.MiaoYu.Code.Cache.Special
{
/// <summary>
///
/// </summary>
/// <param name="cacheBase"></param>
public class ProductEntityCache(CacheBase cacheBase) : MiaoYuDataEntityCache<ProductCache>(cacheBase, _productLock)
{
/// <summary>
///
/// </summary>
private IMapper mapper = cacheBase.Mapper;
private static object _productLock = new object();
/// <summary>
/// 获取缓存数据
/// </summary>
/// <returns></returns>
public override List<ProductCache> GetDataList()
{
var list = _dao.daoDbMiaoYu.context.T_Products.AsNoTracking().Where(it => it.IsProductDelisting == 1).ToList();
if (list == null)
{
list = new List<T_Products>();
}
var images = MiaoYuCacheExtend.GetMiaoYuDataEntityCacheList<T_Image_Config>(cacheBase);
var products = mapper.Map<List<ProductCache>>(list);
var rewards = _dao.daoDbMiaoYu.context.T_Products_Reward.AsNoTracking().ToList();
products.ForEach(product =>
{
//获取所有奖励
var _rewards = rewards.Where(it => it.T_ProductId == product.Id).ToList();
product.Rewards = _rewards;
if (product.Rewards == null)
{
product.Rewards = new List<T_Products_Reward>();
}
product.ProductImg = images.GetImageUrl(product.ProductImgId);
product.FirstChargeImg = images.GetImageUrl(product.FirstChargeImgId ?? 0);
//product.pr
});
return products;
}
/// <summary>
///
/// </summary>
/// <param name="productType"></param>
/// <param name="userOrderBy"></param>
/// <returns></returns>
public virtual List<CurrencyRecharge> GetProductRecharge(int productType, Dictionary<string, int> userOrderBy)
{
if (userOrderBy == null)
{
userOrderBy = new Dictionary<string, int>();
}
//string key = $"Cache:{_dao.daoDbMiaoYu.context.TenantInfo?.TenantId}:MiaoYu:Product:${productType}";
var list = this.DataList;
var productCaches = list.Where(it => it.ProductType == productType).ToList();
List<CurrencyRecharge> currencyRecharge = new List<CurrencyRecharge>();
if (productCaches != null && productCaches.Count > 0)
{
foreach (var product in productCaches)
{
var currencyCount = product.Rewards.Where(it => it.CurrencyType == (int)UserCurrencyType.).Sum(it => it.Money);
var imgUrl = product.ProductImg;
var price = product.Price;
if (product.IsFirstCharge && userOrderBy.ContainsKey(product.ProductId))
{
imgUrl = product.FirstChargeImg;
currencyCount = product.Rewards.Where(it => it.CurrencyType == (int)UserCurrencyType.).Select(it => it.Money + it.FirstChargeMoney).Sum() ?? 0;
price = product.FirstChargePrice ?? 0;
}
var t = new CurrencyRecharge()
{
Id = product.Id,
Price = price,
ProductId = product.ProductId,
CurrencyType = product.ProductType,
Discount = "",
CurrencyCount = currencyCount,
ImgUrl = imgUrl,
};
currencyRecharge.Add(t);
}
}
return currencyRecharge;
}
/// <summary>
///
/// </summary>
/// <param name="userOrderBy"></param>
/// <returns></returns>
public virtual List<MallItemDto> GetMallItemDto(Dictionary<string, int> userOrderBy)
{
List<MallItemDto> mallItemDtos = new List<MallItemDto>();
if (userOrderBy == null)
{
userOrderBy = new Dictionary<string, int>();
}
var list = this.DataList;
var productCaches = list.Where(it => it.ProductType == (int)ProductType.).ToList();
if (productCaches != null && productCaches.Count > 0)
{
foreach (var product in productCaches)
{
var imgUrl = product.ProductImg;
var price = product.Price;
if (product.IsFirstCharge && userOrderBy.ContainsKey(product.ProductId))
{
imgUrl = product.FirstChargeImg;
price = product.FirstChargePrice ?? 0;
}
var t = new MallItemDto()
{
Price = price,
ProductId = product.ProductId,
PriceType = 0,
ProductName = product.ProductName,
PropName = product.ProductName,
PropId = product.Id,
PropType = (int)ProductType.,
ImgUrl = imgUrl,
};
mallItemDtos.Add(t);
}
}
return mallItemDtos;
}
}
}

View File

@ -0,0 +1,63 @@
using HuanMeng.MiaoYu.Code.Cache.Special;
using HuanMeng.MiaoYu.Model.Dto.Account;
using HuanMeng.MiaoYu.Model.Dto.Shop;
using HuanMeng.MiaoYu.Model.EnumModel.Product;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HuanMeng.MiaoYu.Code.Mall
{
/// <summary>
///
/// </summary>
public class ProductBLL : MiaoYuBase
{
public ProductBLL(IServiceProvider serviceProvider) : base(serviceProvider)
{
}
/// <summary>
/// 获取我的页面产品列表
/// </summary>
/// <returns></returns>
public async Task<BaseResponse<MyAccountInfoDto>> GetMyAccountInfoList()
{
MyAccountInfoDto myAccountInfoDto = new MyAccountInfoDto();
if (_UserId == 0)
{
myAccountInfoDto.Currency = 0;
}
else
{
UserInfoBLL user = new UserInfoBLL(Dao, _UserId);
myAccountInfoDto.Currency = user[UserCurrencyType.]?.CurrencyMoney ?? 0;
}
ProductEntityCache productEntityCache = new ProductEntityCache(this);
var list = productEntityCache.GetProductRecharge((int)ProductType., null);
myAccountInfoDto.CurrencyRechargeList = list;
return new BaseResponse<MyAccountInfoDto>(ResonseCode.Success, "", myAccountInfoDto);
}
/// <summary>
///
/// </summary>
/// <returns></returns>
public async Task<BaseResponse<ShopInfoDto>> GetShopInfoListAsync()
{
ShopInfoDto myAccountInfoDto = new ShopInfoDto();
UserInfoBLL user = new UserInfoBLL(Dao, _UserId);
ProductEntityCache productEntityCache = new ProductEntityCache(this);
var list = productEntityCache.GetMallItemDto(null);
myAccountInfoDto.Mall = list;
myAccountInfoDto.Purchased = new List<PurchasedItemDto>();
return new BaseResponse<ShopInfoDto>(ResonseCode.Success, "", myAccountInfoDto);
}
}
}

View File

@ -1,52 +0,0 @@
using HuanMeng.DotNetCore.Base;
using HuanMeng.MiaoYu.Code.Cache;
using HuanMeng.MiaoYu.Model.Dto.Shop;
using HuanMeng.MiaoYu.Model.EnumModel.ShoppingMall;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HuanMeng.MiaoYu.Code.Mall
{
/// <summary>
/// 商城
/// </summary>
/// <param name="serviceProvider"></param>
public class ShoppingMallBLL(IServiceProvider serviceProvider) : MiaoYuBase<ShoppingMallBLL>(serviceProvider)
{
/// <summary>
/// 获取商城列表
/// </summary>
/// <returns></returns>
public async Task<BaseResponse<ShopInfoDto>> GetShoppingMall()
{
BaseResponse<ShopInfoDto> baseResponse = new BaseResponse<ShopInfoDto>() { };
baseResponse.Data = new ShopInfoDto();
var list = await Dao.daoDbMiaoYu.context.T_ShoppingMall.Where(it => it.PropType == (int)MallPropType. && it.IsProductDelisting == 0).OrderBy(it => it.PropId).ToListAsync();
//MallItemDto
List<MallItemDto> mallItemDtos = new List<MallItemDto>();
list.ForEach(it =>
{
MallItemDto mallItemDto = new MallItemDto()
{
PropId = it.Id,
//PropCount = 9999,
PriceType = it.PropType,
ImgUrl = it.PropImgId.GetImageUrl(MiaoYuCache),
PropName = it.PropName,
Price = it.Price,
PropType = it.PropType,
};
mallItemDtos.Add(mallItemDto);
});
baseResponse.Data.Mall = mallItemDtos;
return baseResponse;
}
}
}

View File

@ -110,9 +110,13 @@ namespace HuanMeng.MiaoYu.Code.Users
var user = await Dao.daoDbMiaoYu.context.T_User.FirstOrDefaultAsync(it => it.Id == _UserId);
var userData = await Dao.daoDbMiaoYu.context.T_User_Data.FirstOrDefaultAsync(it => it.Id == _UserId);
//获取用户余额
var Currency = user.GetUserCurrencyMoney(UserCurrencyType., Dao);
var RemainingChatCount = user.GetUserCurrencyMoney(UserCurrencyType., Dao);
var memoryCard = user.GetUserCurrencyMoney(UserCurrencyType., Dao);
UserInfoBLL userInfoBLL = new UserInfoBLL(Dao, _UserId);
var Currency = userInfoBLL[UserCurrencyType.]?.CurrencyMoney;
//var Currency = user.GetUserCurrencyMoney(UserCurrencyType.语珠, Dao);
var RemainingChatCount = userInfoBLL[UserCurrencyType.].CurrencyMoney;
//var RemainingChatCount = user.GetUserCurrencyMoney(UserCurrencyType.聊天次数, Dao);
var memoryCard = userInfoBLL[UserCurrencyType.].CurrencyMoney;
//var memoryCard = user.GetUserCurrencyMoney(UserCurrencyType.记忆卡, Dao);
//获取聊天次数
var hasTalked = Dao.daoDbMiaoYu.context.T_User_Chat.Where(it => it.UserId == _UserId && !it.IsDelete && it.TotalToken > 0).Count();
List<CreateCharacterInfo> characters = new List<CreateCharacterInfo>();

View File

@ -111,7 +111,12 @@ public partial class MiaoYuContext : MultiTenantDbContext//DbContext
/// <summary>
/// 商城表
/// </summary>
public virtual DbSet<T_ShoppingMall> T_ShoppingMall { get; set; }
public virtual DbSet<T_Products> T_Products { get; set; }
/// <summary>
/// 产品表奖励
/// </summary>
public virtual DbSet<T_Products_Reward> T_Products_Reward { get; set; }
/// <summary>
/// 交易记录表
@ -606,37 +611,37 @@ public partial class MiaoYuContext : MultiTenantDbContext//DbContext
}
});
modelBuilder.Entity<T_ShoppingMall>(entity =>
modelBuilder.Entity<T_Products>(entity =>
{
entity.HasKey(e => e.Id).HasName("PK__T_Shoppi__3214EC07DC10A165");
entity.HasKey(e => e.Id).HasName("PK__T_Products__3214EC07DC10A165");
entity.ToTable(tb => tb.HasComment("商城表"));
entity.Property(e => e.Id)
.ValueGeneratedNever()
.HasComment("道具Id");
entity.Property(e => e.Id).HasComment("道具Id");
entity.Property(e => e.CreateTime)
.HasComment("创建时间")
.HasColumnType("datetime");
entity.Property(e => e.FirstChargeImgId).HasComment("首充图片");
entity.Property(e => e.FirstChargePrice)
.HasComment("首充价格")
.HasColumnType("decimal(10, 2)");
entity.Property(e => e.IsFirstCharge).HasComment("是否有首充");
entity.Property(e => e.IsProductDelisting).HasComment("商品是否下架 0否1是");
entity.Property(e => e.LaunchDateTime)
.HasComment("商品上架时间")
.HasColumnType("datetime");
entity.Property(e => e.OrderById).HasComment("排序");
entity.Property(e => e.Price)
.HasComment("价格")
.HasColumnType("decimal(10, 2)");
entity.Property(e => e.PropDesc)
entity.Property(e => e.ProductDesc)
.HasMaxLength(255)
.HasComment("道具描述");
entity.Property(e => e.PropId)
entity.Property(e => e.ProductId)
.HasMaxLength(50)
.HasComment("道具Id");
entity.Property(e => e.PropImgId).HasComment("道具图片配置 图片id");
entity.Property(e => e.PropName)
entity.Property(e => e.ProductImgId).HasComment("道具图片配置 图片id");
entity.Property(e => e.ProductName)
.HasMaxLength(100)
.HasComment("道具名称");
entity.Property(e => e.PropType).HasComment("道具类型0商城1商店");
entity.Property(e => e.StockCount).HasComment("库存数量");
entity.Property(e => e.ProductType).HasComment("道具类型0商城1商店");
entity.Property(e => e.TenantId).HasComment("租户ID");
entity.Property(e => e.UpdateTime)
.HasComment("更新时间")
@ -648,6 +653,26 @@ public partial class MiaoYuContext : MultiTenantDbContext//DbContext
}
});
modelBuilder.Entity<T_Products_Reward>(entity =>
{
entity.HasKey(e => e.Id).HasName("PK__T_Produc__3214EC07CE29C08E");
entity.ToTable(tb => tb.HasComment("产品表奖励"));
entity.Property(e => e.CurrencyType).HasComment("奖励类型");
entity.Property(e => e.FirstChargeMoney).HasComment("首充送多少奖励");
entity.Property(e => e.Money).HasComment("送多少奖励");
entity.Property(e => e.ProductId)
.HasMaxLength(50)
.HasComment("所属商品");
entity.Property(e => e.T_ProductId).HasComment("所属商品");
//添加全局筛选器
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");

View File

@ -5,33 +5,65 @@ namespace HuanMeng.MiaoYu.Model.DbSqlServer.Db_MiaoYu;
/// <summary>
/// 商城表
/// </summary>
public partial class T_ShoppingMall: MultiTenantEntity
public partial class T_Products: MultiTenantEntity
{
/// <summary>
/// 道具Id
/// </summary>
public virtual int Id { get; set; }
public override Guid TenantId { get; set; }
/// <summary>
/// 道具Id
/// </summary>
public virtual string ProductId { get; set; } = null!;
/// <summary>
/// 道具名称
/// </summary>
public virtual string PropName { get; set; } = null!;
public virtual string ProductName { get; set; } = null!;
/// <summary>
/// 道具类型0商城1商店
/// </summary>
public virtual int ProductType { get; set; }
/// <summary>
/// 道具描述
/// </summary>
public virtual string? PropDesc { get; set; }
public virtual string? ProductDesc { get; set; }
/// <summary>
/// 价格
/// </summary>
public virtual decimal Price { get; set; }
/// <summary>
/// 道具图片配置 图片id
/// </summary>
public virtual int PropImgId { get; set; }
public virtual int ProductImgId { get; set; }
/// <summary>
/// 商品是否下架 0否1是
/// </summary>
public virtual int IsProductDelisting { get; set; }
/// <summary>
/// 是否有首充
/// </summary>
public virtual bool IsFirstCharge { get; set; }
/// <summary>
/// 首充图片
/// </summary>
public virtual int? FirstChargeImgId { get; set; }
/// <summary>
/// 首充价格
/// </summary>
public virtual decimal? FirstChargePrice { get; set; }
/// <summary>
/// 创建时间
/// </summary>
@ -42,30 +74,8 @@ public partial class T_ShoppingMall: MultiTenantEntity
/// </summary>
public virtual DateTime? UpdateTime { get; set; }
public override Guid TenantId { get; set; }
/// <summary>
/// 商品上架时间
/// 排序
/// </summary>
public virtual DateTime? LaunchDateTime { get; set; }
/// <summary>
/// 库存数量
/// </summary>
public virtual int? StockCount { get; set; }
/// <summary>
/// 道具类型0商城1商店
/// </summary>
public virtual int PropType { get; set; }
/// <summary>
/// 价格
/// </summary>
public virtual decimal Price { get; set; }
/// <summary>
/// 道具Id
/// </summary>
public virtual string PropId { get; set; } = null!;
public virtual int? OrderById { get; set; }
}

View File

@ -0,0 +1,38 @@
using System;
namespace HuanMeng.MiaoYu.Model.DbSqlServer.Db_MiaoYu;
/// <summary>
/// 产品表奖励
/// </summary>
public partial class T_Products_Reward: MultiTenantEntity
{
public virtual int Id { get; set; }
/// <summary>
/// 奖励类型
/// </summary>
public virtual int CurrencyType { get; set; }
/// <summary>
/// 送多少奖励
/// </summary>
public virtual int Money { get; set; }
/// <summary>
/// 所属商品
/// </summary>
public virtual int T_ProductId { get; set; }
/// <summary>
/// 首充送多少奖励
/// </summary>
public virtual int? FirstChargeMoney { get; set; }
/// <summary>
/// 所属商品
/// </summary>
public virtual string? ProductId { get; set; }
public override Guid TenantId { get; set; }
}

View File

@ -10,7 +10,7 @@ public partial class T_User_Currency: MultiTenantEntity
public virtual int Id { get; set; }
/// <summary>
/// 货币类型 付费币、免费币
/// 货币类型 语珠、免费币
/// </summary>
public virtual int CurrencyType { get; set; }

View File

@ -14,7 +14,7 @@ namespace HuanMeng.MiaoYu.Model.Dto.Account
/// <summary>
/// 我的余额
/// </summary>
public int Currency { get; set; }
public decimal Currency { get; set; }
/// <summary>
/// 充值页面信息
@ -32,6 +32,11 @@ namespace HuanMeng.MiaoYu.Model.Dto.Account
/// </summary>
public int Id { get; set; }
/// <summary>
/// 产品Id
/// </summary>
public string ProductId { get; set; }
/// <summary>
/// 金币数量
/// </summary>
@ -40,12 +45,12 @@ namespace HuanMeng.MiaoYu.Model.Dto.Account
/// <summary>
/// 价格
/// </summary>
public int Price { get; set; }
public decimal Price { get; set; }
/// <summary>
/// 折扣 -0.1 -10%
/// </summary>
public string Discount { get;set; }
public string Discount { get; set; }
/// <summary>
/// 金币类型
@ -58,5 +63,5 @@ namespace HuanMeng.MiaoYu.Model.Dto.Account
public string? ImgUrl { get; set; }
}
}

View File

@ -0,0 +1,33 @@
using AutoMapper;
using HuanMeng.MiaoYu.Model.DbSqlServer.Db_MiaoYu;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HuanMeng.MiaoYu.Model.Dto.Cache
{
/// <summary>
/// 产品列表
/// </summary>
[AutoMap(typeof(T_Products))]
public class ProductCache : T_Products
{
/// <summary>
/// 道具图片配置
/// </summary>
public virtual string ProductImg { get; set; }
/// <summary>
/// 首充图片
/// </summary>
public virtual string FirstChargeImg { get; set; }
/// <summary>
/// 奖励列表
/// </summary>
public List<T_Products_Reward> Rewards { get; set; }
}
}

View File

@ -2,6 +2,7 @@ using AutoMapper;
using HuanMeng.MiaoYu.Model.DbSqlServer.Db_MiaoYu;
using HuanMeng.MiaoYu.Model.Dto.Account;
using System;
using System.Collections.Generic;
using System.Linq;
@ -37,15 +38,19 @@ namespace HuanMeng.MiaoYu.Model.Dto.Shop
///// </summary>
//public int PropId { get; set; }
/// <summary>
/// 产品Id
/// </summary>
public string ProductId { get; set; }
/// <summary>
/// 道具名称
/// </summary>
public string PropName { get; set; }
/// <summary>
/// 道具剩余数量
/// 道具名称
/// </summary>
public int PropCount { get; set; }
public string ProductName { get; set; }
/// <summary>
/// 道具类型

View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HuanMeng.MiaoYu.Model.EnumModel.Product
{
/// <summary>
///
/// </summary>
public enum ProductType
{
/// <summary>
///
/// </summary>
= 0,
/// <summary>
///
/// </summary>
= 1
}
}

View File

@ -1,17 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HuanMeng.MiaoYu.Model.EnumModel.ShoppingMall
{
/// <summary>
///商城商品类型
/// </summary>
public enum MallPropType
{
= 0,
= 1
}
}

View File

@ -16,9 +16,9 @@ namespace HuanMeng.MiaoYu.Model.EnumModel.User
/// </summary>
= 0,
/// <summary>
/// 付费币
/// 语珠
/// </summary>
= 1,
= 1,
/// <summary>
/// 聊天次数
/// </summary>
@ -27,6 +27,8 @@ namespace HuanMeng.MiaoYu.Model.EnumModel.User
/// <summary>
/// 记忆卡数量
/// </summary>
= 3
= 3,
}
}

View File

@ -2,6 +2,7 @@ using Azure;
using HuanMeng.DotNetCore.Base;
using HuanMeng.DotNetCore.Utility;
using HuanMeng.MiaoYu.Code.Mall;
using HuanMeng.MiaoYu.Code.Other;
using HuanMeng.MiaoYu.Code.Users;
using HuanMeng.MiaoYu.Model.Dto;
@ -83,8 +84,10 @@ namespace HuanMeng.MiaoYu.WebApi.Controllers
[HttpGet]
public async Task<BaseResponse<MyAccountInfoDto>> GetMyAccount()
{
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);
ProductBLL productBLL= new ProductBLL(ServiceProvider);
return await productBLL.GetMyAccountInfoList();
//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);
}
/// <summary>
@ -106,8 +109,10 @@ namespace HuanMeng.MiaoYu.WebApi.Controllers
[HttpGet]
public async Task<BaseResponse<ShopInfoDto>> GetMallItem()
{
var obj = JsonConvert.DeserializeObject<ShopInfoDto>("{\"Mall\":[{\"PropId\":1,\"PropName\":\"记忆卡1\",\"PropCount\":100,\"PropType\":0,\"Price\":10,\"PriceType\":0,\"ImgUrl\":\"https://cos.shhuanmeng.com/image/20240718110512.png\"},{\"PropId\":2,\"PropName\":\"记忆卡2\",\"PropCount\":100,\"PropType\":0,\"Price\":20,\"PriceType\":0,\"ImgUrl\":\"https://cos.shhuanmeng.com/image/20240718110518.png\"}],\"Purchased\":[{\"PropId\":2,\"PropName\":\"记忆卡2\",\"PropCount\":100,\"PropType\":0,\"Price\":20,\"PriceType\":0,\"ImgUrl\":\"https://cos.shhuanmeng.com/image/20240718110518.png\",\"BuyingTime\":\"2024-07-09 03:33:09.563\"}]}");
return new BaseResponse<ShopInfoDto>(ResonseCode.Success, "", obj);
ProductBLL productBLL = new ProductBLL(ServiceProvider);
return await productBLL.GetShopInfoListAsync();
//var obj = JsonConvert.DeserializeObject<ShopInfoDto>("{\"Mall\":[{\"PropId\":1,\"PropName\":\"记忆卡1\",\"PropCount\":100,\"PropType\":0,\"Price\":10,\"PriceType\":0,\"ImgUrl\":\"https://cos.shhuanmeng.com/image/20240718110512.png\"},{\"PropId\":2,\"PropName\":\"记忆卡2\",\"PropCount\":100,\"PropType\":0,\"Price\":20,\"PriceType\":0,\"ImgUrl\":\"https://cos.shhuanmeng.com/image/20240718110518.png\"}],\"Purchased\":[{\"PropId\":2,\"PropName\":\"记忆卡2\",\"PropCount\":100,\"PropType\":0,\"Price\":20,\"PriceType\":0,\"ImgUrl\":\"https://cos.shhuanmeng.com/image/20240718110518.png\",\"BuyingTime\":\"2024-07-09 03:33:09.563\"}]}");
//return new BaseResponse<ShopInfoDto>(ResonseCode.Success, "", obj);
}
/// <summary>