Commit 3ed4261b authored by 吴春's avatar 吴春

提交代码

parent 29c176b5
This diff is collapsed.
......@@ -173,16 +173,16 @@ namespace Mall.Repository.MarketingCenter
string sql = @$" SELECT a.ID as MemberCouponId,a.UserId,b.`Name`,b.CouponType,b.UseType,b.MinConsumePrice,b.DiscountsPrice,b.MaxDiscountsPrice,b.`Describe`,a.StartDate,a.EndDate,b.ID from rb_member_discountcoupon as a
LEFT JOIN rb_discountcoupon as b on a.CouponId=b.ID
LEFT JOIN rb_discountcoupon_product as c on c.DiscountCouponId=b.ID
where a.UseType=1 and c.`Status`=0 {where} {goodsClassWhere}
where b.UseType=1 and c.`Status`=0 {where} {goodsClassWhere}
UNION ALL
SELECT a.ID as MemberCouponId,a.UserId,b.`Name`,b.CouponType,b.UseType,b.MinConsumePrice,b.DiscountsPrice,b.MaxDiscountsPrice,b.`Describe`,a.StartDate,a.EndDate,b.ID from rb_member_discountcoupon as a
LEFT JOIN rb_discountcoupon as b on a.CouponId=b.ID
LEFT JOIN rb_discountcoupon_product as c on c.DiscountCouponId=b.ID
where a.UseType=2 and c.`Status`=0 {where} {goodsWhere}
where b.UseType=2 and c.`Status`=0 {where} {goodsWhere}
UNION all
SELECT a.ID as MemberCouponId,a.UserId,b.`Name`,b.CouponType,b.UseType,b.MinConsumePrice,b.DiscountsPrice,b.MaxDiscountsPrice,b.`Describe`,a.StartDate,a.EndDate,b.ID from rb_member_discountcoupon as a
LEFT JOIN rb_discountcoupon as b on a.CouponId=b.ID
where a.UseType=3 {where} {allWhere}";
where b.UseType=3 {where} {allWhere}";
return Get<RB_DiscountCoupon_Extend>(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