Commit d54a9c70 authored by 吴春's avatar 吴春

提交代码

parent 61ece750
......@@ -37,14 +37,12 @@ namespace Mall.Repository.Miai
}
if (!string.IsNullOrEmpty(dmodel.UserName))
{
where += $@" and (b1.RealName like '%{dmodel.UserName}%' or b2.RealName like '%{dmodel.UserName}%')";
where += $@" and (u1.`Name` like '%{dmodel.UserName}%' or u2..`Name` like '%{dmodel.UserName}%')";
}
string sql = $@"select d.*,b1.RealName as ManName,u1.Photo as ManPhoto,b2.RealName as WoManName,u2.Photo as WoManPhoto from RB_Miai_Dating d
string sql = $@"select d.*,u1.`Name` as ManName,u1.Photo as ManPhoto,u2.`Name` as WoManName,u2.Photo as WoManPhoto from RB_Miai_Dating d
left join rb_member_user u1 on d.ManId = u1.Id
left join rb_miai_baseinfo b1 on b1.UserId = d.ManId
left join rb_member_user u2 on d.WoManId = u2.Id
left join rb_miai_baseinfo b2 on b2.UserId = d.WoManId
where {where} order by d.Id desc";
return GetPage<RB_Miai_Dating_Extend>(pageIndex, pageSize, out rowCount, sql).ToList();
}
......
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