Example #1
0
        /// <summary>
        /// 退款请求插入
        /// </summary>
        /// <param name="dicPar"></param>
        /// <param name="openid"></param>
        /// <returns></returns>
        public bool OrderRefundOpe(Dictionary<string, string> dicPar, string openid)
        {
            //Init
            List<string> listSql = new List<string>();
            List<object> listPar = new List<object>();

            WX_ZZSCOrderRefundInfo item = new WX_ZZSCOrderRefundInfo();

            item.ID = Guid.NewGuid().ToString("N");
            item.OrderID = dicPar["OrderID"];
            item.OrderNum = dicPar["OrderNum"];
            item.OpenID = openid;
            item.ResonType = int.Parse(dicPar["ResonType"]);
            item.ResonRemark = dicPar["ResonRemark"];
            item.TotalPrice = decimal.Parse(dicPar["TotalPrice"]);
            item.RefundPrice = decimal.Parse(dicPar["RefundPrice"]);
            item.State = 0;
            item.OpeDate = DateTime.Now;

            //表WX_ZZSCOrderRefund
            WX_ZZSCOrderRefundDAL refundDal = new WX_ZZSCOrderRefundDAL();
            listSql.Add(refundDal.AddSQL());
            listPar.Add(item);

            //表WX_ZZSCBeOrder
            listSql.Add(" UPDATE wx_zzscbeorder SET OrderState=@State WHERE ID=@ID");
            listPar.Add(new { ID = item.OrderID, State = 5 });

            //表WX_ZZSCOrder
            listSql.Add(" UPDATE wx_zzscorder SET OrderState=@State WHERE ID=@ID");
            listPar.Add(new { ID = item.OrderID, State = 5 });

            return refundDal.ExecuteTran(listSql, listPar);
        }
Example #2
0
        /// <summary>
        /// 根据订单号,查询用户退款申请信息
        /// </summary>
        /// <param name="orderID"></param>
        /// <returns></returns>
        public WX_ZZSCOrderRefundInfo QueryOrderRefund(string orderID)
        {
            WX_ZZSCOrderRefundDAL refundDal = new WX_ZZSCOrderRefundDAL();

            WX_ZZSCOrderRefundInfo item = refundDal.Query<WX_ZZSCOrderRefundInfo>(" OrderID = @OrderID ", new { OrderID = orderID }).FirstOrDefault();

            return item;
        }