Commit 0c4ae316 authored by 黄奎's avatar 黄奎

页面修改

parent 8d52ca41
...@@ -32,6 +32,11 @@ namespace Mall.Model.Extend.TradePavilion ...@@ -32,6 +32,11 @@ namespace Mall.Model.Extend.TradePavilion
/// </summary> /// </summary>
public List<RB_Commerce_Details_Extend> CommerceDetailsList { get; set; } public List<RB_Commerce_Details_Extend> CommerceDetailsList { get; set; }
/// <summary>
/// 报名列表
/// </summary>
public List<RB_Commerce_Consult_Extend> CommerceConsultList { get; set; }
/// <summary> /// <summary>
/// 活动状态 /// 活动状态
/// </summary> /// </summary>
......
...@@ -42,13 +42,21 @@ namespace Mall.Module.TradePavilion ...@@ -42,13 +42,21 @@ namespace Mall.Module.TradePavilion
/// <param name="query"></param> /// <param name="query"></param>
/// <param name="isQuerySignup">是否查询报名名单</param> /// <param name="isQuerySignup">是否查询报名名单</param>
/// <returns></returns> /// <returns></returns>
public List<RB_Commerce_Activity_Extend> GetCommerceActivityPageListModule(int pageIndex, int pageSize, out long rowsCount, RB_Commerce_Activity_Extend query,bool isQuerySignup) public List<RB_Commerce_Activity_Extend> GetCommerceActivityPageListModule(int pageIndex, int pageSize, out long rowsCount, RB_Commerce_Activity_Extend query,bool isQuerySignup=false)
{ {
var list= commerce_ActivityRepository.GetCommerceActivityPageListRepository(pageIndex, pageSize, out rowsCount, query); var list= commerce_ActivityRepository.GetCommerceActivityPageListRepository(pageIndex, pageSize, out rowsCount, query);
if (list != null && isQuerySignup) if (list != null && isQuerySignup)
{ {
string ids = string.Join(",", list.Select(qitem => qitem.Id)); string ids = string.Join(",", list.Select(qitem => qitem.Id));
var joinList= List<RB_Commerce_Consult_Extend> joinList = new List<RB_Commerce_Consult_Extend>();
if (!string.IsNullOrEmpty(ids))
{
joinList = commerce_ConsultRepository.GetCommerceConsultListRepository(new RB_Commerce_Consult_Extend() { QActivityIds = ids });
}
foreach (var item in list)
{
item.CommerceConsultList = joinList?.Where(qitem => qitem.ActivityId == item.Id)?.ToList() ?? new List<RB_Commerce_Consult_Extend>();
}
} }
return list; return list;
} }
......
...@@ -17,14 +17,10 @@ namespace Mall.Repository.TradePavilion ...@@ -17,14 +17,10 @@ namespace Mall.Repository.TradePavilion
/// <summary> /// <summary>
/// 获取商会活动报名分页列表 /// 获取商会活动报名分页列表
/// </summary> /// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param> /// <param name="query"></param>
/// <returns></returns> /// <returns></returns>
public List<RB_Commerce_Consult_Extend> GetCommerceConsultPageListRepository(int pageIndex, int pageSize, out long rowsCount, RB_Commerce_Consult_Extend query) public List<RB_Commerce_Consult_Extend> GetCommerceConsultListRepository(RB_Commerce_Consult_Extend query)
{ {
rowsCount = 0;
DynamicParameters parameters = new DynamicParameters(); DynamicParameters parameters = new DynamicParameters();
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
builder.AppendFormat(@" builder.AppendFormat(@"
...@@ -65,7 +61,7 @@ WHERE 1=1 ...@@ -65,7 +61,7 @@ WHERE 1=1
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Commerce_Consult_Extend.UserId), query.UserId); builder.AppendFormat(" AND {0}={1} ", nameof(RB_Commerce_Consult_Extend.UserId), query.UserId);
} }
} }
return GetPage<RB_Commerce_Consult_Extend>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList(); return Get<RB_Commerce_Consult_Extend>(builder.ToString(), parameters).ToList();
} }
} }
......
...@@ -513,30 +513,7 @@ namespace Mall.WebApi.Controllers.TradePavilion ...@@ -513,30 +513,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
return ApiResult.Success(data: pageModel); return ApiResult.Success(data: pageModel);
} }
/// <summary>
/// 新增修改商会活动报名
/// </summary>
/// <returns></returns>
public ApiResult SetCommerceConsult()
{
JObject jObj = JObject.Parse(RequestParm.msg.ToString());
var extModel = new RB_Commerce_Consult_Extend()
{
Id = jObj.GetInt("Id"),
ActivityId=jObj.GetInt ("ActivityId"),
UserId=jObj.GetInt("UserId"),
LinkMan=jObj.GetStringValue("LinkMan"),
LinkTel=jObj.GetStringValue("LinkTel"),
};
extModel.Status = Common.Enum.DateStateEnum.Normal;
extModel.MallBaseId = RequestParm.MallBaseId;
extModel.TenantId = RequestParm.TenantId;
Int32.TryParse(RequestParm.uid, out int Uid);
extModel.UserId = Uid;
extModel.CreateTime = DateTime.Now;
var flag = consultModule.SetCommerceConsultModule(extModel);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
/// <summary> /// <summary>
/// 根据编号获取商会活动报名实体 /// 根据编号获取商会活动报名实体
......
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