【优化】优化【全局促销】【团购秒杀】【优惠券】添加优惠结果的提醒文字。

This commit is contained in:
大灰灰
2022-12-07 01:56:17 +08:00
parent 090b503f8d
commit 62ee680e20
2 changed files with 17 additions and 2 deletions

View File

@@ -415,6 +415,9 @@ namespace CoreCms.Net.Configuration
public const string Code15026 = "该优惠券已被其他人领取"; public const string Code15026 = "该优惠券已被其他人领取";
public const string Code15027 = "绑定失败"; public const string Code15027 = "绑定失败";
public const string Code15028 = "优惠券超过最大领取数量"; public const string Code15028 = "优惠券超过最大领取数量";
public const string Code15029 = "全局促销只能有一种促销结果";
public const string Code15030 = "优化全只能有一种促销结果";
//拼团 //拼团
public const string Code15600 = "活动已结束"; public const string Code15600 = "活动已结束";

View File

@@ -849,8 +849,20 @@ namespace CoreCms.Net.Web.Admin.Controllers
var resultCount = await _coreCmsPromotionResultServices.GetCountAsync(p => p.promotionId == entity.id); var resultCount = await _coreCmsPromotionResultServices.GetCountAsync(p => p.promotionId == entity.id);
if (resultCount >= 1) if (resultCount >= 1)
{ {
jm.msg = GlobalErrorCodeVars.Code15016; if (model.type == (int)GlobalEnumVars.PromotionType.Promotion)
return jm; {
jm.msg = GlobalErrorCodeVars.Code15029;
return jm;
}
else if (model.type == (int)GlobalEnumVars.PromotionType.Group || model.type == (int)GlobalEnumVars.PromotionType.Seckill)
{
jm.msg = GlobalErrorCodeVars.Code15016;
return jm;
} else if (model.type == (int)GlobalEnumVars.PromotionType.Coupon)
{
jm.msg = GlobalErrorCodeVars.Code15030;
return jm;
}
} }
//返回数据 //返回数据