Exemple #1
0
        /// <summary>
        /// 发送预约模板消息
        /// </summary>
        /// <param name="reservation"></param>
        /// <param name="msgState">模板消息状态(接单、退款、取消)</param>
        /// <param name="tmpType">模板消息类型(专业版、餐饮版)</param>
        /// <param name="refundOrder">退款订单(仅退款消息需要)</param>
        /// <param name="refundEntOrder">退款订单(仅退款消息需要)</param>
        /// <returns></returns>
        public bool SendReserveMsg(FoodReservation reservation, SendTemplateMessageTypeEnum msgState, TmpType tmpType, EntGoodsOrder refundEntOrder = null, FoodGoodsOrder refundOrder = null)
        {
            //发送小程序模板消息给用户
            object orderData = TemplateMsg_Miniapp.GetReservationTempMsgData(reservation, msgState, refundOrder: refundOrder, refundEntOrder: refundEntOrder);

            if (orderData == null)
            {
                return(false);
            }
            TemplateMsg_Miniapp.SendTemplateMessage(reservation.UserId, msgState, (int)tmpType, orderData);
            return(true);
        }