Commit 0dfbe62a authored by 吴春's avatar 吴春

提交代码

parent 29662391
...@@ -71,5 +71,10 @@ namespace Mall.Model.Entity.Education ...@@ -71,5 +71,10 @@ namespace Mall.Model.Entity.Education
/// 订单号 /// 订单号
/// </summary> /// </summary>
public int OrderId { get; set; } public int OrderId { get; set; }
/// <summary>
/// 使用数
/// </summary>
public int UseHeXiao { get; set; }
} }
} }
...@@ -20,6 +20,11 @@ namespace Mall.Module.Education ...@@ -20,6 +20,11 @@ namespace Mall.Module.Education
{ {
public class EducationModule public class EducationModule
{ {
/// <summary>
/// 素材管理
/// </summary>
private readonly RB_Material_InfoRepository material_InfoRepository = new RB_Material_InfoRepository();
/// <summary> /// <summary>
/// 教师仓储 /// 教师仓储
/// </summary> /// </summary>
...@@ -79,7 +84,7 @@ namespace Mall.Module.Education ...@@ -79,7 +84,7 @@ namespace Mall.Module.Education
/// <summary> /// <summary>
/// 分销商等级 /// 分销商等级
/// </summary> /// </summary>
private readonly RB_Distributor_GradeRepository distributor_GradeRepository = new RB_Distributor_GradeRepository(); private readonly RB_Distributor_GradeRepository distributor_GradeRepository = new RB_Distributor_GradeRepository();
/// <summary> /// <summary>
/// 会员等级 /// 会员等级
/// </summary> /// </summary>
...@@ -2199,6 +2204,12 @@ namespace Mall.Module.Education ...@@ -2199,6 +2204,12 @@ namespace Mall.Module.Education
var list = educationArticleCommentRepository.GetPageList(pageIndex, pageSize, out count, demodel); var list = educationArticleCommentRepository.GetPageList(pageIndex, pageSize, out count, demodel);
if (list.Any()) if (list.Any())
{ {
List<RB_Member_User_Extend> userList = new List<RB_Member_User_Extend>();
if (list.Where(x => x.UserId > 0).Any())
{
string uids = string.Join(",", list.Where(x => x.UserId > 0).Select(x => x.UserId ?? 0));
userList = member_UserRepository.GetList(new RB_Member_User_Extend() { UserIds = uids, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId });
}
foreach (var item in list) foreach (var item in list)
{ {
//评论图片 //评论图片
...@@ -2207,6 +2218,14 @@ namespace Mall.Module.Education ...@@ -2207,6 +2218,14 @@ namespace Mall.Module.Education
{ {
item.CommentImgList = JsonConvert.DeserializeObject<List<string>>(item.CommentImage); item.CommentImgList = JsonConvert.DeserializeObject<List<string>>(item.CommentImage);
} }
if (item.UserId > 0)
{
item.UserPhotoPath = userList.Where(x => x.Id == item.UserId).FirstOrDefault()?.Photo ?? "";
}
if (item.UserId == 0 && item.UserPhoto > 0)
{
item.UserPhotoPath = material_InfoRepository.GetEntity(item.UserPhoto)?.Path ?? "";
}
} }
} }
return list; return list;
......
...@@ -470,5 +470,9 @@ namespace Mall.WebApi.Controllers.Education ...@@ -470,5 +470,9 @@ namespace Mall.WebApi.Controllers.Education
if (flag) { return ApiResult.Success(); } else { return ApiResult.Failed(); } if (flag) { return ApiResult.Success(); } else { return ApiResult.Failed(); }
} }
#endregion #endregion
} }
} }
\ No newline at end of file
...@@ -308,6 +308,7 @@ namespace Mall.WebApi.Controllers.Education ...@@ -308,6 +308,7 @@ namespace Mall.WebApi.Controllers.Education
x.ID, x.ID,
x.UserId, x.UserId,
x.UserName, x.UserName,
x.UserPhotoPath,
x.ArticleId, x.ArticleId,
x.ArticleName, x.ArticleName,
x.CommentScore, x.CommentScore,
......
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