builder.Append($" SELECT a.*,(SELECT COUNT(*) from rb_authentication where `Status`=0 and FIND_IN_SET(a.Id,SourceIds)) FROM rb_prize as a WHERE `Status`=0 ");
if(query!=null)
{
if(query.TenantId>0)
{
builder.Append($" AND a.{nameof(RB_Prize_Extend.TenantId)}={query.TenantId}");
}
if(query.MallBaseId>0)
{
builder.Append($" AND a.{nameof(RB_Prize_Extend.MallBaseId)}={query.MallBaseId}");