public JsonResult SendCoupon(string ids, string couponIds) { var cIds = couponIds.Split(',').Select(s => long.Parse(s)); var uids = ids.Split(',').Select(s => long.Parse(s)).ToList(); if (cIds.Count() == 0) { throw new MallException("请选择优惠券!"); } if (uids.Count() == 0) { throw new MallException("请选择发送会员!"); } Dictionary <string, int> dictResult = new Dictionary <string, int>(); CouponApplication.SendCouponByUserIds(uids, cIds.ToList()); return(Json(new { Success = true }, true)); }