public void SendMsgRefund(Bis_Record order) { try { var SVC = new UserService(); var ConsumeRecharge = string.Empty; if (order.Type == (int)Common.Order_Type.Recharge) { ConsumeRecharge = "充值退款成功。"; } else { ConsumeRecharge = "消费退款成功。"; } /// {{first.DATA}} /// 游戏名:{{keyword1.DATA}} /// 消费金额:{{keyword2.DATA}} /// 订单号:{{keyword3.DATA}} /// 时间:{{keyword4.DATA}} /// {{remark.DATA}} var toUser = SVC.GetUserBase(order.UserID); JsApiPay.SendMsg(toUser.WeiXin_Openid, MsgConfig.Msg2, new { first = new MsgValue() { value = ConsumeRecharge }, keyword1 = new MsgValue() { value = Convert.ToString(order.Amount) + "元" }, keyword2 = new MsgValue() { value = order.OrderNo }, keyword3 = new MsgValue() { value = order.CreateTime.Value.ToString("yyyy-MM-dd") }, remark = new MsgValue() { value = "遇到任何问题您可以随时联系公众号客服。客服电话:400-618-6816" }, }); /// {{first.DATA}} /// 游戏名:{{keyword1.DATA}} /// 消费金额:{{keyword2.DATA}} /// 订单号:{{keyword3.DATA}} /// 时间:{{keyword4.DATA}} /// {{remark.DATA}} var telephone = ConfigurationManager.AppSettings["ManagerPhone"].ToString(); var baseUser = SVC.GetUserBaseByTelePhone(telephone); if (baseUser != null) { JsApiPay.SendMsg(baseUser.WeiXin_Openid, MsgConfig.Msg2, new { first = new MsgValue() { value = string.Format("用户 {0} " + ConsumeRecharge, string.IsNullOrEmpty(toUser.TelePhone) ? toUser.UserName : toUser.TelePhone) }, keyword1 = new MsgValue() { value = Convert.ToString(order.Amount) + "元" }, keyword2 = new MsgValue() { value = order.OrderNo }, keyword3 = new MsgValue() { value = order.CreateTime.Value.ToString("yyyy-MM-dd") }, remark = new MsgValue() { value = "如果对此有疑问,请联系技术人员!" }, }); } } catch (Exception ex) { MYLog.Error("发送消息通知:" + SessionTools.UserName, ex.ToString()); } }