Browse Source

奖励通知给第三方

lcl 1 week ago
parent
commit
b3932792eb
1 changed files with 17 additions and 1 deletions
  1. 17 1
      Util/PrizeDo.cs

+ 17 - 1
Util/PrizeDo.cs

@@ -1807,7 +1807,23 @@ namespace Util
                         loopAmount = getPrizeAmount;
                         if(project.requestMode == "http" && !string.IsNullOrEmpty(project.noticeUrl))
                         {
-                            Function.PostWebRequest(project.noticeUrl, prizeOutContent, "application/json");
+                            int status = -1;
+                            string noticeJson = Function.PostWebRequest(project.noticeUrl, prizeOutContent, "application/json");
+                            Function.WriteLog(noticeJson, "通知返回报文");
+                            JsonData jsonObj = JsonMapper.ToObject(noticeJson);
+                            if(jsonObj["status"].ToString() == "1")
+                            {
+                                status = 1;
+                            }
+                            Function.WriteLog(status.ToString(), "通知返回报文");
+                            var sendItem = recordService.GetFirst(m => m.prizeObjId == prizeObjectId && m.listId == sub.id && m.requestParamField == content);
+                            if(sendItem != null)
+                            {
+                                Function.WriteLog("in", "通知返回报文");
+                                sendItem.status = status;
+                                recordService.Update(sendItem);
+                                Function.WriteLog("end", "通知返回报文");
+                            }
                         }
                         else if(project.requestMode == "mq")
                         {}