Commit f8ff82d9 authored by 黄奎's avatar 黄奎

新增页面

parent 3e69ee86
......@@ -13,6 +13,41 @@ namespace Mall.Model.Entity.User
[DB(ConnectionName = "DefaultConnection")]
public class RB_Mall_Magic_Extend : Model.Entity.User.RB_Mall_Magic
{
/// <summary>
/// 魔方数据列表
/// </summary>
public List<MagicItem> MagicDataList { get; set; }
/// <summary>
/// 创建时间字符串
/// </summary>
public string CreateDateStr
{
get
{
string str = "";
if (this.CreateDate != null)
{
str = Convert.ToDateTime(this.CreateDate).ToString("yyyy-MM-dd HH:mm:ss");
}
return str;
}
}
}
/// <summary>
/// 魔方数据项
/// </summary>
public class MagicItem
{
/// <summary>
/// 魔方链接
/// </summary>
public string Link { get; set; }
/// <summary>
/// 魔方图片
/// </summary>
public string ImgUrl { get; set; }
}
}
\ No newline at end of file
......@@ -204,6 +204,10 @@ namespace Mall.Module.User
{
extModel = new RB_Mall_Magic_Extend();
}
if (extModel.MagicData != null && !string.IsNullOrEmpty(extModel.MagicData))
{
extModel.MagicDataList = Common.Plugin.JsonHelper.DeserializeObject<List<MagicItem>>(extModel.MagicData);
}
return extModel;
}
......
......@@ -1043,6 +1043,10 @@ namespace Mall.WebApi.Controllers.User
extModel.MallBaseId = RequestParm.MallBaseId;
extModel.TenantId = RequestParm.TenantId;
extModel.CreateDate = DateTime.Now;
if (extModel.MagicDataList != null && extModel.MagicDataList.Count > 0)
{
extModel.MagicData = Common.Plugin.JsonHelper.Serialize(extModel.MagicDataList);
}
var flag = programModule.SetMallMagicModule(extModel);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment