修改代码

增加云商品数据
This commit is contained in:
chfei committed 2026-10-14 11:53:36 +08:00
1 parent 2f406c840f
commit db4f030c17
58 files changed
+1550 -120

No files matched your search

@@ -0,0 +1,47 @@
using FreeSql;
using MAX.Core.DependencyInjection;
using MAX.Core.Helpers;
using Store.Users.Entities;
using System;
using System.Collections.Generic;
using System.Text;
using YourNamespace;
namespace Store.Shops.Repositories
{
public interface IShopRepository : IBaseRepository<ShopEntity>
{
/// <summary>
/// 获取用户商铺过期时间
/// </summary>
/// <param name="ShopId"></param>
/// <returns></returns>
DateTime GetExpireTime(string ShopId);
}
internal class ShopRepository : BaseRepository<ShopEntity>, IShopRepository, ITransientDependency
{
private readonly IFreeSql _freeSql;
public ShopRepository(IFreeSql freeSql) : base(freeSql)
{
_freeSql = freeSql;
}
/// <summary>
/// 获取用户商铺过期时间
/// </summary>
/// <param name="ShopId"></param>
public DateTime GetExpireTime(string ShopId)
{
ShopExpireEntity currentExpire = _freeSql.Select<ShopExpireEntity>()
.Where(a => a.ShopId == ShopId)
.ForUpdate()
.First();
if (currentExpire == null)
{
return DateTime.MinValue;
}
return DateHelper.ConvertFromUnixTimestampInSeconds(currentExpire.ExpireTime);
}
}
}