增加项目,分层

This commit is contained in:
chfei committed 2026-09-11 19:11:12 +08:00
1 parent 6e995a5bdb
commit 0a3e5af6a9
234 files changed
+26994 -1

No files matched your search

@@ -0,0 +1,51 @@
using MAX.Core.Commons;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Store.Product.Models.Product
{
/// <summary>
/// 商品属性
/// </summary>
public partial class ProductPropertys : List<CommonKeyValue>
{
/// <summary>
/// 是否存在Key
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public bool ContainsKey(string key)
{
return Exists(a => a.Key == key);
}
/// <summary>
/// 添加数据
/// </summary>
/// <param name="Key"></param>
/// <param name="Value"></param>
public void Add(string Key, string Value)
{
if (!ContainsKey(Key))
{
Add(new CommonKeyValue() { Key = Key, Value = Value });
}
}
/// <summary>
/// 获取值
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public string GetValue(string key)
{
if (ContainsKey(key))
{
CommonKeyValue p = this.FirstOrDefault(a => a.Key == key);
return p.Value;
}
return "";
}
}
}