lcl 5 mesiacov pred
rodič
commit
2818d15266

+ 1 - 1
AppStart/Helper/PosPushDataNewHelper.cs

@@ -321,7 +321,7 @@ namespace MySystem
                 else if (Utils.Instance.IsWifi(int.Parse(trade.ProductType)))
                 {
                     FeeRate = "0.60";
-                    FeeAmt = trade.ErrorCode;
+                    FeeAmt = trade.ErrorMsg;
                 }
                 Dictionary<string, object> dataContent = new Dictionary<string, object>();
                 dataContent.Add("pos_sn", trade.TradeSnNo); //机具sn

+ 28 - 30
AppStart/Helper/SycnSpServer/SycnSpTradeWifiService.cs

@@ -32,7 +32,7 @@ namespace MySystem
                     DateTime start = DateTime.Now.AddDays(-10);
                     DateTime end = DateTime.Now.AddMinutes(-1);
                     int StartId = int.Parse(function.CheckInt(function.ReadInstance("/SycnSp/TradeRecordId.txt")));
-                    IQueryable<TradeRecord> trades = spdb.TradeRecord.Where(m => m.Id >= StartId && m.ProductType == "23" && m.CreateDate >= start && m.Status == 1).OrderBy(m => m.CreateDate).Take(20);
+                    IQueryable<TradeRecord> trades = spdb.TradeRecord.Where(m => m.Id == 132380123).OrderBy(m => m.CreateDate).Take(20);
                     foreach (TradeRecord trade in trades.ToList())
                     {
                         //推送数据给java
@@ -44,20 +44,17 @@ namespace MySystem
                             if(trade.SeoTitle != "v2") TradeAmount = TradeAmount / 100;
                             bool statFlag = false;
                             PxcModels.WifiTradeRecord add = new PxcModels.WifiTradeRecord();
-                            PxcModels.PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == trade.TradeSnNo);
-                            if (pos != null)
+                            PxcModels.PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == trade.TradeSnNo) ?? new PxcModels.PosMachinesTwo();
+                            statFlag = db.WifiTradeRecord.Any(m => m.SnNo == trade.TradeSnNo);
+                            add = db.WifiTradeRecord.Add(new PxcModels.WifiTradeRecord()
                             {
-                                statFlag = db.WifiTradeRecord.Any(m => m.SnNo == trade.TradeSnNo);
-                                add = db.WifiTradeRecord.Add(new PxcModels.WifiTradeRecord()
-                                {
-                                    CreateDate = trade.CreateDate,
-                                    UpdateDate = trade.UpdateDate,
-                                    SnNo = trade.TradeSnNo, //渠道SN号
-                                    TradeAmount = TradeAmount, //交易金额
-                                    BrandId = pos.BrandId, //品牌
-                                    Remark = trade.MerNo, //备注
-                                }).Entity;
-                            }
+                                CreateDate = trade.CreateDate,
+                                UpdateDate = trade.UpdateDate,
+                                SnNo = trade.TradeSnNo, //渠道SN号
+                                TradeAmount = TradeAmount, //交易金额
+                                BrandId = pos.BrandId, //品牌
+                                Remark = trade.MerNo, //备注
+                            }).Entity;
                             db.SpOrderNos.Add(new PxcModels.SpOrderNos()
                             {
                                 OrderNo = trade.TradeSerialNo
@@ -66,6 +63,7 @@ namespace MySystem
 
                             //开始统计
                             int Months = 0;
+                            int BrandId = int.Parse(function.CheckInt(trade.ProductType));
 
                             if(trade.SeoTitle == "v2")
                             {
@@ -99,25 +97,25 @@ namespace MySystem
                             }
                             else
                             {
-                                if(pos.BrandId == 23 && TradeAmount == 49) Months = 1;
-                                if(pos.BrandId == 23 && TradeAmount == 79) Months = 3;
-                                if(pos.BrandId == 23 && TradeAmount == 119) Months = 12;
-                                if(pos.BrandId == 23 && TradeAmount == 199) Months = 24;
+                                if(BrandId == 23 && TradeAmount == 49) Months = 1;
+                                if(BrandId == 23 && TradeAmount == 79) Months = 3;
+                                if(BrandId == 23 && TradeAmount == 119) Months = 12;
+                                if(BrandId == 23 && TradeAmount == 199) Months = 24;
 
-                                if(pos.BrandId == 24 && TradeAmount == 59) Months = 1;
-                                if(pos.BrandId == 24 && TradeAmount == 159) Months = 3;
-                                if(pos.BrandId == 24 && TradeAmount == 399) Months = 12;
-                                if(pos.BrandId == 24 && TradeAmount == 699) Months = 24;
+                                if(BrandId == 24 && TradeAmount == 59) Months = 1;
+                                if(BrandId == 24 && TradeAmount == 159) Months = 3;
+                                if(BrandId == 24 && TradeAmount == 399) Months = 12;
+                                if(BrandId == 24 && TradeAmount == 699) Months = 24;
 
-                                if(pos.BrandId == 25 && TradeAmount == 69) Months = 1;
-                                if(pos.BrandId == 25 && TradeAmount == 199) Months = 3;
-                                if(pos.BrandId == 25 && TradeAmount == 499) Months = 12;
-                                if(pos.BrandId == 25 && TradeAmount == 799) Months = 24;
+                                if(BrandId == 25 && TradeAmount == 69) Months = 1;
+                                if(BrandId == 25 && TradeAmount == 199) Months = 3;
+                                if(BrandId == 25 && TradeAmount == 499) Months = 12;
+                                if(BrandId == 25 && TradeAmount == 799) Months = 24;
 
-                                if(pos.BrandId == 26 && TradeAmount == 219) Months = 1;
-                                if(pos.BrandId == 26 && TradeAmount == 449) Months = 3;
-                                if(pos.BrandId == 26 && TradeAmount == 1399) Months = 12;
-                                if(pos.BrandId == 26 && TradeAmount == 2698) Months = 24;
+                                if(BrandId == 26 && TradeAmount == 219) Months = 1;
+                                if(BrandId == 26 && TradeAmount == 449) Months = 3;
+                                if(BrandId == 26 && TradeAmount == 1399) Months = 12;
+                                if(BrandId == 26 && TradeAmount == 2698) Months = 24;
                             }
                             string TradeMonth = DateTime.Now.ToString("yyyyMM");
 

+ 1 - 1
AppStart/WifiTradeHelper.cs

@@ -177,7 +177,7 @@ public class WifiTradeHelper
                     TradeSerialNo = Guid.NewGuid().ToString(),
                     CreateDate = DateTime.Parse(Month + "-01 00:00:00"),
                     ProductType = edit.BrandId.ToString(),
-                    ErrorCode = edit.DoMonths == 1 ? edit.TradeAmount.ToString() : "0",
+                    ErrorMsg = edit.DoMonths == 1 ? edit.TradeAmount.ToString() : "0",
                 });
             }
         }

+ 79 - 79
Startup.cs

@@ -168,92 +168,92 @@ namespace MySystem
             // }
             // if(Library.ConfigurationManager.EnvironmentFlag == 2)
             // {
-                SycnSpBindService.Instance.Start(); //同步SP绑定数据
-                SycnSpBindZkbService.Instance.Start(); //同步吱客宝SP绑定数据
-                SycnSpBindService.Instance.StartSim(); //同步SP广电卡绑定数据
-                SycnSpMerchantService.Instance.Start(); //同步SP商户数据
-                SycnSpActiveService.Instance.Start(); //同步SP激活数据
-                SycnSpTradeService.Instance.Start(); //同步SP交易数据
+                // SycnSpBindService.Instance.Start(); //同步SP绑定数据
+                // SycnSpBindZkbService.Instance.Start(); //同步吱客宝SP绑定数据
+                // SycnSpBindService.Instance.StartSim(); //同步SP广电卡绑定数据
+                // SycnSpMerchantService.Instance.Start(); //同步SP商户数据
+                // SycnSpActiveService.Instance.Start(); //同步SP激活数据
+                // SycnSpTradeService.Instance.Start(); //同步SP交易数据
                 SycnSpTradeWifiService.Instance.Start(); //同步WIFISP交易数据
-                SycnSpTradeZkbService.Instance.Start(); //同步吱客宝SP交易数据
-                SycnSpTradeService.Instance.StartSim(); //同步SP广电卡交易数据
-                SycnSpTradeService.Instance.StartTradeStatus(); //恢复原始交易没有统计上的数据
-                SycnSpChangeBindService.Instance.Start(); //同步SP换绑数据
-                SycnSpUnBindService.Instance.Start(); //同步SP解绑数据
-                SycnSpMerchantRecordService.Instance.Start(); //同步SP商户记录数据
+                // SycnSpTradeZkbService.Instance.Start(); //同步吱客宝SP交易数据
+                // SycnSpTradeService.Instance.StartSim(); //同步SP广电卡交易数据
+                // SycnSpTradeService.Instance.StartTradeStatus(); //恢复原始交易没有统计上的数据
+                // SycnSpChangeBindService.Instance.Start(); //同步SP换绑数据
+                // SycnSpUnBindService.Instance.Start(); //同步SP解绑数据
+                // SycnSpMerchantRecordService.Instance.Start(); //同步SP商户记录数据
 
-                StatService.Instance.StartActiveReward(); //实时处理激活奖励
-                StatService.Instance.StartActiveReward1(); //实时处理0押激活奖励
-                StatService.Instance.StartActiveReward2(); //实时处理盒易付0押激活奖励
-                StatService.Instance.StartActiveReward15(); //实时处理来客吧0押激活奖励
-                StatService.Instance.StartSimActive(); //实时广电卡激活奖励
-                StatService.Instance.StartOpenReward(); //实时获取开机奖励
-                StatService.Instance.StartLeaderReward(); //盟主开机奖励发放
-                StatService.Instance.StartPreActPrize(); //押金奖励发放(激活奖励新规)
-                ActPrizeCheckService.Instance.Start(); //监听无商户号的机具,并再次发奖励
-                StatService.Instance.ListenFluxRecord(); //同步流量费
-                LeaderPrizeService.Instance.Start(); //大盟主奖励发奖
-                OperatePrizeService.Instance.Start(); //运营中心奖励发奖
-                ActRewardService.Instance.Start(); //发放激活奖励
-                ActRewardService.Instance.StartHd(); //补发动销买断奖励
-                ActRewardService.Instance.StartAfterAdd(); //补激活奖励
-                HelpProfitPreMerchantHelper.Instance.Start(); //助利宝每天增加指定数量商机
-                AddActService.Instance.Start(); //划拨后检查机具激活状态,并自动补录
-                PrePosRingService.Instance.Start(); //预发未申请提醒
-                PrePosWithholdService.Instance.Start(); //预发机过期未申请提交到预扣款
-                PrePosWithholdService.Instance.StartPre(); //预发机申请成功,处理预扣款
-                PosWithholdService.Instance.Start(); //过期机具激活,清理预扣款
-                SycnMerchantTradeService.Instance.Start(); //同步商户交易额
-                WifiWarningService.Instance.Start(); //wifi设备过期提醒
-                WifiWithholdService.Instance.Start(); //wifi设备过期预扣款
-                WifiWithholdBackService.Instance.Start(); //wifi设备激活后预扣款处理
+                // StatService.Instance.StartActiveReward(); //实时处理激活奖励
+                // StatService.Instance.StartActiveReward1(); //实时处理0押激活奖励
+                // StatService.Instance.StartActiveReward2(); //实时处理盒易付0押激活奖励
+                // StatService.Instance.StartActiveReward15(); //实时处理来客吧0押激活奖励
+                // StatService.Instance.StartSimActive(); //实时广电卡激活奖励
+                // StatService.Instance.StartOpenReward(); //实时获取开机奖励
+                // StatService.Instance.StartLeaderReward(); //盟主开机奖励发放
+                // StatService.Instance.StartPreActPrize(); //押金奖励发放(激活奖励新规)
+                // ActPrizeCheckService.Instance.Start(); //监听无商户号的机具,并再次发奖励
+                // StatService.Instance.ListenFluxRecord(); //同步流量费
+                // LeaderPrizeService.Instance.Start(); //大盟主奖励发奖
+                // OperatePrizeService.Instance.Start(); //运营中心奖励发奖
+                // ActRewardService.Instance.Start(); //发放激活奖励
+                // ActRewardService.Instance.StartHd(); //补发动销买断奖励
+                // ActRewardService.Instance.StartAfterAdd(); //补激活奖励
+                // HelpProfitPreMerchantHelper.Instance.Start(); //助利宝每天增加指定数量商机
+                // AddActService.Instance.Start(); //划拨后检查机具激活状态,并自动补录
+                // PrePosRingService.Instance.Start(); //预发未申请提醒
+                // PrePosWithholdService.Instance.Start(); //预发机过期未申请提交到预扣款
+                // PrePosWithholdService.Instance.StartPre(); //预发机申请成功,处理预扣款
+                // PosWithholdService.Instance.Start(); //过期机具激活,清理预扣款
+                // SycnMerchantTradeService.Instance.Start(); //同步商户交易额
+                // WifiWarningService.Instance.Start(); //wifi设备过期提醒
+                // WifiWithholdService.Instance.Start(); //wifi设备过期预扣款
+                // WifiWithholdBackService.Instance.Start(); //wifi设备激活后预扣款处理
 
-                MessageCenterService.Instance.Start(); // 消息队列
-                LeaderTimeoutSendMessageService.Instance.Start(); //盟主过期消息提醒
+                // MessageCenterService.Instance.Start(); // 消息队列
+                // LeaderTimeoutSendMessageService.Instance.Start(); //盟主过期消息提醒
 
-                AlipayPayBack2Service.Instance.Start(); //支付宝回调处理
-                PosCouponPrizeService.Instance.Start(); //购券奖励队列
-                PosCouponPrizeService.Instance.Start2(); //购券奖励队列(补奖励)
-                OperateAddService.Instance.Start(); //购买运营中心队列
-                BalancePayBackService.Instance.Start(); //余额支付队列
-                ReservePayBackService.Instance.Start(); //储备金支付队列
-                OrderRefundService.Instance.Start(); //商城订单退款
+                // AlipayPayBack2Service.Instance.Start(); //支付宝回调处理
+                // PosCouponPrizeService.Instance.Start(); //购券奖励队列
+                // PosCouponPrizeService.Instance.Start2(); //购券奖励队列(补奖励)
+                // OperateAddService.Instance.Start(); //购买运营中心队列
+                // BalancePayBackService.Instance.Start(); //余额支付队列
+                // ReservePayBackService.Instance.Start(); //储备金支付队列
+                // OrderRefundService.Instance.Start(); //商城订单退款
 
-                StatService.Instance.Start(); //每日重置交易额
-                StoreApplyHelper.Instance.Start(); // 每月1号重置仓库额度
-                DepositReturnStatService.Instance.Start(); //每月1号统计达标商户(退押需要的)
-                DepositReturnStatService.Instance.StartEverTime(); //统计单个商户达标数据(退押需要的)
-                AutoOpOrderService.Instance.StartOrderCancel(); //自动取消超时订单(15分钟)
-                OperateStockService.Instance.Start(); //运营中心库存实时更新
-                ResetSmallStoreHelper.Instance.Start(); //每月重置小分仓额度
-                ResetSmallStoreHelper.Instance.Listen(); //监听每月1号重置小分仓额度
-                ResetSmallStoreHelper.Instance.StartReset(); //监听每月1号重置小分仓额度
-                OperateService.Instance.Start(); //运营中心每天统计一次发货量、库存
-                TimeOutPosChargeService.Instance.StartDoChargeAmount(); //实时监听待扣款记录,并扣费
-                InstallmentDeductionService.Instance.Start(); //分期扣款(每月20号执行)
-                LeaderAmountMonthChangeQueue.Instance.Start(); //每月一号记录上月盟主储蓄金和可提现余额
-                ResetPosFirstFlagAndIsExecuteService.Instance.Start(); //每月1号计算商户首台机具标记
-                OperateAmountRecordService.Instance.Start(); //运营中心额度变更
-                VirtualApplyHelper.Instance.Start(); //申请虚拟广电卡
+                // StatService.Instance.Start(); //每日重置交易额
+                // StoreApplyHelper.Instance.Start(); // 每月1号重置仓库额度
+                // DepositReturnStatService.Instance.Start(); //每月1号统计达标商户(退押需要的)
+                // DepositReturnStatService.Instance.StartEverTime(); //统计单个商户达标数据(退押需要的)
+                // AutoOpOrderService.Instance.StartOrderCancel(); //自动取消超时订单(15分钟)
+                // OperateStockService.Instance.Start(); //运营中心库存实时更新
+                // ResetSmallStoreHelper.Instance.Start(); //每月重置小分仓额度
+                // ResetSmallStoreHelper.Instance.Listen(); //监听每月1号重置小分仓额度
+                // ResetSmallStoreHelper.Instance.StartReset(); //监听每月1号重置小分仓额度
+                // OperateService.Instance.Start(); //运营中心每天统计一次发货量、库存
+                // TimeOutPosChargeService.Instance.StartDoChargeAmount(); //实时监听待扣款记录,并扣费
+                // InstallmentDeductionService.Instance.Start(); //分期扣款(每月20号执行)
+                // LeaderAmountMonthChangeQueue.Instance.Start(); //每月一号记录上月盟主储蓄金和可提现余额
+                // ResetPosFirstFlagAndIsExecuteService.Instance.Start(); //每月1号计算商户首台机具标记
+                // OperateAmountRecordService.Instance.Start(); //运营中心额度变更
+                // VirtualApplyHelper.Instance.Start(); //申请虚拟广电卡
 
-                ChangePosTimer.Instance.Start(); //售后换新执行机具数据转移
-                RecommendActStatService.Instance.Start(); //推荐王奖励数据统计
-                StoreApplyHelper.Instance.StartEverTime(); //分仓临时额度变更
-                PreStoreApplyHelper.Instance.StartEverTime(); //小分仓临时额度变更
-                OperateAmountService.Instance.Start(); //运营中心额度变更
-                LeaderApplyCouponsHelper.Instance.Start(); //盟主储蓄金申请机具券打标记
-                DepositReturnService.Instance.Start(); //退押金到支付宝余额
-                StoreApplyHelper.Instance.ResetStoreReserve(); //重置分仓额度
-                AddPosCouponPrizeHelper.Instance.Start(); //补机具券奖励
+                // ChangePosTimer.Instance.Start(); //售后换新执行机具数据转移
+                // RecommendActStatService.Instance.Start(); //推荐王奖励数据统计
+                // StoreApplyHelper.Instance.StartEverTime(); //分仓临时额度变更
+                // PreStoreApplyHelper.Instance.StartEverTime(); //小分仓临时额度变更
+                // OperateAmountService.Instance.Start(); //运营中心额度变更
+                // LeaderApplyCouponsHelper.Instance.Start(); //盟主储蓄金申请机具券打标记
+                // DepositReturnService.Instance.Start(); //退押金到支付宝余额
+                // StoreApplyHelper.Instance.ResetStoreReserve(); //重置分仓额度
+                // AddPosCouponPrizeHelper.Instance.Start(); //补机具券奖励
                 
-                PosChannelHelper.Instance.Start(); //实时查询查询终端收单机构
-                UpUserSaveService.Instance.Start(); //每天凌晨保存头一天的创客关系数据
-                HyfAddPrizeService.Instance.Start(); //盒力四射加码奖励发放
-                PrizeFlowRecordService.Instance.Start(); //奖励返现逻辑日志记录
-                PosCouponExchangeHelper.Instance.Start(); //电签券兑换大机券
-                ToBigHelper.Instance.Start(); //机具通对资格
-                TradeFilterService.Instance.Start(); //营训奖励拦截
-                WifiTradeHelper.Instance.Start(); //每月1号统计上月wifi交易 
+                // PosChannelHelper.Instance.Start(); //实时查询查询终端收单机构
+                // UpUserSaveService.Instance.Start(); //每天凌晨保存头一天的创客关系数据
+                // HyfAddPrizeService.Instance.Start(); //盒力四射加码奖励发放
+                // PrizeFlowRecordService.Instance.Start(); //奖励返现逻辑日志记录
+                // PosCouponExchangeHelper.Instance.Start(); //电签券兑换大机券
+                // ToBigHelper.Instance.Start(); //机具通对资格
+                // TradeFilterService.Instance.Start(); //营训奖励拦截
+                // WifiTradeHelper.Instance.Start(); //每月1号统计上月wifi交易 
 
                 
                 // RabbitMQClientV2.Instance.CreateConn("KXS_WIFI_TRADE_QUEUE"); //推送wifi每月交易额

+ 1 - 1
appsettings.json

@@ -21,7 +21,7 @@
     "Pxc1SqlConnStr": "server=rm-2vcs4j67tla603c9d5o.mysql.cn-chengdu.rds.aliyuncs.com;port=3306;user=KxsProfitServer;password=FrW8ZfxlcaVdm1r0;database=KxsProfitServer;charset=utf8;DefaultCommandTimeout=600;",
     "ReadSqlConnStr": "server=rr-2vc53lrwpwm1ewscogo.mysql.cn-chengdu.rds.aliyuncs.com;port=3306;user=KxsProfitServer;password=FrW8ZfxlcaVdm1r0;database=KxsProfitServer;charset=utf8;DefaultCommandTimeout=600;",
     "MainSqlConnStr": "server=rm-2vcs4j67tla603c9d5o.mysql.cn-chengdu.rds.aliyuncs.com;port=3306;user=KxsProfitServer;password=FrW8ZfxlcaVdm1r0;database=KxsStatServer;charset=utf8;",
-    "SpSqlConnStr": "server=jumpserver.kexiaoshuang.com;port=33061;user=94cf0a7f-b3d6-4b47-bd91-ed3de08e1e30;password=jaxGbEkEnUP4herk;database=KxsSpServer;charset=utf8;",
+    "SpSqlConnStr": "server=jumpserver.kexiaoshuang.com;port=33061;user=88aa4184-c633-4276-8b2e-276cbff25345;password=jm2gsxJagYB6Q44C;database=KxsSpServer;charset=utf8;",
     "OpSqlConnStr": "server=rm-2vcs4j67tla603c9d5o.mysql.cn-chengdu.rds.aliyuncs.com;port=3306;user=KxsProfitServer;password=FrW8ZfxlcaVdm1r0;database=KxsOpServer;charset=utf8;",
     "MpSqlConnStr": "server=rm-2vc27k81v217qs1t55o.mysql.cn-chengdu.rds.aliyuncs.com;port=3306;user=QrCodePlateMainServer;password=ll4DFaALMu9YIooM;database=QrCodePlateMainServer;charset=utf8;",
     "MpSqlConnStr2": "server=rm-2vc27k81v217qs1t55o.mysql.cn-chengdu.rds.aliyuncs.com;port=3306;user=QrCodePlateMainServer;password=ll4DFaALMu9YIooM;database=QrCodePlateMainServer2;charset=utf8;",