Commit d249fe2d authored by 黄奎's avatar 黄奎

新增字段

parent 11f5ac8c
...@@ -82,5 +82,15 @@ namespace Mall.Model.Entity.TradePavilion ...@@ -82,5 +82,15 @@ namespace Mall.Model.Entity.TradePavilion
/// 删除状态 /// 删除状态
/// </summary> /// </summary>
public DateStateEnum Status { get; set; } public DateStateEnum Status { get; set; }
/// <summary>
/// 报名开始时间
/// </summary>
public DateTime? SignStartTime { get; set; }
/// <summary>
/// 报名截止时间
/// </summary>
public DateTime? SignEndTime { get; set; }
} }
} }
...@@ -58,6 +58,36 @@ namespace Mall.Model.Extend.TradePavilion ...@@ -58,6 +58,36 @@ namespace Mall.Model.Extend.TradePavilion
} }
} }
/// <summary>
/// 是否可报名
/// </summary>
public int IsSignUp
{
get
{
int isSign = 0;
if (this.SignStartTime != null && this.SignEndTime != null)
{
DateTime currentDay = Convert.ToDateTime(Common.ConvertHelper.FormatDate(DateTime.Now));
if (currentDay >= this.SignStartTime && currentDay <= this.SignEndTime)
{
isSign = 1;//可报名
}
}
return isSign;
}
}
/// <summary>
/// 报名开始时间
/// </summary>
public string SignStartTimeStr { get { return Common.ConvertHelper.FormatTime(this.SignStartTime); } }
/// <summary>
/// 报名截止时间
/// </summary>
public string SignEndTimeStr { get { return Common.ConvertHelper.FormatTime(this.SignEndTime); } }
/// <summary> /// <summary>
/// 活动状态字符串 /// 活动状态字符串
/// </summary> /// </summary>
......
...@@ -96,6 +96,8 @@ namespace Mall.Module.TradePavilion ...@@ -96,6 +96,8 @@ namespace Mall.Module.TradePavilion
{nameof(RB_Commerce_Activity_Extend.ActivityInfo),model.ActivityInfo }, {nameof(RB_Commerce_Activity_Extend.ActivityInfo),model.ActivityInfo },
{nameof(RB_Commerce_Activity_Extend.UpdateBy),model.UpdateBy }, {nameof(RB_Commerce_Activity_Extend.UpdateBy),model.UpdateBy },
{nameof(RB_Commerce_Activity_Extend.UpdateDate),model.UpdateDate }, {nameof(RB_Commerce_Activity_Extend.UpdateDate),model.UpdateDate },
{nameof(RB_Commerce_Activity_Extend.SignStartTime),model.SignStartTime },
{nameof(RB_Commerce_Activity_Extend.SignEndTime),model.SignEndTime },
}; };
flag = commerce_ActivityRepository.Update(fileds, new WhereHelper(nameof(RB_Commerce_Activity_Extend.Id), model.Id)); flag = commerce_ActivityRepository.Update(fileds, new WhereHelper(nameof(RB_Commerce_Activity_Extend.Id), model.Id));
} }
......
...@@ -336,6 +336,8 @@ namespace Mall.WebApi.Controllers.TradePavilion ...@@ -336,6 +336,8 @@ namespace Mall.WebApi.Controllers.TradePavilion
CoverImg = jObj.GetStringValue("CoverImg"), CoverImg = jObj.GetStringValue("CoverImg"),
ActivityType = jObj.GetInt("ActivityType"), ActivityType = jObj.GetInt("ActivityType"),
ActivityInfo = jObj.GetStringValue("ActivityInfo"), ActivityInfo = jObj.GetStringValue("ActivityInfo"),
SignStartTime=jObj.GetDateTime("SignStartTime"),
SignEndTime = jObj.GetDateTime("SignEndTime"),
}; };
try try
{ {
......
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