Pārlūkot izejas kodu

押金机具需要在收到押金数据时推送激活信息到MQ

lcl 11 mēneši atpakaļ
vecāks
revīzija
acad3e5af8

+ 1 - 0
AppStart/Helper/SycnSpServer/SycnSpActiveService.cs

@@ -49,6 +49,7 @@ namespace MySystem
                             PxcModels.KqProducts kqproduct = db.KqProducts.FirstOrDefault(m => m.Id == pos.BrandId) ?? new PxcModels.KqProducts();
                             if (kqproduct.SingleDepositApi == 1)
                             {
+                                if(string.IsNullOrEmpty(pos.SeoKeyword)) Utils.Instance.SendActData(pos);
                                 pos.SeoKeyword = act.SeoTitle;
                                 if(pos.BrandId == 15 || pos.BrandId == 16) //来客吧
                                 {

+ 5 - 1
AppStart/Helper/SycnSpServer/SycnSpTradeService.cs

@@ -46,6 +46,7 @@ namespace MySystem
                                 PxcModels.PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == posFor.SnId);
                                 if (pos != null)
                                 {
+                                    if(string.IsNullOrEmpty(pos.SeoKeyword)) Utils.Instance.SendActData(pos);
                                     pos.SeoKeyword = trade.TradeAmount.ToString("f2");
                                     db.SaveChanges();
                                     isDeposit = true;
@@ -77,6 +78,7 @@ namespace MySystem
                                 PxcModels.PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == posFor.SnId);
                                 if (pos != null)
                                 {
+                                    if(string.IsNullOrEmpty(pos.SeoKeyword)) Utils.Instance.SendActData(pos);
                                     pos.SeoKeyword = trade.TradeAmount.ToString("f2");
                                     db.SaveChanges();
                                     isDeposit = true;
@@ -98,6 +100,7 @@ namespace MySystem
                                 PxcModels.PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == posFor.SnId);
                                 if (pos != null)
                                 {
+                                    if(string.IsNullOrEmpty(pos.SeoKeyword)) Utils.Instance.SendActData(pos);
                                     pos.SeoKeyword = trade.TradeAmount.ToString("f2");
                                     PxcModels.PosMerchantInfo merchant = db.PosMerchantInfo.FirstOrDefault(m => m.Id == pos.BindMerchantId) ?? new PxcModels.PosMerchantInfo();
                                     db.MerchantDepositRecord.Add(new PxcModels.MerchantDepositRecord()
@@ -130,6 +133,7 @@ namespace MySystem
                                 PxcModels.PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == posFor.SnId);
                                 if (pos != null)
                                 {
+                                    if(string.IsNullOrEmpty(pos.SeoKeyword)) Utils.Instance.SendActData(pos);
                                     pos.SeoKeyword = trade.TradeAmount.ToString("f2");
                                     PxcModels.PosMerchantInfo merchant = db.PosMerchantInfo.FirstOrDefault(m => m.Id == pos.BindMerchantId) ?? new PxcModels.PosMerchantInfo();
                                     db.MerchantDepositRecord.Add(new PxcModels.MerchantDepositRecord()
@@ -914,7 +918,7 @@ namespace MySystem
                 RedisDbconn.Instance.AddList("PosWithholdQueue", "{\"UserId\":\"" + pos.BuyUserId + "\",\"SnNo\":\"" + pos.PosSn + "\"}");
 
                 //推送激活数据
-                Utils.Instance.SendActData(pos);
+                if(Deposit == 0) Utils.Instance.SendActData(pos);
             }
             Utils.Instance.PrizeRecord(1, pos.PosSn, "条件:已激活;当前状态:" + pos.ActivationState);
             Utils.Instance.PrizeRecord(1, pos.PosSn, "条件:绑定后台30天到60天之间;绑定时间:" + pos.BindingTime.Value.ToString() + "");