public ActionResult IsAdd(long productId) { bool result = _iLimitTimeBuyService.IsAdd(productId); if (result) { //拼团活动 result = _iFightGroupService.ProductCanJoinActive(productId); } if (result) { //组合购 //var colloInfo = CollocationApplication.GetCollocationListByProductId(productId).Where(a => a.IsMain).ToList(); var colloInfo = CollocationApplication.GetCollocationListByProductId(productId); if (colloInfo == null) { result = true; } else { colloInfo = colloInfo.Where(a => a.IsMain).ToList(); result = colloInfo.Count == 0; } } return(Json(result)); }
public ActionResult IsAdd(long productId) { bool result = _iLimitTimeBuyService.IsAdd(productId); if (result) { //拼团活动 result = _iFightGroupService.ProductCanJoinActive(productId); } return(Json(result)); }
public JsonResult CanAdd(long productId) { Result result = new Result { success = false, msg = "该商品正在参加拼团活动,无法同时参加拼团活动" }; if (FightGroupApplication.ProductCanJoinActive(productId)) { if (_iLimitTimeBuyService.IsAdd(productId)) { result.success = true; result.msg = ""; } else { result = new Result { success = false, msg = "该商品正在参加限时购活动,无法同时参加拼团活动" }; } } return(Json(result)); }