Commit 771309cd authored by 黄奎's avatar 黄奎

查询修改

parent 42d0731b
......@@ -28,7 +28,7 @@ namespace Mall.Repository.TradePavilion
DynamicParameters parameters = new DynamicParameters();
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*,
SELECT A.*
FROM RB_Commerce_Ask AS A
WHERE 1=1
");
......@@ -52,7 +52,12 @@ WHERE 1=1
builder.AppendFormat(" AND A.{0} LIKE @Name ", nameof(RB_Commerce_Ask_Extend.FatTitle));
parameters.Add("Name", "%" + query.FatTitle.Trim() + "%");
}
if (query.CreateBy > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Commerce_Ask_Extend.CreateBy), query.CreateBy);
}
}
builder.AppendFormat(" ORDER BY A.{0} DESC ", nameof(RB_Commerce_Ask_Extend.Id));
return GetPage<RB_Commerce_Ask_Extend>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList();
}
}
......
......@@ -332,5 +332,28 @@ namespace Mall.WebApi.Controllers.TradePavilion
var flag = askModule.SetCommerceAskModule(extModel);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
/// <summary>
/// 获取投资采购分页列表
/// </summary>
/// <returns></returns>
public ApiResult GetCommerceAskPage()
{
ResultPageModel pageModel = JsonConvert.DeserializeObject<ResultPageModel>(RequestParm.msg.ToString());
JObject parms = JObject.Parse(RequestParm.msg.ToString());
var query = new RB_Commerce_Ask_Extend()
{
CompanyName = parms.GetStringValue("CompanyName"),
};
var userInfo = AppletUserInfo;
query.MallBaseId = RequestParm.MallBaseId;
query.TenantId = userInfo?.TenantId ?? 0;
query.CreateBy = userInfo.UserId;
var list = askModule.GetCommerceAskPageListModule(pageModel.pageIndex, pageModel.pageSize, out long rowsCount, query);
pageModel.count = Convert.ToInt32(rowsCount);
pageModel.pageData = list;
return ApiResult.Success(data: pageModel);
}
}
}
......@@ -51,6 +51,12 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
private readonly CommerceNewsModule commerceNewsModule = new CommerceNewsModule();
/// <summary>
/// Fat资料处理类对象
/// </summary>
private readonly CommerceAskModule askModule = new CommerceAskModule();
#region 联系人管理
/// <summary>
......@@ -568,5 +574,39 @@ namespace Mall.WebApi.Controllers.TradePavilion
return flag ? ApiResult.Success() : ApiResult.Failed();
}
#endregion
#region 咨询管理
/// <summary>
/// 获取投资采购分页列表
/// </summary>
/// <returns></returns>
public ApiResult GetCommerceAskPage()
{
ResultPageModel pageModel = JsonConvert.DeserializeObject<ResultPageModel>(RequestParm.msg.ToString());
JObject parms = JObject.Parse(RequestParm.msg.ToString());
var query = new RB_Commerce_Ask_Extend()
{
CompanyName = parms.GetStringValue("CompanyName"),
};
query.MallBaseId = RequestParm.MallBaseId;
query.TenantId = RequestParm.TenantId;
var list = askModule.GetCommerceAskPageListModule(pageModel.pageIndex, pageModel.pageSize, out long rowsCount, query);
pageModel.count = Convert.ToInt32(rowsCount);
pageModel.pageData = list;
return ApiResult.Success(data: pageModel);
}
/// <summary>
/// 获取新闻信息详情
/// </summary>
/// <returns></returns>
public ApiResult GetCommerceAskInfo()
{
JObject parms = JObject.Parse(RequestParm.msg.ToString());
var Id = parms.GetInt("Id", 0);
var extModel = askModule.GetCommerceAskModule(Id);
return ApiResult.Success(data: extModel);
}
#endregion
}
}
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