Beispiel #1
0
        /// <summary>
        /// 高级解锁订单
        /// </summary>
        /// <param name="orderNos"></param>
        /// <returns></returns>
        public ActionResult UnLock(string orderNos)
        {
            try
            {
                var      sb         = new StringBuilder();
                string[] aryOrderNo = orderNos.Split(',');

                foreach (var orderNo in aryOrderNo)
                {
                    //var entity = Repositoryfactory.Repository().FindEntity("OrderNo", orderNo);
                    //if (string.IsNullOrWhiteSpace(entity.LockUserId))
                    //{
                    //    sb.AppendFormat("<font color='blue'>订单{0}不需要解锁</font><br>", orderNo);
                    //}
                    //else
                    //{
                    bool flag = _orderBll.UpdateUnLockUserIdByOrderNo(orderNo, null);
                    if (flag)
                    {
                        sb.AppendFormat("订单{0}解锁成功<br>", orderNo);
                    }
                    else
                    {
                        sb.AppendFormat("订单{0}解锁失败<br>", orderNo);
                    }
                    //}
                }

                WriteLog(1, orderNos, sb.ToString());
                return(Content(new JsonMessage {
                    Success = true, Code = "1", Message = sb.ToString()
                }.ToString()));
            }
            catch (Exception ex)
            {
                WriteLog(-1, orderNos, "操作失败:" + ex.Message);
                return(Content(new JsonMessage {
                    Success = false, Code = "-1", Message = "操作失败:" + ex.Message
                }.ToString()));
            }
        }