Commit 2dcb0a80 authored by 黄奎's avatar 黄奎

页面修改

parent 09a1672d
......@@ -76,6 +76,11 @@ namespace Edu.WebApi.Controllers.Web
/// </summary>
private readonly StudyAbroadModule studyAbroadModule = AOP.AOPHelper.CreateAOPObject<StudyAbroadModule>();
/// <summary>
/// 咨询管理处理类对象
/// </summary>
private readonly WebAdvisoryModule advisoryModule = new WebAdvisoryModule();
/// <summary>
/// 获取网站配置
/// </summary>
......@@ -445,5 +450,36 @@ namespace Edu.WebApi.Controllers.Web
qitem.ImgCover,
}));
}
/// <summary>
/// 新增咨询
/// </summary>
/// <returns></returns>
[HttpPost]
[AllowAnonymous]
public ApiResult AddWebAdvisory()
{
var extModel = new RB_Web_Advisory_ViewModel()
{
AdvType = base.ParmJObj.GetInt("AdvType"),
SourceId = base.ParmJObj.GetInt("SourceId"),
LinkMan = base.ParmJObj.GetStringValue("LinkMan"),
LinkTel = base.ParmJObj.GetStringValue("LinkTel"),
Remark = base.ParmJObj.GetStringValue("Remark"),
};
extModel.Group_Id = base.ParmJObj.GetInt("Group_Id");
if (extModel.Group_Id <= 0)
{
string Domain = base.ParmJObj.GetStringValue("Domain");
int groupId = groupModule.GetGroupIdByDomainModule(Domain);
extModel.Group_Id = groupId;
}
extModel.School_Id = 0;
extModel.CreateDate = DateTime.Now;
extModel.Status = DateStateEnum.Normal;
extModel.DealStatus = 0;
bool flag = advisoryModule.SetWebAdvisoryModule(extModel);
return flag ? ApiResult.Success(data: extModel) : ApiResult.Failed();
}
}
}
\ No newline at end of file
......@@ -527,7 +527,50 @@ namespace Edu.WebApi.Controllers.Web
return ApiResult.Success(data: pageModel);
}
/// <summary>
/// 根据编号获取咨询详情
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetWebAdvisory()
{
var Id = base.ParmJObj.GetInt("Id", 0);
var extModel = advisoryModule.GetWebAdvisoryModule(Id);
return ApiResult.Success(data: extModel);
}
/// <summary>
/// 修改咨询
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult UpdateWebAdvisory()
{
var extModel = new RB_Web_Advisory_ViewModel()
{
Id = base.ParmJObj.GetInt("Id"),
DealContent = base.ParmJObj.GetStringValue("DealContent"),
DealStatus = base.ParmJObj.GetInt("DealStatus"),
};
extModel.School_Id = base.UserInfo.School_Id;
extModel.DealBy = base.UserInfo.Id;
extModel.DealTime = DateTime.Now;
bool flag = advisoryModule.UpdateWebAdvisoryModule(extModel);
return flag ? ApiResult.Success(data: extModel) : ApiResult.Failed();
}
/// <summary>
/// 修改咨询状态
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult RemoveWebAdvisoryStatus()
{
var Id = base.ParmJObj.GetInt("Id", 0);
var Status = base.ParmJObj.GetInt("Status", 0);
var flag = advisoryModule.RemoveWebAdvisoryStatusModule(Id, Status);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
#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