Commit 2190128a authored by 黄奎's avatar 黄奎
parents 0c48ee60 4a3849af
......@@ -95,7 +95,7 @@ namespace Mall.Repository.Reserve
{
builder.Append($" AND ( FIND_IN_SET('{query.StoreId}', {nameof(RB_Reserve_Coupon_Extend.StoreIds)}) or FIND_IN_SET('0', {nameof(RB_Reserve_Coupon_Extend.StoreIds)} )) ");
}
else
else if (query.StoreId != -1)
{
builder.Append($" AND FIND_IN_SET('0', {nameof(RB_Reserve_Coupon_Extend.StoreIds)})");
}
......@@ -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();
......
......@@ -459,6 +459,7 @@ namespace Mall.WebApi.Controllers.Reserve
var query = JsonConvert.DeserializeObject<RB_Reserve_Coupon_Extend>(RequestParm.msg.ToString());
query.TenantId = UserInfo.TenantId;
query.MallBaseId = parms.MallBaseId;
query.StoreId = -1;
var oldLogisticsModel = reserveModule.GetDiscountCouponList(query).FirstOrDefault();
if (oldLogisticsModel == null)
{
......
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