Commit e491f2da authored by 黄奎's avatar 黄奎

页面修改

parent 41d653dc
......@@ -37,7 +37,7 @@ namespace Edu.Model.Entity.Web
public int Type { get; set; }
/// <summary>
/// 性别
/// 性别(0-男,1-女)
/// </summary>
public int Sex { get; set; }
......
......@@ -10,6 +10,37 @@ namespace Edu.Model.ViewModel.Web
/// </summary>
public class RB_Web_Teacher_ViewModel : RB_Web_Teacher
{
/// <summary>
/// 性别字符串
/// </summary>
public string SexStr
{
get
{
string str = "男";
if (this.Sex == 1)
{
str = "女";
}
return str;
}
}
/// <summary>
/// 类型字符串
/// </summary>
public string TypeStr
{
get
{
string str = "";
switch (this.Type)
{
case 1: str = "日语培训老师"; break;
case 2: str = "留学服务老师"; break;
}
return str;
}
}
}
}
using Edu.Model.ViewModel.Web;
using Edu.Repository.Web;
using System;
using System.Collections.Generic;
using System.Text;
using VT.FW.DB;
namespace Edu.Module.Web
......
......@@ -64,6 +64,11 @@ namespace Edu.WebApi.Controllers.Web
/// </summary>
private readonly OrderModule orderModule = AOP.AOPHelper.CreateAOPObject<OrderModule>();
/// <summary>
/// 教师团队管理处理类对象
/// </summary>
private readonly WebTeacherModule teacherModule = new WebTeacherModule();
/// <summary>
/// 获取网站配置
/// </summary>
......@@ -342,7 +347,7 @@ namespace Edu.WebApi.Controllers.Web
Q_CanApply = base.ParmJObj.GetInt("Q_CanApply"),
Teacher_Id = base.ParmJObj.GetInt("Teacher_Id"),
Group_Id = base.ParmJObj.GetInt("Group_Id"),
CateId=base.ParmJObj.GetInt("CateId"),
CateId = base.ParmJObj.GetInt("CateId"),
};
if (dmodel.Group_Id <= 0)
{
......@@ -370,5 +375,36 @@ namespace Edu.WebApi.Controllers.Web
}
#endregion
/// <summary>
/// 获取教师团队列表
/// </summary>
/// <returns></returns>
[HttpPost]
[AllowAnonymous]
public ApiResult GetWebTeacherList()
{
var query = new RB_Web_Teacher_ViewModel()
{
Name = base.ParmJObj.GetStringValue("Name"),
Type = base.ParmJObj.GetInt("Type"),
Group_Id = base.ParmJObj.GetInt("Group_Id"),
};
if (query.Group_Id <= 0)
{
string Domain = base.ParmJObj.GetStringValue("Domain");
int groupId = groupModule.GetGroupIdByDomainModule(Domain);
query.Group_Id = groupId;
}
var list = teacherModule.GetWebTeacherListModule(query);
return ApiResult.Success(data: list?.Select(qitem => new
{
qitem.Name,
qitem.Intro,
qitem.Icon,
qitem.Sex,
qitem.SexStr
}));
}
}
}
\ No newline at end of file
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