/// <summary> /// 当团购订单已结束或等待供应商确认收款N天后采购商为评价,系统默认为好评 /// </summary> /// <param name="isPause"></param> private void WillBeDiscuss() { ServiceUtil.Debug("开始执行当团购订单已结束或等待供应商确认收款N天后采购商为评价,系统默认为好评"); //获取评价时间已经到达的订单 DataTable discussHasFinished = teamBuyOrderManager.DiscussHasFinished(); foreach (DataRow row in discussHasFinished.Rows) { //获取评价时间已经到达的订单编号 int orderId = XYECOM.Core.MyConvert.GetInt32(row["Id"].ToString()); ServiceUtil.Info("操作当团购订单已结束或等待供应商确认收款N天后采购商为评价,系统默认为好评(编号" + orderId + ")"); Model.TeamBuyOrderInfo orderInfo = teamBuyOrderManager.GetItem(orderId); try { Model.OrderEvaluationInfo oeInfo = new Model.OrderEvaluationInfo(); oeInfo.Deliverygrade = 5; oeInfo.Evaluation = "供应商服务很好,产品也跟描述的一直,发货很及时,以后继续合作"; oeInfo.Evaluationtime = DateTime.Now; oeInfo.OrderId = orderId; oeInfo.Productsgrade = 5; oeInfo.Servicegrade = 5; oeInfo.UserId = orderInfo.BuyerId; oeInfo.OrderType = 1; //默认好评 orderEvaluationManage.Insert(oeInfo); //增加用户信用积分 userRegManage.AddCreditIntegral(orderInfo.SellerId, 1); //其他操作 System.Threading.Thread.Sleep(5); } catch (Exception ep) { ServiceUtil.Error("Discuss团购订单编号为:" + orderId, ep); } } ServiceUtil.Debug("执行结束当团购订单已结束或等待供应商确认收款N天后采购商为评价,系统默认为好评"); }
/// <summary> /// 逾期未评价的订单。 /// </summary> /// <param name="isPause"></param> private void WillBeDiscuss() { ServiceUtil.Debug("开始执行逾期未评价的订单"); //获取评价时间已经到达的订单 DataTable discussHasFinished = orderManager.DiscussHasFinished(); foreach (DataRow row in discussHasFinished.Rows) { //获取评价时间已经到达的订单编号 int orderId = XYECOM.Core.MyConvert.GetInt32(row["Id"].ToString()); ServiceUtil.Info("操作逾期未评价的小额订单(编号" + orderId+")"); Model.OrderInfo orderInfo = orderManager.GetItem(orderId); try { Model.OrderEvaluationInfo oeInfo = new Model.OrderEvaluationInfo(); oeInfo.Deliverygrade = 5; oeInfo.Evaluation = "供应商服务很好,产品也跟描述的一直,发货很及时,以后继续合作"; oeInfo.Evaluationtime = DateTime.Now; oeInfo.OrderId = orderId; oeInfo.Productsgrade = 5; oeInfo.Servicegrade = 5; oeInfo.UserId = orderInfo.BuyerId; //默认好评 orderEvaluationManage.Insert(oeInfo); //增加用户信用积分 new XYECOM.Business.CreditLeavlManager().AddCreditIntegral(orderInfo.SellerId, 1); //其他操作 System.Threading.Thread.Sleep(5); } catch (Exception ep) { ServiceUtil.Error("ERROR:Discuss订单编号为:" + orderId, ep); } } ServiceUtil.Debug("执行结束逾期未评价的订单"); }