@@ -232,6 +232,15 @@ SELECT a.ID as MemberCouponId,a.UserId,a.HeXiao,a.UseHeXiao,b.`Name`,b.UseType,b
{
where+=$" AND a.{nameof(RB_Reserve_Coupon_Extend.SmallShopId)}=0";
}
if(query.StoreId>0)
{
where+=$" AND ( a.{nameof(RB_Reserve_Coupon_Extend.StoreId)}={query.StoreId} or a.{nameof(RB_Reserve_Coupon_Extend.StoreId)}=0 ))";
}
else
{
where+=$" AND a.{nameof(RB_Reserve_Coupon_Extend.StoreId)}=0";
}
}
stringsql=@$" 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
{where}anda.IndateType=1
...
...
@@ -334,6 +343,15 @@ on a.CouponId=b.ID {where} ";
{
builder.Append($" AND a.{nameof(RB_Reserve_Coupon_Extend.SmallShopId)}=0");
}
if(query.StoreId>0)
{
builder.Append($" AND ( a.{nameof(RB_Reserve_Coupon_Extend.StoreId)}={query.StoreId} or (a.{nameof(RB_Reserve_Coupon_Extend.StoreId)}=0 ))");
}
else
{
builder.Append($" AND a.{nameof(RB_Reserve_Coupon_Extend.SmallShopId)}=0");
}
}
stringsql=@$"SELECT a.*,b.TriggerType,b.GrantNum from rb_Reserve_couponselfmotion as b LEFT JOIN {TableName} as a on a.ID=b.DiscountCouponId