香堤湾 更新消息模板
This commit is contained in:
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Update="Appointment.Api.xml">
|
<None Update="Appointment.Api.xml">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Update="Appointment.Entity.xml">
|
<None Update="Appointment.Entity.xml">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Newtonsoft.Json;
|
using Google.Protobuf.WellKnownTypes;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
@@ -6,6 +7,7 @@ using System.Net;
|
|||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using System.Xml.Linq;
|
||||||
|
|
||||||
namespace Appointment.Entity
|
namespace Appointment.Entity
|
||||||
{
|
{
|
||||||
@@ -441,7 +443,7 @@ namespace Appointment.Entity
|
|||||||
}
|
}
|
||||||
StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding(encoding));
|
StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding(encoding));
|
||||||
string retString = reader.ReadToEnd();
|
string retString = reader.ReadToEnd();
|
||||||
_logger.Info("-->" + itemMsg);
|
_logger.Info("-->" + itemMsg + " response-->" + retString);
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(retString))
|
if (!string.IsNullOrWhiteSpace(retString))
|
||||||
{
|
{
|
||||||
@@ -464,5 +466,76 @@ namespace Appointment.Entity
|
|||||||
if (msg.Length > 0) _logger.Error(msg.ToString());
|
if (msg.Length > 0) _logger.Error(msg.ToString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ApiResult SendTempMsg(string msg)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string accessTokenMode = BaseConfig.App(new string[] { "AccessTokenMode" });
|
||||||
|
if (string.IsNullOrWhiteSpace(accessTokenMode))
|
||||||
|
{
|
||||||
|
_logger.Error("配置文件中未获取有效的AccessTokenMode");
|
||||||
|
return ApiResult.Failed("配置文件中未获取有效的AccessTokenMode");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取 AccessToken
|
||||||
|
string access_token = string.Empty;
|
||||||
|
for (int i = 0; i < 3; i++)
|
||||||
|
{
|
||||||
|
ApiResult<string> tokenResult = null;
|
||||||
|
if (i == 0)
|
||||||
|
{
|
||||||
|
tokenResult = accessTokenMode == "1" ? AizhuhotelGetAccesstoken() : GetAccessToken();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tokenResult = accessTokenMode == "1" ? AizhuhotelGetAccesstoken() : GetAccessToken(true);
|
||||||
|
}
|
||||||
|
if (tokenResult.IsSuccess && !string.IsNullOrEmpty(tokenResult.Info))
|
||||||
|
{
|
||||||
|
access_token = tokenResult.Info;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
Thread.Sleep(500);
|
||||||
|
}
|
||||||
|
if (string.IsNullOrWhiteSpace(access_token)) return ApiResult.Failed("未获取有效的AccessToken");
|
||||||
|
|
||||||
|
// 推送消息
|
||||||
|
var postUrl = $"https://api.weixin.qq.com/cgi-bin/message/template/send?access_token={access_token}";
|
||||||
|
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(postUrl);
|
||||||
|
request.Proxy = null;
|
||||||
|
request.Method = "POST";
|
||||||
|
request.ContentType = "application/json";
|
||||||
|
using (StreamWriter dataStream = new StreamWriter(request.GetRequestStream()))
|
||||||
|
{
|
||||||
|
dataStream.Write(msg);
|
||||||
|
dataStream.Close();
|
||||||
|
}
|
||||||
|
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
|
||||||
|
string encoding = response.ContentEncoding;
|
||||||
|
if (encoding == null || encoding.Length < 1)
|
||||||
|
{
|
||||||
|
encoding = "UTF-8"; //默认编码
|
||||||
|
}
|
||||||
|
StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding(encoding));
|
||||||
|
string retString = reader.ReadToEnd();
|
||||||
|
_logger.Info("-->" + msg + " response-->" + retString);
|
||||||
|
if (!string.IsNullOrWhiteSpace(retString))
|
||||||
|
{
|
||||||
|
var sendTemplateMsgRes = JsonConvert.DeserializeObject<SendTemplateMsgRes>(retString);
|
||||||
|
if (sendTemplateMsgRes.Errmsg.ToLower() == "ok")
|
||||||
|
{
|
||||||
|
return ApiResult.Success(string.Empty);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ApiResult.Failed(msg: "", info: retString);
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.Debug(ex.ToString());
|
||||||
|
return ApiResult.Failed(msg: "", info: ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using Google.Protobuf.WellKnownTypes;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
@@ -9,6 +10,7 @@ namespace Appointment.Entity
|
|||||||
public class WechatHelper
|
public class WechatHelper
|
||||||
{
|
{
|
||||||
private static HttpClient _HttpClient = null;
|
private static HttpClient _HttpClient = null;
|
||||||
|
static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(WechatHelper));
|
||||||
|
|
||||||
static WechatHelper()
|
static WechatHelper()
|
||||||
{
|
{
|
||||||
@@ -25,7 +27,7 @@ namespace Appointment.Entity
|
|||||||
public ApiResult<WeChatLoginRes> Code2Session(string code)
|
public ApiResult<WeChatLoginRes> Code2Session(string code)
|
||||||
{
|
{
|
||||||
string appId = BaseConfig.App(new string[] { "WeChat", "AppId" });
|
string appId = BaseConfig.App(new string[] { "WeChat", "AppId" });
|
||||||
if(string.IsNullOrWhiteSpace(appId)) ApiResult<WeChatLoginRes>.Failed("缺少配置参数 [AppId]!");
|
if (string.IsNullOrWhiteSpace(appId)) ApiResult<WeChatLoginRes>.Failed("缺少配置参数 [AppId]!");
|
||||||
string appSecret = BaseConfig.App(new string[] { "WeChat", "AppSecret" });
|
string appSecret = BaseConfig.App(new string[] { "WeChat", "AppSecret" });
|
||||||
if (string.IsNullOrWhiteSpace(appSecret)) ApiResult<WeChatLoginRes>.Failed("缺少配置参数 [AppSecret]!");
|
if (string.IsNullOrWhiteSpace(appSecret)) ApiResult<WeChatLoginRes>.Failed("缺少配置参数 [AppSecret]!");
|
||||||
|
|
||||||
@@ -40,6 +42,7 @@ namespace Appointment.Entity
|
|||||||
if (res.StatusCode == HttpStatusCode.OK)
|
if (res.StatusCode == HttpStatusCode.OK)
|
||||||
{
|
{
|
||||||
var result = Encoding.Default.GetString(res.Content.ReadAsByteArrayAsync().Result);
|
var result = Encoding.Default.GetString(res.Content.ReadAsByteArrayAsync().Result);
|
||||||
|
log.Info($"jscode2session:{result}");
|
||||||
if (string.IsNullOrWhiteSpace(result) || result.IndexOf("session_key") == -1)
|
if (string.IsNullOrWhiteSpace(result) || result.IndexOf("session_key") == -1)
|
||||||
{
|
{
|
||||||
return ApiResult<WeChatLoginRes>.Failed("调用微信接口失败,可能code已失效");
|
return ApiResult<WeChatLoginRes>.Failed("调用微信接口失败,可能code已失效");
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Update="Appointment.IRepository.xml">
|
<None Update="Appointment.IRepository.xml">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Update="Appointment.Repository.xml">
|
<None Update="Appointment.Repository.xml">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using Appointment.Entity;
|
using Appointment.Entity;
|
||||||
using Appointment.Entity.Utility;
|
using Appointment.Entity.Utility;
|
||||||
using Appointment.IRepository;
|
using Appointment.IRepository;
|
||||||
|
using Google.Protobuf.WellKnownTypes;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
@@ -1347,21 +1348,38 @@ namespace Appointment.Repository
|
|||||||
}
|
}
|
||||||
else if (AppId == "wx2b6e92e9e0c6025f") // 香堤湾
|
else if (AppId == "wx2b6e92e9e0c6025f") // 香堤湾
|
||||||
{
|
{
|
||||||
// v_IPzOm9JwAFfJdQLWy11eoHZ9CkOb4PaHbOqosGQcY
|
//---------------
|
||||||
|
// {{first.DATA}}
|
||||||
// 审核提醒
|
// 订单编号:{{OrderSn.DATA}}
|
||||||
//===========================
|
// 订单状态:{{OrderStatus.DATA}}
|
||||||
// 资料已提交,请尽快审核 {{first.DATA}}
|
// {{remark.DATA}}
|
||||||
// 审核内容:XX资料 审核内容:{{keyword1.DATA}}
|
//-----------
|
||||||
// 时间:2015-06-22 时间:{{keyword2.DATA}}
|
// 详情 >
|
||||||
// 请尽快审核 {{remark.DATA}}
|
//---------------
|
||||||
//-----------------------------
|
// 2024-09-12
|
||||||
// 详情
|
string appId = BaseConfig.App(new string[] { "WeChat", "AppId" });
|
||||||
//===========================
|
if (string.IsNullOrWhiteSpace(appId)) ApiResult<WeChatLoginRes>.Failed("缺少配置参数 [AppId]!");
|
||||||
string first = $"预定部 {loginUserRes.Info.UserName}取消了您的订单";
|
var first = $"预定部 {loginUserRes.Info.UserName}取消了您的订单";
|
||||||
var keyword = new[] { $"{summaryM.BuyerTitle}", now.ToString("yyyy-MM-dd HH:mm") };
|
var json = new
|
||||||
string remark = "请注意查看";
|
{
|
||||||
AizhuhotelHelper.SendTemplateMsg(userWxServiceId, "v_IPzOm9JwAFfJdQLWy11eoHZ9CkOb4PaHbOqosGQcY", $"pages/index/index?hotelid={Hotelid}&status=5", first, remark, keyword);
|
touser = userWxServiceId,
|
||||||
|
template_id = "21Qr9bf5k3UlxD3K6EBKjEnxrz8Djiw6TIu6yExMGLg",
|
||||||
|
miniprogram = new
|
||||||
|
{
|
||||||
|
appid = appId, // 小程序appId
|
||||||
|
pagepath = $"pages/index/index?hotelid={Hotelid}&status=5" // 跳转到小程序中的地址
|
||||||
|
},
|
||||||
|
topcolor = "#FF0000",
|
||||||
|
data = new
|
||||||
|
{
|
||||||
|
first = new { value = first },
|
||||||
|
keyword1 = new { value = summaryM.No },
|
||||||
|
keyword2 = new { value = first },
|
||||||
|
remark = new { value = "请注意查看" }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var msg = JsonConvert.SerializeObject(json);
|
||||||
|
AizhuhotelHelper.SendTempMsg(msg);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -3529,6 +3547,7 @@ namespace Appointment.Repository
|
|||||||
DateTime now = DateTime.Now;
|
DateTime now = DateTime.Now;
|
||||||
string AppId = BaseConfig.App(new string[] { "WeChatService", "AppId" });
|
string AppId = BaseConfig.App(new string[] { "WeChatService", "AppId" });
|
||||||
string Hotelid = BaseConfig.App(new string[] { "Hotelid" });
|
string Hotelid = BaseConfig.App(new string[] { "Hotelid" });
|
||||||
|
string appId = BaseConfig.App(new string[] { "WeChat", "AppId" });// 小程序的appid
|
||||||
var userAll = Db.Queryable<UcLogin>().ToList().Replace();
|
var userAll = Db.Queryable<UcLogin>().ToList().Replace();
|
||||||
var userCreate = userAll.Where(t => t.OpId == summary.UserId).FirstOrDefault();
|
var userCreate = userAll.Where(t => t.OpId == summary.UserId).FirstOrDefault();
|
||||||
if (userCreate == null) return;
|
if (userCreate == null) return;
|
||||||
@@ -3567,9 +3586,37 @@ namespace Appointment.Repository
|
|||||||
else if (AppId == "wx2b6e92e9e0c6025f") // 香堤湾
|
else if (AppId == "wx2b6e92e9e0c6025f") // 香堤湾
|
||||||
{
|
{
|
||||||
string first = $"{userCreate.OpName}提交了新的预订申请";
|
string first = $"{userCreate.OpName}提交了新的预订申请";
|
||||||
var keyword = new[] { $"{summary.BuyerTitle}", now.ToString("yyyy-MM-dd HH:mm") };
|
|
||||||
string remark = "请尽快审核";
|
string remark = "请尽快审核";
|
||||||
AizhuhotelHelper.SendTemplateMsg(usersPost.Select(t => t.WxServiceId).ToList(), "v_IPzOm9JwAFfJdQLWy11eoHZ9CkOb4PaHbOqosGQcY", $"pages/index/index?hotelid={Hotelid}&status=2", first, remark, keyword);
|
var tousers = usersPost.Select(t => t.WxServiceId).ToList();
|
||||||
|
|
||||||
|
if (tousers != null && tousers.Count > 0)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(appId)) ApiResult<WeChatLoginRes>.Failed("缺少配置参数 [AppId]!");
|
||||||
|
|
||||||
|
foreach (var touser in tousers)
|
||||||
|
{
|
||||||
|
var json = new
|
||||||
|
{
|
||||||
|
touser = touser,
|
||||||
|
template_id = "21Qr9bf5k3UlxD3K6EBKjEnxrz8Djiw6TIu6yExMGLg",
|
||||||
|
miniprogram = new
|
||||||
|
{
|
||||||
|
appid = appId, // 小程序appId
|
||||||
|
pagepath = $"pages/index/index?hotelid={Hotelid}&status=2" // 跳转到小程序中的地址
|
||||||
|
},
|
||||||
|
topcolor = "#FF0000",
|
||||||
|
data = new
|
||||||
|
{
|
||||||
|
first = new { value = first },
|
||||||
|
keyword1 = new { value = $"{summary.BuyerTitle}" },
|
||||||
|
keyword2 = new { value = first },
|
||||||
|
remark = new { value = remark }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var msg = JsonConvert.SerializeObject(json);
|
||||||
|
AizhuhotelHelper.SendTempMsg(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -3596,16 +3643,41 @@ namespace Appointment.Repository
|
|||||||
}
|
}
|
||||||
else if (AppId == "wx2b6e92e9e0c6025f") // 香堤湾
|
else if (AppId == "wx2b6e92e9e0c6025f") // 香堤湾
|
||||||
{
|
{
|
||||||
string audoter = userAll.Where(t => t.OpId == audimM.UserId).FirstOrDefault()?.OpName;
|
if (createUserOpenid != null && createUserOpenid.Count > 0)
|
||||||
string first = $"预定部{audoter}审核通过了您的预定申请";
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(appId)) ApiResult<WeChatLoginRes>.Failed("缺少配置参数 [AppId]!");
|
||||||
|
|
||||||
var keyword = new[] { $"{summary.BuyerTitle}", now.ToString("yyyy-MM-dd HH:mm") };
|
string audoter = userAll.Where(t => t.OpId == audimM.UserId).FirstOrDefault()?.OpName;
|
||||||
|
string first = $"预定部{audoter}审核通过了您的预定申请";
|
||||||
|
|
||||||
string remark = "";
|
string remark = "";
|
||||||
if (!string.IsNullOrEmpty(audimM.Remark)) remark += $"审核评语[{audimM.Remark}],";
|
if (!string.IsNullOrEmpty(audimM.Remark)) remark += $"审核评语[{audimM.Remark}],";
|
||||||
remark += "后续流程:请等待销售经理审核";
|
remark += "后续流程:请等待销售经理审核";
|
||||||
|
|
||||||
AizhuhotelHelper.SendTemplateMsg(createUserOpenid, "v_IPzOm9JwAFfJdQLWy11eoHZ9CkOb4PaHbOqosGQcY", $"pages/index/index?hotelid={Hotelid}&status=7", first, remark, keyword);
|
foreach (var createUserOpenidItem in createUserOpenid)
|
||||||
|
{
|
||||||
|
var json = new
|
||||||
|
{
|
||||||
|
touser = createUserOpenidItem,
|
||||||
|
template_id = "21Qr9bf5k3UlxD3K6EBKjEnxrz8Djiw6TIu6yExMGLg",
|
||||||
|
miniprogram = new
|
||||||
|
{
|
||||||
|
appid = appId, // 小程序appId
|
||||||
|
pagepath = $"pages/index/index?hotelid={Hotelid}&status=7" // 跳转到小程序中的地址
|
||||||
|
},
|
||||||
|
topcolor = "#FF0000",
|
||||||
|
data = new
|
||||||
|
{
|
||||||
|
first = new { value = first },
|
||||||
|
keyword1 = new { value = $"{summary.BuyerTitle}" },
|
||||||
|
keyword2 = new { value = first },
|
||||||
|
remark = new { value = remark }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var msg = JsonConvert.SerializeObject(json);
|
||||||
|
AizhuhotelHelper.SendTempMsg(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -3630,9 +3702,36 @@ namespace Appointment.Repository
|
|||||||
else if (AppId == "wx2b6e92e9e0c6025f") // 香堤湾
|
else if (AppId == "wx2b6e92e9e0c6025f") // 香堤湾
|
||||||
{
|
{
|
||||||
string first = $"{userCreate.OpName}提交了预订申请";
|
string first = $"{userCreate.OpName}提交了预订申请";
|
||||||
var keyword = new[] { $"{summary.BuyerTitle}", now.ToString("yyyy-MM-dd HH:mm") };
|
|
||||||
string remark = "请尽快审核";
|
string remark = "请尽快审核";
|
||||||
AizhuhotelHelper.SendTemplateMsg(usersPost.Select(t => t.WxServiceId).ToList(), "v_IPzOm9JwAFfJdQLWy11eoHZ9CkOb4PaHbOqosGQcY", $"pages/index/index?hotelid={Hotelid}&status=2", first, remark, keyword);
|
|
||||||
|
var tousers = usersPost.Select(t => t.WxServiceId).ToList();
|
||||||
|
if (tousers != null && tousers.Count > 0)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(appId)) ApiResult<WeChatLoginRes>.Failed("缺少配置参数 [AppId]!");
|
||||||
|
foreach (var touser in tousers)
|
||||||
|
{
|
||||||
|
var json = new
|
||||||
|
{
|
||||||
|
touser = touser,
|
||||||
|
template_id = "21Qr9bf5k3UlxD3K6EBKjEnxrz8Djiw6TIu6yExMGLg",
|
||||||
|
miniprogram = new
|
||||||
|
{
|
||||||
|
appid = appId, // 小程序appId
|
||||||
|
pagepath = $"pages/index/index?hotelid={Hotelid}&status=2" // 跳转到小程序中的地址
|
||||||
|
},
|
||||||
|
topcolor = "#FF0000",
|
||||||
|
data = new
|
||||||
|
{
|
||||||
|
first = new { value = first },
|
||||||
|
keyword1 = new { value = summary.BuyerTitle },
|
||||||
|
keyword2 = new { value = first },
|
||||||
|
remark = new { value = remark }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var msg = JsonConvert.SerializeObject(json);
|
||||||
|
AizhuhotelHelper.SendTempMsg(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -3659,16 +3758,38 @@ namespace Appointment.Repository
|
|||||||
}
|
}
|
||||||
else if (AppId == "wx2b6e92e9e0c6025f") // 香堤湾
|
else if (AppId == "wx2b6e92e9e0c6025f") // 香堤湾
|
||||||
{
|
{
|
||||||
string audoter = userAll.Where(t => t.OpId == audimM.UserId).FirstOrDefault()?.OpName;
|
if (createUserOpenid != null && createUserOpenid.Count > 0)
|
||||||
string first = $"销售经理{audoter}审核通过了您的预订申请";
|
{
|
||||||
|
string audoter = userAll.Where(t => t.OpId == audimM.UserId).FirstOrDefault()?.OpName;
|
||||||
|
string first = $"销售经理{audoter}审核通过了您的预订申请";
|
||||||
|
|
||||||
var keyword = new[] { $"{summary.BuyerTitle}", now.ToString("yyyy-MM-dd HH:mm") };
|
string remark = "";
|
||||||
|
if (!string.IsNullOrEmpty(audimM.Remark)) remark += $"审核评语[{audimM.Remark}],";
|
||||||
string remark = "";
|
remark += "后续流程:请等待财务经理审核";
|
||||||
if (!string.IsNullOrEmpty(audimM.Remark)) remark += $"审核评语[{audimM.Remark}],";
|
foreach (var item in createUserOpenid)
|
||||||
remark += "后续流程:请等待财务经理审核";
|
{
|
||||||
|
var json = new
|
||||||
AizhuhotelHelper.SendTemplateMsg(createUserOpenid, "v_IPzOm9JwAFfJdQLWy11eoHZ9CkOb4PaHbOqosGQcY", $"pages/index/index?hotelid={Hotelid}&status=7", first, remark, keyword);
|
{
|
||||||
|
touser = item,
|
||||||
|
template_id = "21Qr9bf5k3UlxD3K6EBKjEnxrz8Djiw6TIu6yExMGLg",
|
||||||
|
miniprogram = new
|
||||||
|
{
|
||||||
|
appid = appId, // 小程序appId
|
||||||
|
pagepath = $"pages/index/index?hotelid={Hotelid}&status=7" // 跳转到小程序中的地址
|
||||||
|
},
|
||||||
|
topcolor = "#FF0000",
|
||||||
|
data = new
|
||||||
|
{
|
||||||
|
first = new { value = first },
|
||||||
|
keyword1 = new { value = summary.BuyerTitle },
|
||||||
|
keyword2 = new { value = first },
|
||||||
|
remark = new { value = remark }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var msg = JsonConvert.SerializeObject(json);
|
||||||
|
AizhuhotelHelper.SendTempMsg(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -3692,10 +3813,36 @@ namespace Appointment.Repository
|
|||||||
}
|
}
|
||||||
else if (AppId == "wx2b6e92e9e0c6025f") // 香堤湾
|
else if (AppId == "wx2b6e92e9e0c6025f") // 香堤湾
|
||||||
{
|
{
|
||||||
string first = $"{userCreate.OpName}提交了预订申请";
|
var tousers = usersPost.Select(t => t.WxServiceId).ToList();
|
||||||
var keyword = new[] { $"{summary.BuyerTitle}", now.ToString("yyyy-MM-dd HH:mm") };
|
if (tousers != null && tousers.Count > 0)
|
||||||
string remark = "请尽快审核";
|
{
|
||||||
AizhuhotelHelper.SendTemplateMsg(usersPost.Select(t => t.WxServiceId).ToList(), "v_IPzOm9JwAFfJdQLWy11eoHZ9CkOb4PaHbOqosGQcY", $"pages/index/index?hotelid={Hotelid}&status=2", first, remark, keyword);
|
string first = $"{userCreate.OpName}提交了预订申请";
|
||||||
|
var keyword = new[] { $"{summary.BuyerTitle}", now.ToString("yyyy-MM-dd HH:mm") };
|
||||||
|
string remark = "请尽快审核";
|
||||||
|
foreach (var touser in tousers)
|
||||||
|
{
|
||||||
|
var json = new
|
||||||
|
{
|
||||||
|
touser = touser,
|
||||||
|
template_id = "21Qr9bf5k3UlxD3K6EBKjEnxrz8Djiw6TIu6yExMGLg",
|
||||||
|
miniprogram = new
|
||||||
|
{
|
||||||
|
appid = appId, // 小程序appId
|
||||||
|
pagepath = $"pages/index/index?hotelid={Hotelid}&status=2" // 跳转到小程序中的地址
|
||||||
|
},
|
||||||
|
topcolor = "#FF0000",
|
||||||
|
data = new
|
||||||
|
{
|
||||||
|
first = new { value = first },
|
||||||
|
keyword1 = new { value = summary.BuyerTitle },
|
||||||
|
keyword2 = new { value = first },
|
||||||
|
remark = new { value = remark }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var msg = JsonConvert.SerializeObject(json);
|
||||||
|
AizhuhotelHelper.SendTempMsg(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -3722,16 +3869,40 @@ namespace Appointment.Repository
|
|||||||
}
|
}
|
||||||
else if (AppId == "wx2b6e92e9e0c6025f") // 香堤湾
|
else if (AppId == "wx2b6e92e9e0c6025f") // 香堤湾
|
||||||
{
|
{
|
||||||
string audoter = userAll.Where(t => t.OpId == audimM.UserId).FirstOrDefault()?.OpName;
|
if (createUserOpenid != null && createUserOpenid.Count > 0)
|
||||||
string first = $"财务经理{audoter}审核通过了您的预订申请";
|
{
|
||||||
|
string audoter = userAll.Where(t => t.OpId == audimM.UserId).FirstOrDefault()?.OpName;
|
||||||
|
string first = $"财务经理{audoter}审核通过了您的预订申请";
|
||||||
|
|
||||||
var keyword = new[] { $"{summary.BuyerTitle}", now.ToString("yyyy-MM-dd HH:mm") };
|
string remark = "";
|
||||||
|
if (!string.IsNullOrEmpty(audimM.Remark)) remark += $"审核评语[{audimM.Remark}],";
|
||||||
|
remark += "后续流程:请等待财务总监审核";
|
||||||
|
foreach (var item in createUserOpenid)
|
||||||
|
{
|
||||||
|
var json = new
|
||||||
|
{
|
||||||
|
touser = item,
|
||||||
|
template_id = "21Qr9bf5k3UlxD3K6EBKjEnxrz8Djiw6TIu6yExMGLg",
|
||||||
|
miniprogram = new
|
||||||
|
{
|
||||||
|
appid = appId, // 小程序appId
|
||||||
|
pagepath = $"pages/index/index?hotelid={Hotelid}&status=7" // 跳转到小程序中的地址
|
||||||
|
},
|
||||||
|
topcolor = "#FF0000",
|
||||||
|
data = new
|
||||||
|
{
|
||||||
|
first = new { value = first },
|
||||||
|
keyword1 = new { value = summary.BuyerTitle },
|
||||||
|
keyword2 = new { value = first },
|
||||||
|
remark = new { value = remark }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var msg = JsonConvert.SerializeObject(json);
|
||||||
|
AizhuhotelHelper.SendTempMsg(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
string remark = "";
|
|
||||||
if (!string.IsNullOrEmpty(audimM.Remark)) remark += $"审核评语[{audimM.Remark}],";
|
|
||||||
remark += "后续流程:请等待财务总监审核";
|
|
||||||
|
|
||||||
AizhuhotelHelper.SendTemplateMsg(createUserOpenid, "v_IPzOm9JwAFfJdQLWy11eoHZ9CkOb4PaHbOqosGQcY", $"pages/index/index?hotelid={Hotelid}&status=7", first, remark, keyword);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -3755,10 +3926,36 @@ namespace Appointment.Repository
|
|||||||
}
|
}
|
||||||
else if (AppId == "wx2b6e92e9e0c6025f") // 香堤湾
|
else if (AppId == "wx2b6e92e9e0c6025f") // 香堤湾
|
||||||
{
|
{
|
||||||
string first = $"{userCreate.OpName}提交了预订申请";
|
|
||||||
var keyword = new[] { $"{summary.BuyerTitle}", now.ToString("yyyy-MM-dd HH:mm") };
|
var tousers = usersPost.Select(t => t.WxServiceId).ToList();
|
||||||
string remark = "请尽快审核";
|
if (tousers != null && tousers.Count > 0)
|
||||||
AizhuhotelHelper.SendTemplateMsg(usersPost.Select(t => t.WxServiceId).ToList(), "v_IPzOm9JwAFfJdQLWy11eoHZ9CkOb4PaHbOqosGQcY", $"pages/index/index?hotelid={Hotelid}&status=2", first, remark, keyword);
|
{
|
||||||
|
string first = $"{userCreate.OpName}提交了预订申请";
|
||||||
|
string remark = "请尽快审核";
|
||||||
|
foreach (var touser in tousers)
|
||||||
|
{
|
||||||
|
var json = new
|
||||||
|
{
|
||||||
|
touser = touser,
|
||||||
|
template_id = "21Qr9bf5k3UlxD3K6EBKjEnxrz8Djiw6TIu6yExMGLg",
|
||||||
|
miniprogram = new
|
||||||
|
{
|
||||||
|
appid = appId, // 小程序appId
|
||||||
|
pagepath = $"pages/index/index?hotelid={Hotelid}&status=2" // 跳转到小程序中的地址
|
||||||
|
},
|
||||||
|
topcolor = "#FF0000",
|
||||||
|
data = new
|
||||||
|
{
|
||||||
|
first = new { value = first },
|
||||||
|
keyword1 = new { value = summary.BuyerTitle },
|
||||||
|
keyword2 = new { value = first },
|
||||||
|
remark = new { value = remark }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var msg = JsonConvert.SerializeObject(json);
|
||||||
|
AizhuhotelHelper.SendTempMsg(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -3785,16 +3982,39 @@ namespace Appointment.Repository
|
|||||||
}
|
}
|
||||||
else if (AppId == "wx2b6e92e9e0c6025f") // 香堤湾
|
else if (AppId == "wx2b6e92e9e0c6025f") // 香堤湾
|
||||||
{
|
{
|
||||||
string audoter = userAll.Where(t => t.OpId == audimM.UserId).FirstOrDefault()?.OpName;
|
if (createUserOpenid != null && createUserOpenid.Count > 0)
|
||||||
string first = $"财务总监{audoter}审核通过了您的预订申请";
|
{
|
||||||
|
string audoter = userAll.Where(t => t.OpId == audimM.UserId).FirstOrDefault()?.OpName;
|
||||||
|
string first = $"财务总监{audoter}审核通过了您的预订申请";
|
||||||
|
|
||||||
var keyword = new[] { $"{summary.BuyerTitle}", now.ToString("yyyy-MM-dd HH:mm") };
|
string remark = "";
|
||||||
|
if (!string.IsNullOrEmpty(audimM.Remark)) remark += $"审核评语[{audimM.Remark}],";
|
||||||
|
remark += "后续流程:请等待总经理审核";
|
||||||
|
|
||||||
string remark = "";
|
foreach (var item in createUserOpenid)
|
||||||
if (!string.IsNullOrEmpty(audimM.Remark)) remark += $"审核评语[{audimM.Remark}],";
|
{
|
||||||
remark += "后续流程:请等待总经理审核";
|
var json = new
|
||||||
|
{
|
||||||
AizhuhotelHelper.SendTemplateMsg(createUserOpenid, "v_IPzOm9JwAFfJdQLWy11eoHZ9CkOb4PaHbOqosGQcY", $"pages/index/index?hotelid={Hotelid}&status=7", first, remark, keyword);
|
touser = item,
|
||||||
|
template_id = "21Qr9bf5k3UlxD3K6EBKjEnxrz8Djiw6TIu6yExMGLg",
|
||||||
|
miniprogram = new
|
||||||
|
{
|
||||||
|
appid = appId, // 小程序appId
|
||||||
|
pagepath = $"pages/index/index?hotelid={Hotelid}&status=7" // 跳转到小程序中的地址
|
||||||
|
},
|
||||||
|
topcolor = "#FF0000",
|
||||||
|
data = new
|
||||||
|
{
|
||||||
|
first = new { value = first },
|
||||||
|
keyword1 = new { value = summary.BuyerTitle },
|
||||||
|
keyword2 = new { value = first },
|
||||||
|
remark = new { value = remark }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var msg = JsonConvert.SerializeObject(json);
|
||||||
|
AizhuhotelHelper.SendTempMsg(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -3818,10 +4038,37 @@ namespace Appointment.Repository
|
|||||||
}
|
}
|
||||||
else if (AppId == "wx2b6e92e9e0c6025f") // 香堤湾
|
else if (AppId == "wx2b6e92e9e0c6025f") // 香堤湾
|
||||||
{
|
{
|
||||||
string first = $"{userCreate.OpName}提交了预订申请";
|
var tousers = usersPost.Select(t => t.WxServiceId).ToList();
|
||||||
var keyword = new[] { $"{summary.BuyerTitle}", now.ToString("yyyy-MM-dd HH:mm") };
|
if (tousers != null && tousers.Count > 0)
|
||||||
string remark = "请尽快审核";
|
{
|
||||||
AizhuhotelHelper.SendTemplateMsg(usersPost.Select(t => t.WxServiceId).ToList(), "v_IPzOm9JwAFfJdQLWy11eoHZ9CkOb4PaHbOqosGQcY", $"pages/index/index?hotelid={Hotelid}&status=2", first, remark, keyword);
|
string first = $"{userCreate.OpName}提交了预订申请";
|
||||||
|
var keyword = new[] { $"{summary.BuyerTitle}", now.ToString("yyyy-MM-dd HH:mm") };
|
||||||
|
string remark = "请尽快审核";
|
||||||
|
|
||||||
|
foreach (var touser in tousers)
|
||||||
|
{
|
||||||
|
var json = new
|
||||||
|
{
|
||||||
|
touser = touser,
|
||||||
|
template_id = "21Qr9bf5k3UlxD3K6EBKjEnxrz8Djiw6TIu6yExMGLg",
|
||||||
|
miniprogram = new
|
||||||
|
{
|
||||||
|
appid = appId, // 小程序appId
|
||||||
|
pagepath = $"pages/index/index?hotelid={Hotelid}&status=2" // 跳转到小程序中的地址
|
||||||
|
},
|
||||||
|
topcolor = "#FF0000",
|
||||||
|
data = new
|
||||||
|
{
|
||||||
|
first = new { value = first },
|
||||||
|
keyword1 = new { value = summary.BuyerTitle },
|
||||||
|
keyword2 = new { value = first },
|
||||||
|
remark = new { value = remark }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var msg = JsonConvert.SerializeObject(json);
|
||||||
|
AizhuhotelHelper.SendTempMsg(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -3848,16 +4095,39 @@ namespace Appointment.Repository
|
|||||||
}
|
}
|
||||||
else if (AppId == "wx2b6e92e9e0c6025f") // 香堤湾
|
else if (AppId == "wx2b6e92e9e0c6025f") // 香堤湾
|
||||||
{
|
{
|
||||||
string audoter = userAll.Where(t => t.OpId == audimM.UserId).FirstOrDefault()?.OpName;
|
if (createUserOpenid != null && createUserOpenid.Count > 0)
|
||||||
string first = $"总经理{audoter}审核通过了您的预订申请";
|
{
|
||||||
|
string audoter = userAll.Where(t => t.OpId == audimM.UserId).FirstOrDefault()?.OpName;
|
||||||
|
string first = $"总经理{audoter}审核通过了您的预订申请";
|
||||||
|
string remark = "";
|
||||||
|
if (!string.IsNullOrEmpty(audimM.Remark)) remark += $"审核评语[{audimM.Remark}],";
|
||||||
|
remark += "后续流程:请团队来临前生成完成单,以便触发消息推送给相关人员";
|
||||||
|
|
||||||
var keyword = new[] { $"{summary.BuyerTitle}", now.ToString("yyyy-MM-dd HH:mm") };
|
foreach (var item in createUserOpenid)
|
||||||
|
{
|
||||||
|
var json = new
|
||||||
|
{
|
||||||
|
touser = item,
|
||||||
|
template_id = "21Qr9bf5k3UlxD3K6EBKjEnxrz8Djiw6TIu6yExMGLg",
|
||||||
|
miniprogram = new
|
||||||
|
{
|
||||||
|
appid = appId, // 小程序appId
|
||||||
|
pagepath = $"pages/index/index?hotelid={Hotelid}&status=8" // 跳转到小程序中的地址
|
||||||
|
},
|
||||||
|
topcolor = "#FF0000",
|
||||||
|
data = new
|
||||||
|
{
|
||||||
|
first = new { value = first },
|
||||||
|
keyword1 = new { value = summary.BuyerTitle },
|
||||||
|
keyword2 = new { value = first },
|
||||||
|
remark = new { value = remark }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var msg = JsonConvert.SerializeObject(json);
|
||||||
|
AizhuhotelHelper.SendTempMsg(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
string remark = "";
|
|
||||||
if (!string.IsNullOrEmpty(audimM.Remark)) remark += $"审核评语[{audimM.Remark}],";
|
|
||||||
remark += "后续流程:请团队来临前生成完成单,以便触发消息推送给相关人员";
|
|
||||||
|
|
||||||
AizhuhotelHelper.SendTemplateMsg(createUserOpenid, "v_IPzOm9JwAFfJdQLWy11eoHZ9CkOb4PaHbOqosGQcY", $"pages/index/index?hotelid={Hotelid}&status=8", first, remark, keyword);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -3909,43 +4179,64 @@ namespace Appointment.Repository
|
|||||||
}
|
}
|
||||||
else if (AppId == "wx2b6e92e9e0c6025f") // 香堤湾
|
else if (AppId == "wx2b6e92e9e0c6025f") // 香堤湾
|
||||||
{
|
{
|
||||||
// 获取驳回前最后一条审核记录以推理驳回人的角色
|
if (createUserOpenid != null && createUserOpenid.Count > 0)
|
||||||
// 因为驳回即发送信息,不做严谨判断了
|
|
||||||
var _audimM = Db.Queryable<ApptAuditLog>().Where(t => t.ApptId == summary.Id && t.Type == 1 && t.Id != audimM.Id).OrderBy(t => t.Id, OrderByType.Desc).First();
|
|
||||||
string zw = "";
|
|
||||||
|
|
||||||
switch ((EnumAuditorJncStatus)_audimM.AuditorStatus)
|
|
||||||
{
|
{
|
||||||
case EnumAuditorJncStatus.审核单申请:
|
// 获取驳回前最后一条审核记录以推理驳回人的角色
|
||||||
zw = "预定部";
|
// 因为驳回即发送信息,不做严谨判断了
|
||||||
break;
|
var _audimM = Db.Queryable<ApptAuditLog>().Where(t => t.ApptId == summary.Id && t.Type == 1 && t.Id != audimM.Id).OrderBy(t => t.Id, OrderByType.Desc).First();
|
||||||
case EnumAuditorJncStatus.审核单预定部:
|
string zw = "";
|
||||||
zw = "销售经理";
|
|
||||||
break;
|
switch ((EnumAuditorJncStatus)_audimM.AuditorStatus)
|
||||||
case EnumAuditorJncStatus.审核单销售经理:
|
{
|
||||||
zw = "财务经理";
|
case EnumAuditorJncStatus.审核单申请:
|
||||||
break;
|
zw = "预定部";
|
||||||
case EnumAuditorJncStatus.审核单财务经理:
|
break;
|
||||||
zw = "财务总监";
|
case EnumAuditorJncStatus.审核单预定部:
|
||||||
break;
|
zw = "销售经理";
|
||||||
case EnumAuditorJncStatus.审核单财务总监:
|
break;
|
||||||
zw = "总经理";
|
case EnumAuditorJncStatus.审核单销售经理:
|
||||||
break;
|
zw = "财务经理";
|
||||||
default:
|
break;
|
||||||
break;
|
case EnumAuditorJncStatus.审核单财务经理:
|
||||||
|
zw = "财务总监";
|
||||||
|
break;
|
||||||
|
case EnumAuditorJncStatus.审核单财务总监:
|
||||||
|
zw = "总经理";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
string audoter = userAll.Where(t => t.OpId == audimM.UserId).FirstOrDefault()?.OpName;
|
||||||
|
var first = $"{zw}{audoter}驳回了您的预订申请";
|
||||||
|
string remark = "";
|
||||||
|
if (!string.IsNullOrEmpty(audimM.Remark)) remark += $"驳回评语[{audimM.Remark}],";
|
||||||
|
remark += "后续流程:请核对信息进行修改后重新提交";
|
||||||
|
|
||||||
|
foreach (var item in createUserOpenid)
|
||||||
|
{
|
||||||
|
var json = new
|
||||||
|
{
|
||||||
|
touser = item,
|
||||||
|
template_id = "21Qr9bf5k3UlxD3K6EBKjEnxrz8Djiw6TIu6yExMGLg",
|
||||||
|
miniprogram = new
|
||||||
|
{
|
||||||
|
appid = appId, // 小程序appId
|
||||||
|
pagepath = $"pages/index/index?hotelid={Hotelid}&status=4" // 跳转到小程序中的地址
|
||||||
|
},
|
||||||
|
topcolor = "#FF0000",
|
||||||
|
data = new
|
||||||
|
{
|
||||||
|
first = new { value = first },
|
||||||
|
keyword1 = new { value = summary.BuyerTitle },
|
||||||
|
keyword2 = new { value = first },
|
||||||
|
remark = new { value = remark }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var msg = JsonConvert.SerializeObject(json);
|
||||||
|
AizhuhotelHelper.SendTempMsg(msg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
string audoter = userAll.Where(t => t.OpId == audimM.UserId).FirstOrDefault()?.OpName;
|
|
||||||
var first = $"{zw}{audoter}驳回了您的预订申请";
|
|
||||||
|
|
||||||
|
|
||||||
var keyword = new[] { $"{summary.BuyerTitle}", now.ToString("yyyy-MM-dd HH:mm") };
|
|
||||||
|
|
||||||
string remark = "";
|
|
||||||
if (!string.IsNullOrEmpty(audimM.Remark)) remark += $"驳回评语[{audimM.Remark}],";
|
|
||||||
remark += "后续流程:请核对信息进行修改后重新提交";
|
|
||||||
|
|
||||||
AizhuhotelHelper.SendTemplateMsg(createUserOpenid, "v_IPzOm9JwAFfJdQLWy11eoHZ9CkOb4PaHbOqosGQcY", $"pages/index/index?hotelid={Hotelid}&status=4", first, remark, keyword);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -3975,6 +4266,8 @@ namespace Appointment.Repository
|
|||||||
DateTime now = DateTime.Now;
|
DateTime now = DateTime.Now;
|
||||||
string AppId = BaseConfig.App(new string[] { "WeChatService", "AppId" });
|
string AppId = BaseConfig.App(new string[] { "WeChatService", "AppId" });
|
||||||
string Hotelid = BaseConfig.App(new string[] { "Hotelid" });
|
string Hotelid = BaseConfig.App(new string[] { "Hotelid" });
|
||||||
|
string appId = BaseConfig.App(new string[] { "WeChat", "AppId" });
|
||||||
|
if (string.IsNullOrWhiteSpace(appId)) ApiResult<WeChatLoginRes>.Failed("缺少配置参数 [AppId]!");
|
||||||
if (AppId == "wx3f193488e04b2ed8")
|
if (AppId == "wx3f193488e04b2ed8")
|
||||||
{
|
{
|
||||||
string first = "";
|
string first = "";
|
||||||
@@ -4023,11 +4316,26 @@ namespace Appointment.Repository
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
msgremark += "请关注订单信息";
|
msgremark += "请关注订单信息";
|
||||||
|
var json = new
|
||||||
var keyword = new[] { $"{buyerTitle}", now.ToString("yyyy-MM-dd HH:mm") };
|
{
|
||||||
|
touser = wxSericeOpenId,
|
||||||
|
template_id = "21Qr9bf5k3UlxD3K6EBKjEnxrz8Djiw6TIu6yExMGLg",
|
||||||
AizhuhotelHelper.SendTemplateMsg(wxSericeOpenId, "v_IPzOm9JwAFfJdQLWy11eoHZ9CkOb4PaHbOqosGQcY", $"pages/index/index?hotelid={Hotelid}&status=6", first, msgremark, keyword);
|
miniprogram = new
|
||||||
|
{
|
||||||
|
appid = appId, // 小程序appId
|
||||||
|
pagepath = $"pages/index/index?hotelid={Hotelid}&status=6" // 跳转到小程序中的地址
|
||||||
|
},
|
||||||
|
topcolor = "#FF0000",
|
||||||
|
data = new
|
||||||
|
{
|
||||||
|
first = new { value = first },
|
||||||
|
keyword1 = new { value = buyerTitle },
|
||||||
|
keyword2 = new { value = first },
|
||||||
|
remark = new { value = msgremark }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var msg = JsonConvert.SerializeObject(json);
|
||||||
|
AizhuhotelHelper.SendTempMsg(msg);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user