public JsonResult BatchAudit(string productIds, int auditState, string message) { var productIdsArr = productIds.Split(',').Select(item => long.Parse(item)); Result result = new Result(); try { Model.ProductInfo.ProductAuditStatus status = (Model.ProductInfo.ProductAuditStatus)auditState; _iProductService.AuditProducts(productIdsArr, status, message); _iSearchProductService.UpdateSearchStatusByProducts(productIdsArr.ToList()); if (status != ProductInfo.ProductAuditStatus.Audited) { foreach (var item in productIdsArr) { //处理门店 ShopBranchApplication.UnSaleProduct(item); } } result.success = true; result.msg = "审核成功!"; } catch (HimallException ex) { result.msg = ex.Message; } catch (Exception ex) { Log.Error("审核出错", ex); result.msg = "审核出错!"; } return(Json(result)); }
public JsonResult Audit(long productId, int auditState, string message) { Result result = new Result(); try { Model.ProductInfo.ProductAuditStatus status = (Model.ProductInfo.ProductAuditStatus)auditState; _iProductService.AuditProduct(productId, status, message); #region 修改搜索诊疗项目状态 _iSearchProductService.UpdateSearchStatusByProduct(productId); #endregion if (status != ProductInfo.ProductAuditStatus.Audited) { //处理门店 ShopBranchApplication.UnSaleProduct(productId); } result.success = true; result.msg = "审核成功!"; } catch (HimallException ex) { result.msg = ex.Message; } catch (Exception ex) { Log.Error("审核出错", ex); result.msg = "审核出错!"; } return(Json(result)); }
public JsonResult GetUnSaleProduct(string pids, long shopbranchId) { if (string.IsNullOrWhiteSpace(pids)) { return(Json(new { success = false, msg = "参数异常" })); } var ids = ConvertToIEnumerable(pids); ShopBranchApplication.UnSaleProduct(shopbranchId, ids); return(Json(new { success = true, msg = "已下架" })); }
/// <summary> /// 下架诊疗项目 /// </summary> /// <param name="pids"></param> /// <returns></returns> public object GetUnSaleProduct(string pids) { CheckUserLogin(); if (string.IsNullOrWhiteSpace(pids)) { return(Json(new { success = false, msg = "参数异常" })); } var ids = ConvertToIEnumerable(pids); ShopBranchApplication.UnSaleProduct(CurrentShopBranch.Id, ids); return(Json(new { success = true, msg = "已下架" })); }