Commit cf8eaec2 authored by 吴春's avatar 吴春

1

parent 52101fb5
...@@ -539,8 +539,73 @@ namespace Mall.WebApi.Controllers.AppletWeChat ...@@ -539,8 +539,73 @@ namespace Mall.WebApi.Controllers.AppletWeChat
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[HttpGet] [HttpGet]
public string EventMessageCall(int MallBaseId=0, int TenantId=0, string signature="", string echostr="", string timestamp = "", string nonce = "", string openid = "", string encrypt_type = "", string msg_signature = "") public string EventMessageCall()
{
int MallBaseId = 0;
int TenantId = 0;
string timestamp = "";
string nonce = "";
string echostr = "";
string signature = "";
string encrypt_type = "";
string msg_signature = "";
string openid = "";
try
{
signature = HttpContext.Request.Query["signature"].ToString();
}
catch (Exception ex)
{
signature = "";
LogHelper.Write(ex, "signature");
}
try
{
timestamp = HttpContext.Request.Query["timestamp"].ToString();
}
catch (Exception ex)
{
LogHelper.Write(ex, "timestamp");
timestamp = "";
}
try
{
nonce = HttpContext.Request.Query["nonce"].ToString();
}
catch (Exception ex)
{
nonce = "";
LogHelper.Write(ex, "nonce");
}
try
{
encrypt_type = HttpContext.Request.Query["encrypt_type"].ToString();
}
catch (Exception ex)
{ {
encrypt_type = "";
LogHelper.Write(ex, "encrypt_type");
}
try
{
msg_signature = HttpContext.Request.Query["msg_signature"].ToString();
}
catch (Exception ex)
{
msg_signature = "";
LogHelper.Write(ex, "msg_signature");
}
try
{
openid = HttpContext.Request.Query["openid"].ToString();
}
catch (Exception ex)
{
openid = "";
LogHelper.Write(ex, "openid");
}
LogHelper.WriteInfo($"我进来了参数如下[MallBaseId:" + MallBaseId+ "," + LogHelper.WriteInfo($"我进来了参数如下[MallBaseId:" + MallBaseId+ "," +
"TenantId:"+ TenantId + ",signature:" + signature + ",echostr:" + echostr + ",timestamp:" + timestamp + ",nonce:" + nonce + ",openid:" + openid + ",encrypt_type:" + encrypt_type + ",msg_signature:" + msg_signature ); "TenantId:"+ TenantId + ",signature:" + signature + ",echostr:" + echostr + ",timestamp:" + timestamp + ",nonce:" + nonce + ",openid:" + openid + ",encrypt_type:" + encrypt_type + ",msg_signature:" + msg_signature );
var req = new RequestHandler(); var req = new RequestHandler();
...@@ -555,10 +620,28 @@ namespace Mall.WebApi.Controllers.AppletWeChat ...@@ -555,10 +620,28 @@ namespace Mall.WebApi.Controllers.AppletWeChat
string sAppID = "wxaeb077c07ed6f30d"; string sAppID = "wxaeb077c07ed6f30d";
string sEncodingAESKey = "9FgR0wMXxe6wXBB5hwgpn2mZM6sQMi3E3Vk5sxrXEAL"; string sEncodingAESKey = "9FgR0wMXxe6wXBB5hwgpn2mZM6sQMi3E3Vk5sxrXEAL";
var request = _accessor.HttpContext.Request; var request = _accessor.HttpContext.Request;
LogHelper.Write("我是回调方法:EventMessageCall" + "请求方式:" + request.Method); LogHelper.Write("我是回调方法:EventMessageCall" + "请求方式:" + request.Method);
if (request.Method == "GET") if (request.Method == "GET")
{ {
//WXBizMsgCrypt.CheckSignature(signature, timestamp, nonce, sToken); try
{
echostr = HttpContext.Request.Query["echostr"].ToString();
}
catch (Exception ex)
{
echostr = "";
LogHelper.Write(ex, "echostr" );
}
return echostr ?? "echostr is null";
//if (WXBizMsgCrypt.CheckSignature(signature, timestamp, nonce, sToken))
//{
// return echostr ?? "echostr is null";
//}
//else
//{
// return echostr ?? "echostr is null";
//}
} }
// var inputStream = request.Body; // var inputStream = request.Body;
var str = new StreamReader(request.Body); var str = new StreamReader(request.Body);
......
...@@ -3313,6 +3313,15 @@ namespace Mall.WebApi.Controllers.TradePavilion ...@@ -3313,6 +3313,15 @@ namespace Mall.WebApi.Controllers.TradePavilion
{ {
query.Banner = ""; query.Banner = "";
} }
if (query.PropertyDemandList != null && query.PropertyDemandList.Any())
{
query.PropertyDemand = JsonConvert.SerializeObject(query.PropertyDemandList);
}
else
{
query.PropertyDemand = "";
}
query.CreateDate = System.DateTime.Now; query.CreateDate = System.DateTime.Now;
query.MallBaseId = userInfo.MallBaseId; query.MallBaseId = userInfo.MallBaseId;
query.TenantId = userInfo.TenantId; query.TenantId = userInfo.TenantId;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment