浏览代码

押金和交易队列,增加联客宝

lcl 1 年之前
父节点
当前提交
d7e0cd9650

+ 2 - 2
AppStart/Helper/SycnSpServer/SycnSpActiveService.cs

@@ -41,7 +41,7 @@ namespace MySystem
                         {
                             op = true;
                         }
-                        else if (act.ProductType == "2" || act.ProductType == "4" || act.ProductType == "6" || act.ProductType == "7" || act.ProductType == "8" || act.ProductType == "9")
+                        else if (act.ProductType == "2" || act.ProductType == "4" || act.ProductType == "6" || act.ProductType == "7" || act.ProductType == "8" || act.ProductType == "9" || act.ProductType == "15")
                         {
                             op = true;
                         }
@@ -53,7 +53,7 @@ namespace MySystem
                             {
                                 // pos.ActivationState = 1;
                                 // pos.ActivationTime = DateTime.Now;
-                                if (pos.BrandId == 2 || pos.BrandId == 4 || pos.BrandId == 5 || pos.BrandId == 6 || pos.BrandId == 7 || pos.BrandId == 8 || pos.BrandId == 9)
+                                if (pos.BrandId == 2 || pos.BrandId == 4 || pos.BrandId == 5 || pos.BrandId == 6 || pos.BrandId == 7 || pos.BrandId == 8 || pos.BrandId == 9 || pos.BrandId == 15 || pos.BrandId == 16)
                                 {
                                     pos.SeoKeyword = act.SeoTitle;
                                     // pos.IsPurchase = 0;

+ 48 - 0
AppStart/Helper/SycnSpServer/SycnSpTradeService.cs

@@ -117,6 +117,37 @@ namespace MySystem
                                 spdb.SaveChanges();
                             }
                         }
+                        else if (trade.TradeType == "40" && trade.ProductType == "15") //联客宝押金获取
+                        {
+                            if (trade.TradeAmount == 99 || trade.TradeAmount == 199 || trade.TradeAmount == 299)
+                            {
+                                op = false;
+                                PxcModels.MachineForSnNo posFor = db.MachineForSnNo.FirstOrDefault(m => m.SnNo == trade.TradeSnNo) ?? new PxcModels.MachineForSnNo();
+                                PxcModels.PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == posFor.SnId);
+                                if (pos != null)
+                                {
+                                    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()
+                                    {
+                                        CreateDate = DateTime.Now,
+                                        SnNo = pos.PosSn,
+                                        MerNo = merchant.KqMerNo,
+                                        DepositAmount = trade.TradeAmount,
+                                        UserId = pos.BuyUserId,
+                                        AgentNo = function.CheckNull(merchant.MgrNo),
+                                        OrderId = DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8),
+                                    });
+                                    db.SaveChanges();
+                                }
+                                TradeRecord edit = spdb.TradeRecord.FirstOrDefault(m => m.Id == trade.Id);
+                                if (edit != null)
+                                {
+                                    edit.Status = 2;
+                                }
+                                spdb.SaveChanges();
+                            }
+                        }
                         if (trade.DiscountRateFlag == "True")
                         {
                             op = false;
@@ -286,6 +317,18 @@ namespace MySystem
                                             }
                                             if (trade.Field3 == "1") QrPayFlag = 1;
                                         }
+                                        else if (pos.BrandId == 15 || pos.BrandId == 16) //联客宝
+                                        {
+                                            if (trade.BankCardType == "C")
+                                            {
+                                                BankCardType = 1;
+                                            }
+                                            else if (trade.BankCardType == "D")
+                                            {
+                                                BankCardType = 0;
+                                            }
+                                            // if (trade.SerEntryMode == "1") QrPayFlag = 1;
+                                        }
                                         int BrandId = pos.BrandId;
                                         // int BrandId = int.Parse(trade.ProductType);
                                         // if (BrandId == 1 && trade.MerNo.StartsWith("M900"))
@@ -318,6 +361,11 @@ namespace MySystem
                                         {
                                             pos.CreditTrade += SourceTradeAmount;
                                         }
+                                        //联客宝
+                                        else if(BankCardType == 1 && trade.TradeType != "40" && (pos.BrandId == 15 || pos.BrandId == 16))
+                                        {
+                                            pos.CreditTrade += SourceTradeAmount;
+                                        }
                                         //金控
                                         else if((BankCardType == 1 || BankCardType == 2) && (pos.BrandId == 1 || pos.BrandId == 3))
                                         {