|
|
@@ -31,7 +31,24 @@ namespace MySystem
|
|
|
PxcModels.WebCMSEntities db = new PxcModels.WebCMSEntities();
|
|
|
DateTime start = DateTime.Now.AddDays(-10);
|
|
|
int StartId = int.Parse(function.CheckInt(function.ReadInstance("/SycnSp/TradeRecordId.txt")));
|
|
|
- IQueryable<TradeRecord> trades = spdb.TradeRecord.Where(m => m.Id >= StartId && m.CreateDate >= start && m.Status == 1).OrderBy(m => m.CreateDate);
|
|
|
+ // IQueryable<TradeRecord> trades = spdb.TradeRecord.Where(m => m.Id >= StartId && m.CreateDate >= start && m.Status == 1).OrderBy(m => m.CreateDate);
|
|
|
+ List<TradeRecord> trades = new List<TradeRecord>();
|
|
|
+ trades.Add(new TradeRecord()
|
|
|
+ {
|
|
|
+ ProductType = "10",
|
|
|
+ Field2 = "620522****0017",
|
|
|
+ Field1 = "199****5853",
|
|
|
+ DigAmt = 0.00M,
|
|
|
+ SerEntryMode = "0",
|
|
|
+ BankCardType = "01",
|
|
|
+ TradeType = "M015",
|
|
|
+ TradeAmount = 1000M,
|
|
|
+ TradeSnNo = "0000320226624650120068",
|
|
|
+ TradeSerialNo = "23032117055533128544",
|
|
|
+ MerName = "王**",
|
|
|
+ MerNo = "110000004032435",
|
|
|
+ CreateDate = DateTime.Parse("2023-03-21 17:05:55.0"),
|
|
|
+ });
|
|
|
foreach (TradeRecord trade in trades.ToList())
|
|
|
{
|
|
|
bool op = true;
|
|
|
@@ -201,7 +218,19 @@ namespace MySystem
|
|
|
BankCardType = 0;
|
|
|
}
|
|
|
if (trade.TradeType == "F010") QrPayFlag = 1;
|
|
|
-
|
|
|
+ PxcModels.PosMerchantInfo merchant = db.PosMerchantInfo.FirstOrDefault(m => m.Id == pos.BindMerchantId);
|
|
|
+ if(merchant != null)
|
|
|
+ {
|
|
|
+ if(string.IsNullOrEmpty(merchant.MerIdcardNo) && !string.IsNullOrEmpty(trade.Field2))
|
|
|
+ {
|
|
|
+ merchant.MerIdcardNo = trade.Field2; //商户身份证号
|
|
|
+ }
|
|
|
+ if(!string.IsNullOrEmpty(trade.Field1))
|
|
|
+ {
|
|
|
+ merchant.MerchantMobile = trade.Field1; //商户手机号
|
|
|
+ }
|
|
|
+ db.SaveChanges();
|
|
|
+ }
|
|
|
}
|
|
|
int BrandId = pos.BrandId;
|
|
|
// int BrandId = int.Parse(trade.ProductType);
|
|
|
@@ -233,7 +262,8 @@ namespace MySystem
|
|
|
}
|
|
|
else if (DepositAmt > 0 && pos.IsFirst == 1)
|
|
|
{
|
|
|
- int Days = int.Parse(RedisDbconn.Instance.Get<string>("pobjrule:" + pos.BrandId + ":HelpPolicy:Days")); //天数
|
|
|
+ string DayString = RedisDbconn.Instance.Get<string>("pobjrule:" + pos.BrandId + ":HelpPolicy:Days");
|
|
|
+ int Days = int.Parse(DayString); //天数
|
|
|
if (pos.BindingTime != null)
|
|
|
{
|
|
|
if (pos.BindingTime.Value.AddDays(Days) > DateTime.Now)
|
|
|
@@ -242,6 +272,10 @@ namespace MySystem
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if((pos.BrandId == 10 || pos.BrandId == 11) && trade.TradeType == "T015" && MerHelpFlag == 1)
|
|
|
+ {
|
|
|
+ MerHelpFlag = 0;
|
|
|
+ }
|
|
|
int CapFlag = 0;
|
|
|
if(BankCardType == 0 && TradeAmount >= 1666.67M)
|
|
|
{
|
|
|
@@ -287,7 +321,7 @@ namespace MySystem
|
|
|
{
|
|
|
CheckMoney = 5000;
|
|
|
}
|
|
|
- if (BankCardType == 1 || (BankCardType == 2 && pos.BrandId == 1) || (BankCardType == 2 && pos.BrandId == 3))
|
|
|
+ if (BankCardType == 1 || (BankCardType == 2 && pos.BrandId == 1) || (BankCardType == 2 && pos.BrandId == 3) || (BankCardType == 1 && trade.TradeType == "M015" && (pos.BrandId == 10 || pos.BrandId == 11)))
|
|
|
{
|
|
|
pos.CreditTrade += SourceTradeAmount;
|
|
|
}
|
|
|
@@ -305,11 +339,6 @@ namespace MySystem
|
|
|
{
|
|
|
merchant.ActiveStatus = 1;
|
|
|
merchant.MerStandardDate = DateTime.Now;
|
|
|
- if((pos.BrandId == 10 || pos.BrandId == 11) && string.IsNullOrEmpty(merchant.MerIdcardNo))
|
|
|
- {
|
|
|
- merchant.MerIdcardNo = trade.Field2; //商户身份证号
|
|
|
- merchant.MerchantMobile = trade.Field1; //商户手机号
|
|
|
- }
|
|
|
db.SaveChanges();
|
|
|
|
|
|
// 推荐王逻辑(激活)
|
|
|
@@ -317,7 +346,10 @@ namespace MySystem
|
|
|
RedisDbconn.Instance.AddList("RecommendActStatQueue", SendData);
|
|
|
|
|
|
//发放开机奖励
|
|
|
- RedisDbconn.Instance.AddList("OpenRewardQueue", pos.Id.ToString());
|
|
|
+ if(pos.IsFirst == 1)
|
|
|
+ {
|
|
|
+ RedisDbconn.Instance.AddList("OpenRewardQueue", pos.Id.ToString());
|
|
|
+ }
|
|
|
}
|
|
|
//发放大盟主奖励
|
|
|
if(pos.LeaderUserId > 0)
|