sb.Append($@"SELECT a.*,b.`Name`,b.Photo from RB_MiAi_BaseInfo as a
sb.Append($@"SELECT a.*,b.`Name`,b.Photo ,(YEAR (curdate())- YEAR ( a.Birthday )- 1+ (DATE_FORMAT( a.Birthday, '%m%d' )<=(DATE_FORMAT( curdate(), '%m%d' )))) Age from RB_MiAi_BaseInfo as a
LEFT JOIN rb_member_user as b on a.UserId=b.Id where a.Status=0 and b.Blacklist!=1 ");
if(where!=null)
{
...
...
@@ -122,9 +122,12 @@ LEFT JOIN rb_member_user as b on a.UserId=b.Id where a.Status=0 and b.Blacklis
}
if(where.UserId>0)
{
sb.AppendFormat(" and a.UserId={0}",where.UserId);
sb.AppendFormat(" and a.UserId !={0}",where.UserId);
}
if(where.Sex>0)
{
sb.AppendFormat(" and a.Sex !={0}",where.Sex);
}
if(!string.IsNullOrWhiteSpace(where.UserIds))
{
sb.AppendFormat(" and a.UserId in({0})",where.UserIds);
...
...
@@ -139,7 +142,7 @@ LEFT JOIN rb_member_user as b on a.UserId=b.Id where a.Status=0 and b.Blacklis
sb.AppendFormat($@" ORDER BY (((a.FollowNum* {where.FollowRate})+(a.BrowseNum*{where.BrowseRate}))) desc");
}
elseif(where.Sort==3)
elseif(where.Sort==3)
{
sb.AppendFormat(" ORDER BY b.CreateDate desc ");
}
...
...
@@ -149,6 +152,12 @@ LEFT JOIN rb_member_user as b on a.UserId=b.Id where a.Status=0 and b.Blacklis
/// <summary>
/// 分页列表
/// </summary>
...
...
@@ -160,7 +169,7 @@ LEFT JOIN rb_member_user as b on a.UserId=b.Id where a.Status=0 and b.Blacklis
sb.Append($@"SELECT a.*,b.`Name`,b.Photo from RB_MiAi_BaseInfo as a
sb.Append($@"SELECT a.*,b.`Name`,b.Photo ,(YEAR (curdate())- YEAR ( a.Birthday )- 1+ (DATE_FORMAT( a.Birthday, '%m%d' )<=(DATE_FORMAT( curdate(), '%m%d' )))) Age from RB_MiAi_BaseInfo as a
LEFT JOIN rb_member_user as b on a.UserId=b.Id where a.Status=0 and b.Blacklist!=1 ");
if(where!=null)
{
...
...
@@ -178,7 +187,11 @@ LEFT JOIN rb_member_user as b on a.UserId=b.Id where a.Status=0 and b.Blacklis
}
if(where.UserId>0)
{
sb.AppendFormat(" and a.UserId={0}",where.UserId);
sb.AppendFormat(" and a.UserId !={0}",where.UserId);
}
if(where.Sex>0)
{
sb.AppendFormat(" and a.Sex !={0}",where.Sex);
}
if(!string.IsNullOrWhiteSpace(where.UserIds))
...
...
@@ -200,7 +213,69 @@ LEFT JOIN rb_member_user as b on a.UserId=b.Id where a.Status=0 and b.Blacklis