Commit 6a7ead0c authored by 黄奎's avatar 黄奎

查询修改

parent 1c292bd5
......@@ -86,5 +86,15 @@ namespace Mall.Model.Extend.TradePavilion
/// 报名人数
/// </summary>
public int JoinNum { get; set; }
/// <summary>
/// 创建人
/// </summary>
public string CreateByName { get; set; }
/// <summary>
/// 是否报名(0-未报名,1-已报名)
/// </summary>
public int IsJoinActivity { get; set; }
}
}
......@@ -13,6 +13,6 @@ namespace Mall.Model.Extend.TradePavilion
/// <summary>
/// 发布时间
/// </summary>
public string PublishTimeStr { get { return Common.ConvertHelper.FormatTime(this.PublishTime); } }
public string PublishTimeStr { get { return Common.ConvertHelper.FormatDate(this.PublishTime); } }
}
}
......@@ -111,6 +111,7 @@ WHERE 1=1
builder.AppendFormat(" AND D.{0}={1} ", nameof(RB_Commerce_Consult_Extend.UserId), query.CreateBy);
}
}
builder.AppendFormat(" ORDER BY A.{0} DESC ", nameof(RB_Commerce_Activity_Extend.Id));
return GetPage<RB_Commerce_Activity_Extend>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList();
}
}
......
......@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Mall.CacheManager.User;
using Mall.Common.API;
using Mall.Common.Plugin;
using Mall.Model.Extend.TradePavilion;
......@@ -205,6 +206,20 @@ namespace Mall.WebApi.Controllers.TradePavilion
JObject parms = JObject.Parse(RequestParm.msg.ToString());
var Id = parms.GetInt("Id", 0);
var extModel = activityModule.GetCommerceActivityModule(Id);
var userInfo = AppletUserInfo;
if (extModel != null && extModel.CreateBy>0)
{
extModel.CreateByName = UserReidsCache.GetUserLoginInfo(extModel.CreateBy)?.Name ?? "";
var list=consultModule.GetCommerceConsultListModule(new RB_Commerce_Consult_Extend() { ActivityId = Id, UserId = userInfo.UserId });
if (list != null && list.Count > 0)
{
extModel.IsJoinActivity = 1;
}
else
{
extModel.IsJoinActivity = 0;
}
}
return ApiResult.Success(data: extModel);
}
......
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