public void SetVipConsumeForUpgradeList(LoggingSessionInfo loggingSessionInfo, T_InoutEntity orderInfo) { var response = RedisOpenAPI.Instance.CCAllOrder().SetOrder(new CC_Order { CustomerID = loggingSessionInfo.ClientID, OrderId = orderInfo.order_id, OrderInfo = orderInfo.JsonSerialize() }); if (response.Code == ResponseCode.Fail) { //直接计算 CalculateVipConsumeForUpgrade(loggingSessionInfo, orderInfo); } }
/// <summary> /// 入队列 /// </summary> /// <param name="loggingSessionInfo"></param> /// <param name="orderInfo"></param> public void SetRedisSalesVipCardOrder(LoggingSessionInfo loggingSessionInfo, T_InoutEntity orderInfo) { var response = RedisOpenAPI.Instance.CCSalesCardOrder().SetSalesCardOrder(new CC_Order { CustomerID = loggingSessionInfo.ClientID, OrderId = orderInfo.order_id.ToString(), OrderInfo = orderInfo.JsonSerialize() }); if (response.Code == ResponseCode.Fail) { //直接计算 T_InoutBLL inoutBLL = new T_InoutBLL(loggingSessionInfo); inoutBLL.CalculateSalesVipCardOrder(loggingSessionInfo, orderInfo); } }
public void OrderReward(T_InoutEntity orderInfo, LoggingSessionInfo loggingSessionInfo, SqlTransaction tran) { //下面往redis里存入数据 var response = RedisOpenAPI.Instance.CCOrderReward().SeOrderReward(new CC_OrderReward { CustomerID = loggingSessionInfo.ClientID, LogSession = loggingSessionInfo.JsonSerialize(), OrderInfo = orderInfo.JsonSerialize(), OrderID = orderInfo.order_id }); //如果往缓存redis里写入不成功,还是按照原来的老方法往数据库里写 if (response.Code != ResponseCode.Success) { new VipIntegralBLL(loggingSessionInfo).OrderReward(orderInfo, tran);//还是把原来的事务传进去 new RedisXML().RedisReadDBCount("OrderReward", "确认收货/完成订单 - 处理奖励", 2); } else { new RedisXML().RedisReadDBCount("OrderReward", "确认收货/完成订单 - 处理奖励", 1); } }