Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
mall.oytour.com
Commits
cf8eaec2
Commit
cf8eaec2
authored
Dec 13, 2024
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
52101fb5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
94 additions
and
2 deletions
+94
-2
WeChatNotifyController.cs
...WebApi/Controllers/AppletWeChat/WeChatNotifyController.cs
+85
-2
AppletTradeController.cs
...WebApi/Controllers/TradePavilion/AppletTradeController.cs
+9
-0
No files found.
Mall.WebApi/Controllers/AppletWeChat/WeChatNotifyController.cs
View file @
cf8eaec2
...
...
@@ -539,8 +539,73 @@ namespace Mall.WebApi.Controllers.AppletWeChat
/// <returns></returns>
[
HttpPost
]
[
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
+
","
+
"TenantId:"
+
TenantId
+
",signature:"
+
signature
+
",echostr:"
+
echostr
+
",timestamp:"
+
timestamp
+
",nonce:"
+
nonce
+
",openid:"
+
openid
+
",encrypt_type:"
+
encrypt_type
+
",msg_signature:"
+
msg_signature
);
var
req
=
new
RequestHandler
();
...
...
@@ -555,10 +620,28 @@ namespace Mall.WebApi.Controllers.AppletWeChat
string
sAppID
=
"wxaeb077c07ed6f30d"
;
string
sEncodingAESKey
=
"9FgR0wMXxe6wXBB5hwgpn2mZM6sQMi3E3Vk5sxrXEAL"
;
var
request
=
_accessor
.
HttpContext
.
Request
;
LogHelper
.
Write
(
"我是回调方法:EventMessageCall"
+
"请求方式:"
+
request
.
Method
);
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
str
=
new
StreamReader
(
request
.
Body
);
...
...
Mall.WebApi/Controllers/TradePavilion/AppletTradeController.cs
View file @
cf8eaec2
...
...
@@ -3313,6 +3313,15 @@ namespace Mall.WebApi.Controllers.TradePavilion
{
query
.
Banner
=
""
;
}
if
(
query
.
PropertyDemandList
!=
null
&&
query
.
PropertyDemandList
.
Any
())
{
query
.
PropertyDemand
=
JsonConvert
.
SerializeObject
(
query
.
PropertyDemandList
);
}
else
{
query
.
PropertyDemand
=
""
;
}
query
.
CreateDate
=
System
.
DateTime
.
Now
;
query
.
MallBaseId
=
userInfo
.
MallBaseId
;
query
.
TenantId
=
userInfo
.
TenantId
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment