/// <summary> /// 编辑备注 /// </summary> /// <param name="rParams"></param> /// <returns></returns> public string EditOrderRemark(NameValueCollection rParams) { string res = "{success:false,msg:'操作失败'}"; TInoutEntity entity = new TInoutEntity(); if (!string.IsNullOrEmpty(rParams["id"])) { entity = new TInoutBLL(CurrentUserInfo).GetByID(rParams["id"]); } entity = DataLoader.LoadFrom <TInoutEntity>(rParams, entity); new TInoutBLL(CurrentUserInfo).Update(entity); res = "{success:true,msg:'保存成功'}"; return(res); }
private PagedQueryResult <TInoutViewEntity> SearchOrder(NameValueCollection rParams) { #region 条件拼接 Dictionary <string, object> pParems = new Dictionary <string, object>(); if (!string.IsNullOrEmpty(rParams["pOrdersNo"])) { pParems.Add("pOrdersNo", rParams["pOrdersNo"]); } if (!string.IsNullOrEmpty(rParams["pStartDate"])) { pParems.Add("pStartDate", rParams["pStartDate"]); } if (!string.IsNullOrEmpty(rParams["pEndDate"])) { pParems.Add("pEndDate", rParams["pEndDate"]); } if (!string.IsNullOrEmpty(rParams["pStoreName"])) { pParems.Add("pStoreName", rParams["pStoreName"]); } if (!string.IsNullOrEmpty(rParams["pItemName"])) { pParems.Add("pItemName", rParams["pItemName"]); } if (!string.IsNullOrEmpty(rParams["pUserName"])) { pParems.Add("pUserName", rParams["pUserName"]); } if (!string.IsNullOrEmpty(rParams["pStatus"])) { pParems.Add("pStatus", rParams["pStatus"]); } int pageSize = 1000000; if (rParams["limit"] != null) { pageSize = rParams["limit"].ToInt(); } int pageIndex = 1; if (rParams["page"] != null) { pageIndex = rParams["page"].ToInt(); } #endregion PagedQueryResult <TInoutViewEntity> pagedQueryEntity = new TInoutBLL(CurrentUserInfo).GetOrdersList(pParems, pageIndex, pageSize); return(pagedQueryEntity); }
/// <summary> /// 获取订单各个状态的数量 /// </summary> /// <param name="rParam"></param> /// <returns></returns> public string GetOrdersStatusCount(NameValueCollection rParams) { #region 条件拼接 Dictionary <string, string> pParems = new Dictionary <string, string>(); if (!string.IsNullOrEmpty(rParams["pOrdersNo"])) { pParems.Add("pOrdersNo", rParams["pOrdersNo"]); } if (!string.IsNullOrEmpty(rParams["pStartDate"])) { pParems.Add("pStartDate", rParams["pStartDate"]); } if (!string.IsNullOrEmpty(rParams["pEndDate"])) { pParems.Add("pEndDate", rParams["pEndDate"]); } if (!string.IsNullOrEmpty(rParams["pStoreName"])) { pParems.Add("pStoreName", rParams["pStoreName"]); } if (!string.IsNullOrEmpty(rParams["pItemName"])) { pParems.Add("pItemName", rParams["pItemName"]); } if (!string.IsNullOrEmpty(rParams["pUserName"])) { pParems.Add("pUserName", rParams["pUserName"]); } if (!string.IsNullOrEmpty(rParams["pStatus"])) { pParems.Add("pStatus", rParams["pStatus"]); } #endregion DataSet ds = new TInoutBLL(CurrentUserInfo).GetOrdersListCountFHotels(pParems); return(string.Format("{{\"approveCount\":{0},\"checkCount\":{1},\"completeCount\":{2},\"cancelCount\":{3},\"notAuditCount\":{4},\"allCount\":{5}}}" , ds.Tables[0].Rows[0][0] , ds.Tables[1].Rows[0][0] , ds.Tables[2].Rows[0][0] , ds.Tables[3].Rows[0][0] , ds.Tables[4].Rows[0][0] , ds.Tables[5].Rows[0][0])); }
public string SendWeixinMessage(string pRequest) { var rd = new EmptyResponseData(); var rp = pRequest.DeserializeJSONTo <APIRequest <SendWeixinMessageRP> >(); var loggingSessionInfo = Default.GetBSLoggingSession(rp.CustomerID, "1"); var orderId = rp.Parameters.OrderId; var tInoutBll = new TInoutBLL(loggingSessionInfo); var tInoutEntity = tInoutBll.GetByID(orderId); if (tInoutEntity == null) { Loggers.Debug(new DebugLogInfo() { Message = orderId + "无效的订单ID;" }); return(rd.ToJSON()); } var vipBll = new VipBLL(loggingSessionInfo); var vipEntity = vipBll.GetByID(rp.UserID); if (vipEntity == null) { Loggers.Debug(new DebugLogInfo() { Message = rp.UserID + "无效的会员ID;" }); return(rd.ToJSON()); } var message = "亲爱的 " + vipEntity.VipName + "您好,感谢您选择花间堂!您的订单【" + tInoutEntity.OrderNo + "】已收到,正在玩命确认中。您可以进入个人中心页面随时关注订单状态,如有疑问请致电4000 767 123。"; string code = JIT.CPOS.BS.BLL.WX.CommonBLL.SendWeixinMessage(message, "1", loggingSessionInfo, vipEntity); Loggers.Debug(new DebugLogInfo() { Message = "消息推送完成,code=" + code + ", message=" + message }); switch (code) { case "103": Loggers.Debug(new DebugLogInfo() { Message = vipEntity.VipName + "未查询到匹配的公众账号信息;" }); break; case "203": Loggers.Debug(new DebugLogInfo() { Message = vipEntity.VipName + "发送失败;" }); break; default: break; } var rsp = new SuccessResponse <IAPIResponseData>(rd); return(rsp.ToJSON()); }
/// <summary> /// 订单提交 /// </summary> /// <returns></returns> public string AddOrders() { string content = string.Empty; var respData = new OrdersInfoRespData(); try { //接收参数 string reqContent = HttpContext.Current.Request["ReqContent"]; var reqObj = reqContent.DeserializeJSONTo <OrdersInfoReqData>(); reqObj = reqObj == null ? new OrdersInfoReqData() : reqObj; //获取客户ID if (!string.IsNullOrEmpty(reqObj.common.customerId)) { customerId = reqObj.common.customerId; } //初始化返回对象 respData.content = new OrdersInfoRespContentData(); respData.content.orderList = new List <OrdersInfoRespContentDataItem>(); //用户登录信息 var loggingSessionInfo = Default.GetBSLoggingSession(customerId, "1"); TInoutBLL inoutBLL = new TInoutBLL(loggingSessionInfo); TInoutEntity inoutEntity = new TInoutEntity(); //添加订单 inoutEntity.OrderID = Guid.NewGuid().ToString(); inoutEntity.OrderTypeID = "1F0A100C42484454BAEA211D4C14B80F"; inoutEntity.OrderReasonID = "2F6891A2194A4BBAB6F17B4C99A6C6F5"; inoutEntity.OrderNo = GetOrdersNo(); inoutEntity.VipNo = reqObj.common.userId; inoutEntity.OrderDate = DateTime.Now.ToString("yyyy-MM-dd"); inoutEntity.RedFlag = "1"; inoutEntity.Status = "100"; inoutEntity.StatusDesc = "未审核"; inoutEntity.PurchaseUnitID = ConfigurationManager.AppSettings["HS_PurchaseUnitID"].ToString(); inoutEntity.CreateTime = DateTime.Now.ToString(); if (reqObj.special.photo.Length > 0) { var length = reqObj.special.photo.Length; inoutEntity.Field1 = length >= 1 ? reqObj.special.photo[0].ToString() : ""; inoutEntity.Field2 = length >= 2 ? reqObj.special.photo[1].ToString() : ""; inoutEntity.Field3 = length >= 3 ? reqObj.special.photo[2].ToString() : ""; inoutEntity.Field4 = length >= 4 ? reqObj.special.photo[3].ToString() : ""; inoutEntity.Field5 = length >= 5 ? reqObj.special.photo[4].ToString() : ""; inoutEntity.Field6 = length >= 6 ? reqObj.special.photo[5].ToString() : ""; } inoutEntity.Field7 = "100"; //后台查询订单用 inoutEntity.Field10 = ""; //订单状态 inoutEntity.Field8 = reqObj.special.model; //产品型号 inoutEntity.Field9 = reqObj.special.serial; //产品序列号 inoutEntity.Field11 = reqObj.special.buyWay; //购买方式 关联Option inoutEntity.Field12 = reqObj.special.name; //客户姓名 inoutEntity.Field13 = reqObj.special.mobile; //电话 inoutEntity.Field14 = reqObj.special.email; //Email inoutEntity.Field15 = reqObj.special.getWay; //客户获取方式 关联Option inoutEntity.Field16 = reqObj.special.date; //订单日期 inoutEntity.Field17 = reqObj.special.price; //订单价格 inoutEntity.Field18 = reqObj.special.school; //学校 inoutEntity.Field19 = reqObj.special.specialt; //专业 inoutEntity.Field20 = reqObj.special.intent; //购买前意向 inoutEntity.CustomerID = reqObj.common.customerId; inoutBLL.Create(inoutEntity); respData.code = "200"; respData.description = "操作成功"; } catch (Exception ex) { respData.code = "103"; respData.description = "数据库操作错误"; respData.exception = ex.ToString(); } content = respData.ToJSON(); return(content); }
protected override GetOrderDetailRD ProcessRequest(DTO.Base.APIRequest <GetOrderDetailRP> pRequest) { GetOrderDetailRD rd = new GetOrderDetailRD(); string orderId = pRequest.Parameters.OrderId; rd.OrderListInfo = new OrderListInfo(); #region 获取订单列表 T_InoutBLL orderBll = new T_InoutBLL(this.CurrentUserInfo); var orderList = orderBll.QueryByEntity(new T_InoutEntity() { order_id = orderId }, null); #endregion #region 获取会员信息 string vipNo = orderList[0].vip_no; VipBLL vipBll = new VipBLL(this.CurrentUserInfo); var vipList = vipBll.QueryByEntity(new VipEntity() { VIPID = vipNo }, null); #endregion #region 获取配方式 //Bear 20160928 注释 更具商品信息获取对应配送 string deliveryId = orderList[0].Field8; DeliveryBLL deliverBll = new DeliveryBLL(this.CurrentUserInfo); var deliverList = deliverBll.QueryByEntity(new DeliveryEntity() { DeliveryId = deliveryId }, null); #endregion #region 获取门店信息 string storeId = orderList[0].sales_unit_id; if (!string.IsNullOrEmpty(orderList[0].purchase_unit_id))//如果有发货门店,则显示发货门店信息 { storeId = orderList[0].purchase_unit_id; } TInoutBLL tInoutBll = new TInoutBLL(this.CurrentUserInfo); //string storeName = tInoutBll.GetStoreName(storeId); DataSet storeDs = tInoutBll.GetStoreInfo(storeId); rd.OrderListInfo.StoreID = storeId; #endregion //配送商 string carrierId = orderList[0].carrier_id; //DataSet carrierDs = tInoutBll.GetStoreInfo(carrierId); //if (carrierDs.Tables[0].Rows.Count > 0) //{ // rd.OrderListInfo.CarrierID = carrierId; // rd.OrderListInfo.CarrierName = carrierDs.Tables[0].Rows[0]["unit_name"].ToString(); //} if (!string.IsNullOrEmpty(carrierId)) { //配送方式 1.送货到家;2.到店提货 if (deliveryId == "1") { var logisticsCompanyBLL = new T_LogisticsCompanyBLL(this.CurrentUserInfo); Guid m_carrierId = Guid.Parse(carrierId); var logCompInfo = logisticsCompanyBLL.GetByID(m_carrierId); if (logCompInfo != null) { rd.OrderListInfo.CarrierID = carrierId; rd.OrderListInfo.CarrierName = logCompInfo.LogisticsName; } } else if (deliveryId == "2") { var unitBLL = new t_unitBLL(this.CurrentUserInfo); var unitInfo = unitBLL.GetByID(carrierId); if (unitInfo != null) { rd.OrderListInfo.CarrierID = carrierId; rd.OrderListInfo.CarrierName = unitInfo.unit_name; } } else if (deliveryId == "4") { var unitBLL = new t_unitBLL(this.CurrentUserInfo); var unitInfo = unitBLL.GetByID(carrierId); if (unitInfo != null) { rd.OrderListInfo.CarrierID = carrierId; rd.OrderListInfo.CarrierName = unitInfo.unit_name; } } } rd.OrderListInfo.CourierNumber = orderList[0].Field2; //配送单号 rd.OrderListInfo.Invoice = orderList[0].Field19 == null ? "" : orderList[0].Field19; //发票信息 if (vipList.Count() > 0) { rd.OrderListInfo.VipID = vipList[0].VIPID; rd.OrderListInfo.Phone = vipList[0].Phone; rd.OrderListInfo.UserName = vipList[0].VipName; rd.OrderListInfo.VipRealName = vipList[0].VipRealName; rd.OrderListInfo.VipLevelDesc = vipList[0].VipLevelDesc; rd.OrderListInfo.VipCode = vipList[0].VipCode; rd.OrderListInfo.Email = vipList[0].Email; rd.OrderListInfo.VipLevel = Convert.ToInt32(vipList[0].VipLevel); } if (storeDs.Tables[0].Rows.Count > 0) { rd.OrderListInfo.StoreName = storeDs.Tables[0].Rows[0]["unit_name"].ToString(); rd.OrderListInfo.StoreAddress = storeDs.Tables[0].Rows[0]["unit_address"].ToString(); rd.OrderListInfo.StoreTel = storeDs.Tables[0].Rows[0]["unit_tel"].ToString(); } if (orderList.Count() > 0) { rd.OrderListInfo.discount_rate = orderList[0].discount_rate ?? 100;//订单折扣 rd.OrderListInfo.OrderID = orderList[0].order_id; rd.OrderListInfo.OrderCode = orderList[0].order_no; rd.OrderListInfo.OrderDate = orderList[0].order_date; rd.OrderListInfo.ReceiverName = orderList[0].Field14; //收件人 rd.OrderListInfo.TotalQty = Convert.ToDecimal(orderList[0].total_qty); string TotalAmount = String.Format("{0:F}", orderList[0].total_amount ?? 0); rd.OrderListInfo.TotalAmount = TotalAmount; rd.OrderListInfo.Total_Retail = Convert.ToDecimal(orderList[0].total_retail); rd.OrderListInfo.Remark = orderList[0].remark; rd.OrderListInfo.Status = orderList[0].status; rd.OrderListInfo.OrderStatus = int.Parse(orderList[0].Field7); rd.OrderListInfo.StatusDesc = orderList[0].status_desc; rd.OrderListInfo.DeliveryAddress = orderList[0].Field4; rd.OrderListInfo.DeliveryTime = orderList[0].Field9; rd.OrderListInfo.ClinchTime = orderList[0].create_time; rd.OrderListInfo.ReceiptTime = orderList[0].accpect_time; rd.OrderListInfo.CouponsPrompt = orderList[0].Field16; rd.OrderListInfo.DeliveryID = orderList[0].Field8; rd.OrderListInfo.IsPayment = orderList[0].Field1; rd.OrderListInfo.ReceivePoints = orderList[0].receive_points; rd.OrderListInfo.PaymentTime = orderList[0].Field1 == "1" ? orderList[0].complete_date : null; rd.OrderListInfo.OrderReasonTypeId = orderList[0].order_reason_id; rd.OrderListInfo.ActualDecimal = orderList[0].actual_amount ?? 0; rd.OrderListInfo.PaymentTypeCode = orderList[0].Payment_Type_Code; rd.OrderListInfo.PaymentTypeName = orderList[0].Payment_Type_Name; rd.OrderListInfo.ReserveTime = orderList[0].reserveDay + " " + orderList[0].reserveQuantum; var deliveryBll = new TOrderCustomerDeliveryStrategyMappingBLL(this.CurrentUserInfo); rd.OrderListInfo.DeliveryAmount = deliveryBll.GetDeliverAmount(orderId); //配送费 add by henry*** if (!string.IsNullOrEmpty(orderList[0].Field15) && orderList[0].Field15 != "0") //是否是团购商品 add by Henry 2014-12-22 { rd.OrderListInfo.IsEvent = 1; //团购商品 } else { rd.OrderListInfo.IsEvent = 0; //普通商品 } #region update by changjian.tian rd.OrderListInfo.Mobile = orderList[0].Field6; //配送联系电话 rd.OrderListInfo.DeliveryRemark = orderList[0].remark; rd.OrderListInfo.IsEvaluation = orderList[0].IsEvaluation == null ? 0 : orderList[0].IsEvaluation.Value;//评论 #endregion } if (deliverList.Count() > 0) { rd.OrderListInfo.DeliveryName = deliverList[0].DeliveryName; } T_Inout_DetailBLL orderDetailBll = new T_Inout_DetailBLL(this.CurrentUserInfo); //退换货Bll实例化 T_SalesReturnBLL salesReturnBll = new T_SalesReturnBLL(this.CurrentUserInfo); var orderDetailList = orderDetailBll.QueryByEntity(new T_Inout_DetailEntity() { order_id = orderId }, null); var inoutService = new InoutService(this.CurrentUserInfo); #region 根据订单ID获取订单明细 var ds = inoutService.GetOrderDetailByOrderId(orderId); #endregion #region 获取订单详细列表中的商品规格 var ggDs = inoutService.GetInoutDetailGgByOrderId(orderId); #endregion if (ds.Tables[0].Rows.Count > 0) { string ItemIdList = ds.Tables[0].AsEnumerable().Aggregate("", (x, j) => { x += string.Format("'{0}',", j["item_id"].ToString()); return(x); }).Trim(','); TInoutDetailBLL tInoutDetailBll = new TInoutDetailBLL(this.CurrentUserInfo); //获取商品的图片 DataSet imageDs = tInoutDetailBll.GetOrderDetailImageList(ItemIdList); var tmp = ds.Tables[0].AsEnumerable().Select(t => new OrderDetailEntity() { ItemID = t["item_id"].ToString(), ItemName = t["item_name"].ToString(), SkuID = t["sku_id"].ToString(), SalesReturnFlag = salesReturnBll.CheckSalesReturn(orderId, t["sku_id"].ToString()),//是否可申请退换货 //GG = t["prop_1_detail_name"].ToString()+t["prop_2_detail_name"].ToString()+t["prop_3_detail_name"].ToString() //+t["prop_4_detail_name"].ToString()+t["prop_5_detail_name"].ToString(), Field9 = t["Field9"].ToString(), isGB = Convert.ToInt32(t["isGB"]), GG = ggDs.Tables[0].AsEnumerable() .Where(tt => tt["sku_id"].ToString() == t["sku_id"].ToString()) .Select(tt => new GuiGeInfo { PropName1 = tt["prop_1_name"].ToString(), PropDetailName1 = tt["prop_1_detail_name"].ToString(), PropName2 = tt["prop_2_name"].ToString(), PropDetailName2 = tt["prop_2_detail_name"].ToString(), PropName3 = tt["prop_3_name"].ToString(), PropDetailName3 = tt["prop_3_detail_name"].ToString(), PropName4 = tt["prop_4_name"].ToString(), PropDetailName4 = tt["prop_4_detail_name"].ToString(), PropName5 = tt["prop_5_name"].ToString(), PropDetailName5 = tt["prop_5_detail_name"].ToString() }).FirstOrDefault(), SalesPrice = Convert.ToDecimal(t["enter_price"]), //DiscountRate = Convert.ToDecimal(t["discount_rate"]), DiscountRate = Convert.ToDecimal(t["order_discount_rate"]), ItemCategoryName = t["itemCategoryName"].ToString(), BeginDate = t["Field1"].ToString(), EndDate = t["Field2"].ToString(), DayCount = Convert.ToInt32(t["DayCount"]), Qty = Convert.ToDecimal(t["enter_qty"]), ImageInfo = imageDs.Tables[0].AsEnumerable() .Where(c => c["ObjectId"].ToString() == t["item_id"].ToString()) .OrderBy(c => c["displayIndex"]) .Select(c => new OrderDetailImage { ImageID = c["imageId"].ToString(), ImageUrl = ImagePathUtil.GetImagePathStr(c["imageUrl"].ToString(), "240") }).ToArray(), IfService = Convert.ToInt32(t["IfService"]) }); int tempCount = 0; foreach (var i in tmp) { if (i.IfService == 0) { tempCount++; } } if (tempCount == 0) { rd.OrderListInfo.IsAllService = 3; // 3-全部为虚拟商品 } else if (tempCount == tmp.Count()) { rd.OrderListInfo.IsAllService = 1; // 1-全部为实物商品 } else { rd.OrderListInfo.IsAllService = 2; // 2-包含实物商品和虚拟商品 } #region 根据商品获取配送方式 var deliveryIds = new List <int?>(); if (rd.OrderListInfo.IsAllService == 3) { deliveryIds.Add(1); deliveryIds.Add(2); deliveryIds.Add(4); rd.OrderListInfo.CanUseDeliveryIDs = deliveryIds; } else { T_Item_Delivery_MappingBLL mappingBll = new T_Item_Delivery_MappingBLL(this.CurrentUserInfo); var complexCondition = new List <IWhereCondition> { }; var itemIdArray = ItemIdList.Replace("'", "").Split(','); complexCondition.Add(new InCondition <string>() { FieldName = "Item_Id", Values = itemIdArray }); var itemDeliveryList = mappingBll.Query(complexCondition.ToArray(), null); bool needAddDelivery4 = false; bool needAddDelivery2 = false; if (itemDeliveryList.ToList().Find(d => d.DeliveryId == 4) != null) { needAddDelivery4 = true; } else { if (itemDeliveryList.ToList().Find(d => d.DeliveryId == 2) != null) { needAddDelivery2 = true; } } var itemDeliveryGroupList = itemDeliveryList.GroupBy(d => d.Item_Id); var index = 0; foreach (var info in itemDeliveryGroupList) { var tmpList = info.ToList <T_Item_Delivery_MappingEntity>(); //分组后的集合 if (index == 0) { deliveryIds.AddRange(tmpList.Select(d => d.DeliveryId)); index++; continue; } deliveryIds = deliveryIds.Intersect(tmpList.Select(d => d.DeliveryId)).ToList(); if (deliveryIds.Count <= 0) { break; // 后面的不用求了 } index++; } if (!deliveryIds.Contains(4) && needAddDelivery4) { deliveryIds.Add(4); } if (!deliveryIds.Contains(2) && needAddDelivery2) { deliveryIds.Add(2); } rd.OrderListInfo.CanUseDeliveryIDs = deliveryIds.OrderBy(t => t.Value).ToList(); } #endregion rd.OrderListInfo.OrderDetailInfo = tmp.ToArray(); } var vipIntegralDetailBll = new VipIntegralDetailBLL(this.CurrentUserInfo); // var integral = vipIntegralDetailBll.GetVipIntegralByOrder(orderId, pRequest.UserID); //使用积分 rd.OrderListInfo.OrderIntegral = Math.Abs(vipIntegralDetailBll.GetVipIntegralByOrder(orderId, vipNo)); //积分抵扣金额 add by Henry 2014-10-8 //decimal integralAmountPre = vipBll.GetIntegralAmountPre(this.CurrentUserInfo.ClientID);//获取积分金额比例 //rd.OrderListInfo.UseIntegralToAmount =rd.OrderListInfo.OrderIntegral*(integralAmountPre>0?integralAmountPre:0.01M); rd.OrderListInfo.UseIntegralToAmount = vipBll.GetAmountByIntegralPer(CurrentUserInfo.ClientID, rd.OrderListInfo.OrderIntegral); var couponUseBll = new CouponUseBLL(this.CurrentUserInfo); var couponParValue = couponUseBll.GetCouponParValue(orderId); rd.OrderListInfo.CouponAmount = couponParValue; var vipAmountDetailBll = new VipAmountDetailBLL(this.CurrentUserInfo); //使用的账户余额 rd.OrderListInfo.VipEndAmount = Math.Abs(vipAmountDetailBll.GetVipAmountByOrderId(orderId, vipNo, 1)); //使用余额,将余额从实付款中分开 if (rd.OrderListInfo.VipEndAmount != 0) { rd.OrderListInfo.ActualDecimal = rd.OrderListInfo.ActualDecimal - rd.OrderListInfo.VipEndAmount; } //使用的返现金额 rd.OrderListInfo.ReturnAmount = Math.Abs(vipAmountDetailBll.GetVipAmountByOrderId(orderId, vipNo, 13)); //使用阿拉币和阿拉币抵扣 add by Henry 2014-10-13 if (pRequest.ChannelId == "4")//阿拉丁APP调用 { decimal aldAmount = Math.Abs(vipAmountDetailBll.GetVipAmountByOrderId(orderId, vipNo, 11)); rd.OrderListInfo.ALDAmount = aldAmount; rd.OrderListInfo.ALDAmountMoney = aldAmount * 0.01M; } #region 获取订单积分,优惠券金额,使用余额 //var vipIntegralDetailBll = new VipIntegralDetailBLL(this.CurrentUserInfo); //var vipIntegralList = vipIntegralDetailBll.QueryByEntity(new VipIntegralDetailEntity() //{ // VIPID = pRequest.UserID, // ObjectId = orderId //}, null); //if (vipIntegralList != null && vipIntegralList.Length > 0) //{ // rd.OrderListInfo.OrderIntegral = Math.Abs(vipIntegralList[0].Integral??0); //} //var tOrderCouponMappingBll = new TOrderCouponMappingBLL(this.CurrentUserInfo); //var tOrderCouponMappingList = tOrderCouponMappingBll.QueryByEntity(new TOrderCouponMappingEntity() //{ // OrderId = orderId //}, null); //if (tOrderCouponMappingList != null && tOrderCouponMappingList.Length > 0) //{ // var couponId = tOrderCouponMappingList[0].CouponId; // var couponBll = new CouponBLL(this.CurrentUserInfo); // var couponEntity = couponBll.GetByID(couponId); // if (couponEntity != null) // { // var couponTypeId = couponEntity.CouponTypeID; // var couponTypeBll = new CouponTypeBLL(this.CurrentUserInfo); // var couponTypeEntity = couponTypeBll.GetByID(couponTypeId); // if (couponTypeEntity != null) // { // rd.OrderListInfo.CouponAmount = couponTypeEntity.ParValue ?? 0; // } // } //} //var vipAmountDetailBll = new VipAmountDetailBLL(this.CurrentUserInfo); //var vipAmountDetailList = vipAmountDetailBll.QueryByEntity(new VipAmountDetailEntity() //{ // VipId = pRequest.UserID, // ObjectId = orderId //}, null); //if (vipAmountDetailList != null && vipAmountDetailList.Length > 0) //{ // rd.OrderListInfo.VipEndAmount = Math.Abs(vipAmountDetailList[0].Amount ?? 0); //} #endregion return(rd); }