|
@@ -312,6 +312,7 @@ namespace MySystem
|
|
|
}
|
|
}
|
|
|
db.Dispose();
|
|
db.Dispose();
|
|
|
}
|
|
}
|
|
|
|
|
+ //金控活动机返奖励
|
|
|
private void doJk30(WebCMSEntities db, PosMachinesTwo pos, PosMerchantInfo merchant, int GetUserId, string ParentNav, int TopUserId)
|
|
private void doJk30(WebCMSEntities db, PosMachinesTwo pos, PosMerchantInfo merchant, int GetUserId, string ParentNav, int TopUserId)
|
|
|
{
|
|
{
|
|
|
DateTime check = DateTime.Parse("2022-06-01 00:00:00");
|
|
DateTime check = DateTime.Parse("2022-06-01 00:00:00");
|
|
@@ -336,6 +337,8 @@ namespace MySystem
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ //无押金激活奖励
|
|
|
public void activePrizeWithoutDeposit(int posid = 0)
|
|
public void activePrizeWithoutDeposit(int posid = 0)
|
|
|
{
|
|
{
|
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
@@ -366,12 +369,17 @@ namespace MySystem
|
|
|
{
|
|
{
|
|
|
TopUserId = int.Parse(ParentNav.Trim(',').Replace(",,", ",").Split(',')[0]);
|
|
TopUserId = int.Parse(ParentNav.Trim(',').Replace(",,", ",").Split(',')[0]);
|
|
|
}
|
|
}
|
|
|
- if(pos.BrandId == 6)
|
|
|
|
|
|
|
+ if(pos.BrandId == 6) //首台无押金机返50
|
|
|
|
|
+ {
|
|
|
|
|
+ doActiveReward(db, merchant, pos, GetUserId, ParentNav, TopUserId, 50);
|
|
|
|
|
+ }
|
|
|
|
|
+ else if((pos.BrandId == 10 || pos.BrandId == 11) && pos.IsFirst == 1) //首台无押金机返50
|
|
|
{
|
|
{
|
|
|
doActiveReward(db, merchant, pos, GetUserId, ParentNav, TopUserId, 50);
|
|
doActiveReward(db, merchant, pos, GetUserId, ParentNav, TopUserId, 50);
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
|
|
+ //金控活动机返奖励
|
|
|
doJk30(db, pos, merchant, GetUserId, ParentNav, TopUserId);
|
|
doJk30(db, pos, merchant, GetUserId, ParentNav, TopUserId);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1376,11 +1384,11 @@ namespace MySystem
|
|
|
}
|
|
}
|
|
|
public void CheckFluxForTrade()
|
|
public void CheckFluxForTrade()
|
|
|
{
|
|
{
|
|
|
- function.WriteLog(DateTime.Now.ToString(), "扫描金控交易记录中的流量费");
|
|
|
|
|
|
|
+ function.WriteLog(DateTime.Now.ToString(), "扫描交易记录中的流量费");
|
|
|
SpModels.WebCMSEntities spdb = new SpModels.WebCMSEntities();
|
|
SpModels.WebCMSEntities spdb = new SpModels.WebCMSEntities();
|
|
|
DateTime start = DateTime.Now.AddDays(-1);
|
|
DateTime start = DateTime.Now.AddDays(-1);
|
|
|
int StartId = int.Parse(function.CheckInt(function.ReadInstance("/SycnSp/TradeRecordId.txt")));
|
|
int StartId = int.Parse(function.CheckInt(function.ReadInstance("/SycnSp/TradeRecordId.txt")));
|
|
|
- var list = spdb.TradeRecord.Select(m => new { m.Id, m.CreateDate, m.ProductType, m.Status }).Where(m => m.Id >= StartId && m.Status == 2 && m.CreateDate > start && m.ProductType == "1").OrderBy(m => m.CreateDate);
|
|
|
|
|
|
|
+ var list = spdb.TradeRecord.Select(m => new { m.Id, m.CreateDate, m.ProductType, m.Status }).Where(m => m.Id >= StartId && m.Status == 2 && m.CreateDate > start && (m.ProductType == "1" || m.ProductType == "10")).OrderBy(m => m.CreateDate);
|
|
|
foreach (var sub in list.ToList())
|
|
foreach (var sub in list.ToList())
|
|
|
{
|
|
{
|
|
|
try
|
|
try
|
|
@@ -1388,18 +1396,38 @@ namespace MySystem
|
|
|
SpModels.TradeRecord trade = spdb.TradeRecord.FirstOrDefault(m => m.Id == sub.Id);
|
|
SpModels.TradeRecord trade = spdb.TradeRecord.FirstOrDefault(m => m.Id == sub.Id);
|
|
|
if (trade != null)
|
|
if (trade != null)
|
|
|
{
|
|
{
|
|
|
- string content = trade.SeoDescription;
|
|
|
|
|
- if (!string.IsNullOrEmpty(content))
|
|
|
|
|
|
|
+ if(trade.ProductType == "1") //金控
|
|
|
|
|
+ {
|
|
|
|
|
+ string content = trade.SeoDescription;
|
|
|
|
|
+ if (!string.IsNullOrEmpty(content))
|
|
|
|
|
+ {
|
|
|
|
|
+ content = System.Web.HttpUtility.UrlDecode(content);
|
|
|
|
|
+ JsonData jsonObj = JsonMapper.ToObject(content);
|
|
|
|
|
+ decimal terminalDataFlowFee = decimal.Parse(function.CheckNum(jsonObj["terminalDataFlowFee"].ToString()));
|
|
|
|
|
+ if (terminalDataFlowFee > 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ spdb.TradeFluxRecord.Add(new SpModels.TradeFluxRecord()
|
|
|
|
|
+ {
|
|
|
|
|
+ SeoDescription = trade.TradeSerialNo,
|
|
|
|
|
+ FeeAmount = terminalDataFlowFee,
|
|
|
|
|
+ TradeSerialNo = function.MD5_16(trade.TradeSerialNo),
|
|
|
|
|
+ CreateDate = trade.CreateDate,
|
|
|
|
|
+ TradeSnNo = trade.TradeSnNo,
|
|
|
|
|
+ ProductType = trade.ProductType,
|
|
|
|
|
+ Status = 1,
|
|
|
|
|
+ });
|
|
|
|
|
+ spdb.SaveChanges();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ else if(trade.ProductType == "10") //联动
|
|
|
{
|
|
{
|
|
|
- content = System.Web.HttpUtility.UrlDecode(content);
|
|
|
|
|
- JsonData jsonObj = JsonMapper.ToObject(content);
|
|
|
|
|
- decimal terminalDataFlowFee = decimal.Parse(function.CheckNum(jsonObj["terminalDataFlowFee"].ToString()));
|
|
|
|
|
- if (terminalDataFlowFee > 0)
|
|
|
|
|
|
|
+ if (trade.DigAmt > 0)
|
|
|
{
|
|
{
|
|
|
spdb.TradeFluxRecord.Add(new SpModels.TradeFluxRecord()
|
|
spdb.TradeFluxRecord.Add(new SpModels.TradeFluxRecord()
|
|
|
{
|
|
{
|
|
|
SeoDescription = trade.TradeSerialNo,
|
|
SeoDescription = trade.TradeSerialNo,
|
|
|
- FeeAmount = terminalDataFlowFee,
|
|
|
|
|
|
|
+ FeeAmount = trade.DigAmt,
|
|
|
TradeSerialNo = function.MD5_16(trade.TradeSerialNo),
|
|
TradeSerialNo = function.MD5_16(trade.TradeSerialNo),
|
|
|
CreateDate = trade.CreateDate,
|
|
CreateDate = trade.CreateDate,
|
|
|
TradeSnNo = trade.TradeSnNo,
|
|
TradeSnNo = trade.TradeSnNo,
|
|
@@ -1415,11 +1443,11 @@ namespace MySystem
|
|
|
}
|
|
}
|
|
|
catch (Exception ex)
|
|
catch (Exception ex)
|
|
|
{
|
|
{
|
|
|
- function.WriteLog(DateTime.Now.ToString() + "\n$" + sub.Id + "$\n" + ex.ToString(), "扫描金控交易记录中的流量费异常");
|
|
|
|
|
|
|
+ function.WriteLog(DateTime.Now.ToString() + "\n$" + sub.Id + "$\n" + ex.ToString(), "扫描交易记录中的流量费异常");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
spdb.Dispose();
|
|
spdb.Dispose();
|
|
|
- function.WriteLog(DateTime.Now.ToString() + "\n", "扫描金控交易记录中的流量费");
|
|
|
|
|
|
|
+ function.WriteLog(DateTime.Now.ToString() + "\n", "扫描交易记录中的流量费");
|
|
|
|
|
|
|
|
doFluxRecord();
|
|
doFluxRecord();
|
|
|
}
|
|
}
|