Commit 1f89857e authored by 吴春's avatar 吴春

提交代码

parent 7deae418
......@@ -261,10 +261,10 @@ SELECT a.ID as MemberCouponId,a.UserId,a.HeXiao,a.UseHeXiao,b.`Name`,b.UseType,b
where += $" AND FIND_IN_SET('0', a.{nameof(RB_Reserve_Coupon_Extend.StoreIds)})";
}
}
string sql = @$" SELECT t.*,c.MemberNum from (SELECT a.ID,a.`Name`,a.`Describe`,a.UseType,a.StartDate,a.EndDate,a.CouponIco,a.IndateDay,a.IndateType,a.TotalNum from {TableName} as a
string sql = @$" SELECT t.*,c.MemberNum from (SELECT a.ID,a.`Name`,a.`Describe`,a.UseType,a.StartDate,a.EndDate,a.CouponIco,a.IndateDay,a.IndateType,a.TotalNum,a.HeXiao from {TableName} as a
{where} and a.IndateType=1
UNION ALL
SELECT a.ID,a.`Name`,a.`Describe`,a.UseType,a.StartDate,a.EndDate,a.CouponIco,a.IndateDay,a.IndateType,a.TotalNum from {TableName} as a
SELECT a.ID,a.`Name`,a.`Describe`,a.UseType,a.StartDate,a.EndDate,a.CouponIco,a.IndateDay,a.IndateType,a.TotalNum,a.HeXiao from {TableName} as a
{where} and a.IndateType=2 and a.EndDate>NOW() )
as t LEFT JOIN (SELECT CouponId,COUNT(*) as MemberNum from RB_Reserve_MemberCoupon where `Status`=0 {userWhere} GROUP BY CouponId) as c on t.ID=c.CouponId ";
return GetPage<RB_Reserve_Coupon_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