|
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|
|
using System.Threading;
|
|
|
using System.Threading.Tasks;
|
|
|
using System.Linq;
|
|
|
+using System.Data;
|
|
|
using Microsoft.Extensions.Hosting;
|
|
|
using MySystem;
|
|
|
using MySystem.Models;
|
|
@@ -28,16 +29,22 @@ public class HaoDaExtQueryHelper
|
|
|
{
|
|
|
while (true)
|
|
|
{
|
|
|
- string content = RedisDbconn.Instance.RPop<string>("WeChatResultForHaoDaQueue");
|
|
|
- if (!string.IsNullOrEmpty(content))
|
|
|
+ // string content = RedisDbconn.Instance.RPop<string>("WeChatResultForHaoDaQueue");
|
|
|
+ // if (!string.IsNullOrEmpty(content))
|
|
|
+ // {
|
|
|
+ // JsonData json = JsonMapper.ToObject(content);
|
|
|
+ // WeChatAddInfo(int.Parse(json["MerchantId"].ToString()), json["ApplymentId"].ToString());
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // Thread.Sleep(10000);
|
|
|
+ // }
|
|
|
+ DataTable dt = CustomerSqlConn.dtable("select Id,ApplymentId from MerchantAddInfo where HdStatus=3 and `Status`=0 and ApplymentId!='' and ApplymentId is not null", AppConfig.Base.SqlConnStr);
|
|
|
+ foreach(DataRow dr in dt.Rows)
|
|
|
{
|
|
|
- JsonData json = JsonMapper.ToObject(content);
|
|
|
- WeChatAddInfo(int.Parse(json["MerchantId"].ToString()), json["ApplymentId"].ToString());
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- Thread.Sleep(10000);
|
|
|
+ WeChatAddInfo(int.Parse(dr["Id"].ToString()), dr["ApplymentId"].ToString());
|
|
|
}
|
|
|
+ Thread.Sleep(60000);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -84,12 +91,12 @@ public class HaoDaExtQueryHelper
|
|
|
LogHelper.Instance.WriteLog("start1end", "查询微信商户意愿申请状态");
|
|
|
db.SaveChanges();
|
|
|
}
|
|
|
- else
|
|
|
- {
|
|
|
- LogHelper.Instance.WriteLog("starte", "查询微信商户意愿申请状态");
|
|
|
- RedisDbconn.Instance.AddList("WeChatResultForHaoDaQueue", "{\"MerchantId\":\"" + Id + "\",\"ApplymentId\":\"" + ApplymentId + "\"}");
|
|
|
- LogHelper.Instance.WriteLog("start2end", "查询微信商户意愿申请状态");
|
|
|
- }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // LogHelper.Instance.WriteLog("starte", "查询微信商户意愿申请状态");
|
|
|
+ // RedisDbconn.Instance.AddList("WeChatResultForHaoDaQueue", "{\"MerchantId\":\"" + Id + "\",\"ApplymentId\":\"" + ApplymentId + "\"}");
|
|
|
+ // LogHelper.Instance.WriteLog("start2end", "查询微信商户意愿申请状态");
|
|
|
+ // }
|
|
|
db.Dispose();
|
|
|
}
|
|
|
catch (Exception ex)
|
|
@@ -111,16 +118,22 @@ public class HaoDaExtQueryHelper
|
|
|
{
|
|
|
while (true)
|
|
|
{
|
|
|
- string content = RedisDbconn.Instance.RPop<string>("AlipayResultForHaoDaQueue");
|
|
|
- if (!string.IsNullOrEmpty(content))
|
|
|
+ // string content = RedisDbconn.Instance.RPop<string>("AlipayResultForHaoDaQueue");
|
|
|
+ // if (!string.IsNullOrEmpty(content))
|
|
|
+ // {
|
|
|
+ // JsonData json = JsonMapper.ToObject(content);
|
|
|
+ // AlipayAddInfo(int.Parse(json["MerchantId"].ToString()), json["order_no"].ToString());
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // Thread.Sleep(10000);
|
|
|
+ // }
|
|
|
+ DataTable dt = CustomerSqlConn.dtable("select Id,SeoTitle from MerchantAddInfo where HdStatus=3 and `QueryCount`=0 and SeoTitle!='' and SeoTitle is not null", AppConfig.Base.SqlConnStr);
|
|
|
+ foreach(DataRow dr in dt.Rows)
|
|
|
{
|
|
|
- JsonData json = JsonMapper.ToObject(content);
|
|
|
- AlipayAddInfo(int.Parse(json["MerchantId"].ToString()), json["order_no"].ToString());
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- Thread.Sleep(10000);
|
|
|
+ AlipayAddInfo(int.Parse(dr["Id"].ToString()), dr["SeoTitle"].ToString());
|
|
|
}
|
|
|
+ Thread.Sleep(60000);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -192,10 +205,10 @@ public class HaoDaExtQueryHelper
|
|
|
LogHelper.Instance.WriteLog("start2end", "查询支付宝商户意愿申请状态");
|
|
|
db.SaveChanges();
|
|
|
}
|
|
|
- else
|
|
|
- {
|
|
|
- RedisDbconn.Instance.AddList("AlipayResultForHaoDaQueue", "{\"MerchantId\":\"" + Id + "\",\"order_no\":\"" + OrderNo + "\"}");
|
|
|
- }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // RedisDbconn.Instance.AddList("AlipayResultForHaoDaQueue", "{\"MerchantId\":\"" + Id + "\",\"order_no\":\"" + OrderNo + "\"}");
|
|
|
+ // }
|
|
|
}
|
|
|
else
|
|
|
{
|