Commit b26fe25d authored by 吴春's avatar 吴春

提交代码

parent 17445e3d
......@@ -13,6 +13,7 @@ using Mall.Model.Extend.User;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using Mall.Common.Plugin;
using Google.Protobuf.WellKnownTypes;
namespace Mall.WebApi.Controllers.Education
{
......@@ -448,6 +449,42 @@ namespace Mall.WebApi.Controllers.Education
return ApiResult.Success("", new { teacherResult, goodsResult });
}
/// <summary>
/// 小程序分页列表(赞羊)
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetTeacherGoodsList(object requestMsg)
{
var parms = JsonConvert.DeserializeObject<RequestParm>(requestMsg.ToString());
if (parms.MallBaseId <= 0)
{
return ApiResult.ParamIsNull();
}
ResultPageModel pagelist = JsonConvert.DeserializeObject<ResultPageModel>(parms.msg.ToString());
RB_Goods_Extend demodel = JsonConvert.DeserializeObject<RB_Goods_Extend>(parms.msg.ToString());
demodel.TenantId = parms.TenantId;
demodel.MallBaseId = parms.MallBaseId;
if (demodel.TeacherId <= 0)
{
return ApiResult.Failed("老师编号不能为0");
}
var list = educationModule.GetListByTeacherId(pagelist.pageIndex, pagelist.pageSize, out long count, demodel);
pagelist.count = Convert.ToInt32(count);
pagelist.pageData = list.Select(x => new
{
x.CoverImage,
x.Name,
x.CourseNum,
x.Id
});
return ApiResult.Success("", pagelist);
}
#endregion
}
}
\ 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