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

页面修改

parent 8d52ca41
......@@ -32,6 +32,11 @@ namespace Mall.Model.Extend.TradePavilion
/// </summary>
public List<RB_Commerce_Details_Extend> CommerceDetailsList { get; set; }
/// <summary>
/// 报名列表
/// </summary>
public List<RB_Commerce_Consult_Extend> CommerceConsultList { get; set; }
/// <summary>
/// 活动状态
/// </summary>
......
......@@ -42,13 +42,21 @@ namespace Mall.Module.TradePavilion
/// <param name="query"></param>
/// <param name="isQuerySignup">是否查询报名名单</param>
/// <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);
if (list != null && isQuerySignup)
{
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;
}
......
......@@ -17,14 +17,10 @@ namespace Mall.Repository.TradePavilion
/// <summary>
/// 获取商会活动报名分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <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();
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
......@@ -65,7 +61,7 @@ WHERE 1=1
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
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>
/// 根据编号获取商会活动报名实体
......
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