lichunlei 2 年之前
父节点
当前提交
15d727e06b

+ 28 - 4
AppStart/Helper/AlipayPayBack2Service.cs

@@ -117,16 +117,16 @@ namespace MySystem
                         pro.ProductId = order.ProductId;
                     }
                     List<int> couponIds = new List<int>();
-                    if (pro.ProductId == 10 || pro.ProductId == 11 || pro.ProductId == 27 || pro.ProductId == 28)
+                    if (pro.ProductId == 10 || pro.ProductId == 11 || pro.ProductId == 27 || pro.ProductId == 28 || pro.ProductId == 30 || pro.ProductId == -2)
                     {
                         order.Status = 2;
                         int BuyCount = pro.ProductCount;
                         int Kind = 0;
-                        if (pro.ProductId == 10)
+                        if (pro.ProductId == 10 || pro.ProductId == 30)
                         {
                             Kind = 1;
                         }
-                        else if (pro.ProductId == 11)
+                        else if (pro.ProductId == 11 || pro.ProductId == -2)
                         {
                             Kind = 2;
                         }
@@ -146,7 +146,7 @@ namespace MySystem
                                 user.LeaderLevel = 2;
                             }
                         }
-                        if(Kind <= 2 && pro.ProductId == 10 || pro.ProductId == 11)
+                        if(Kind <= 2 && (pro.ProductId == 10 || pro.ProductId == 11 || pro.ProductId == 30 || pro.ProductId == -2))
                         {
                             // 购买600一组机具券,返券
                             int CouponCount = 0;
@@ -160,6 +160,18 @@ namespace MySystem
                             }
                             string Codes = "";
                             var coupons = db.PosCoupons.Where(m => m.IsLock == 0 && m.IsUse == 0 && m.UserId == 0 && m.QueryCount == Kind).OrderBy(m => m.Id).Take(CouponCount).ToList();
+                            int RecordId = 0;
+                            if(coupons.Count > 0 && (pro.ProductId == 30 || pro.ProductId == -2))
+                            {
+                                var adds = db.HelpProfitExchange.Add(new HelpProfitExchange()
+                                {
+                                    CreateDate = DateTime.Now, //创建时间
+                                    UserId = order.UserId,
+                                    ExchangeCount = coupons.Count,
+                                }).Entity;
+                                db.SaveChanges();
+                                RecordId = adds.Id;
+                            }
                             foreach (var coupon in coupons) // TODO: 数量多的话,会慢
                             {
                                 PosCoupons item = db.PosCoupons.FirstOrDefault(m => m.Id == coupon.Id);
@@ -168,6 +180,18 @@ namespace MySystem
                                     item.CreateDate = DateTime.Now;
                                     item.UserId = order.UserId;
                                     item.UpdateDate = DateTime.Now.AddDays(180);
+                                    if(pro.ProductId == 30 || pro.ProductId == -2)
+                                    {
+                                        item.HelpProfitFlag = 1;
+                                        db.HelpProfitExchangeDetail.Add(new HelpProfitExchangeDetail()
+                                        {
+                                            CreateDate = DateTime.Now, //创建时间
+                                            UserId = order.UserId,
+                                            PosCouponId = item.Id,
+                                            ExchangeCode = item.ExchangeCode,
+                                            RecordId = RecordId,
+                                        });
+                                    }
                                     Codes += item.ExchangeCode + ",";
                                     couponIds.Add(coupon.Id);
                                 }

+ 213 - 0
AppStart/Helper/Profit/HelpProfitHelper.cs

@@ -0,0 +1,213 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data;
+using MySystem.PxcModels;
+using Library;
+using System.Threading;
+using Microsoft.Extensions.Hosting;
+using System.Threading.Tasks;
+
+namespace MySystem
+{
+    public class HelpProfitHelper
+    {
+        public readonly static HelpProfitHelper Instance = new HelpProfitHelper();
+        private HelpProfitHelper()
+        {
+        }
+        
+        public void Start()
+        {
+            Thread th = new Thread(StartFor);
+            th.IsBackground = true;
+            th.Start();
+        }
+        public void StartFor()
+        {
+            while (true)
+            {
+                if(DateTime.Now.Hour >= 2)// && DateTime.Now.Hour <= 3)
+                {
+                    StatProfitEveryDay(DateTime.Now.AddDays(-1).ToString("yyyyMMdd"));
+                }
+                Thread.Sleep(600000);
+            }
+        }
+        public void StatProfitEveryDay(string Date)
+        {
+            string check = function.ReadInstance("/HelpProfitStat/" + Date + ".txt");
+            if (!string.IsNullOrEmpty(check))
+            {
+                return;
+            }
+            function.WritePage("/HelpProfitStat/", Date + ".txt", DateTime.Now.ToString());
+            WebCMSEntities db = new WebCMSEntities();
+            List<HelpProfitMerTradeSummay> list = db.HelpProfitMerTradeSummay.Where(m => m.TradeDate == Date).ToList();
+            foreach(HelpProfitMerTradeSummay sub in list)
+            {
+                int MerchantId = sub.MerchantId;
+                decimal TradeAmount = sub.TradeAmount;
+                HelpProfitMerchantForUser merchant = db.HelpProfitMerchantForUser.FirstOrDefault(m => m.MerchantId == MerchantId);
+                if(merchant != null)
+                {
+                    int UserId = merchant.UserId;
+                    PosMerchantInfo mer = db.PosMerchantInfo.FirstOrDefault(m => m.Id == MerchantId) ?? new PosMerchantInfo();
+                    MachineForMerNo merFor = db.MachineForMerNo.FirstOrDefault(m => m.MerNo == mer.KqMerNo) ?? new MachineForMerNo();
+                    PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == merFor.SnId) ?? new PosMachinesTwo();
+                    // string Name = mer.MerchantName;
+                    // if (mer.BrandId == 2)
+                    // {
+                    //     if (Name.Contains("-"))
+                    //     {
+                    //         Name = Name.Split('-')[1];
+                    //     }
+                    //     else if (Name.Contains("_"))
+                    //     {
+                    //         Name = Name.Split('_')[1];
+                    //     }
+                    // }
+                    // Name = Name.Replace("个体户", "");
+                    // Name = Name.Replace("个体商户", "");
+                    // Name = Name.Replace("企业户", "");
+                    // Name = Name.Replace("企业商户", "");
+                    Users user = db.Users.FirstOrDefault(m => m.Id == UserId) ?? new Users();
+                    Users puser = db.Users.FirstOrDefault(m => m.Id == user.ParentUserId) ?? new Users();
+                    decimal money = TradeAmount * 0.0005M;
+                    decimal money2 = TradeAmount * 0.00005M;
+                    // UserAccount account = db.UserAccount.FirstOrDefault(m => m.Id == UserId);
+                    // if (account == null)
+                    // {
+                    //     account = db.UserAccount.Add(new UserAccount()
+                    //     {
+                    //         Id = UserId,
+                    //         UserId = UserId,
+                    //     }).Entity;
+                    //     db.SaveChanges();
+                    // }
+                    // decimal BeforeBalanceAmount = account.BalanceAmount; //变更前余额
+                    // account.HelpProfitBalanceAmount += money;
+                    // decimal AfterBalanceAmount = account.BalanceAmount; //变更后余额
+                    // UserAccountRecord accountRecord = db.UserAccountRecord.Add(new UserAccountRecord()
+                    // {
+                    //     CreateDate = DateTime.Now,
+                    //     UpdateDate = DateTime.Now,
+                    //     Sort = MerchantId,
+                    //     UserId = UserId, //创客
+                    //     ProductType = 101, //产品类型
+                    //     ChangeType = 1,
+                    //     ChangeAmount = money, //变更金额
+                    //     BeforeBalanceAmount = BeforeBalanceAmount, //变更前余额
+                    //     AfterBalanceAmount = AfterBalanceAmount, //变更后余额
+                    //     Remark = Name.Substring(0, 1) + "**:" + DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd") + "交易" + TradeAmount.ToString("f2"),
+                    // }).Entity;
+                    AddProfitRecord(db, user, pos, mer, TradeAmount, money, DateTime.Now.AddDays(-1), 1);
+                    db.SaveChanges();
+
+                    // account = db.UserAccount.FirstOrDefault(m => m.Id == user.ParentUserId);
+                    // if (account == null)
+                    // {
+                    //     account = db.UserAccount.Add(new UserAccount()
+                    //     {
+                    //         Id = user.ParentUserId,
+                    //         UserId = user.ParentUserId,
+                    //     }).Entity;
+                    //     db.SaveChanges();
+                    // }
+                    // BeforeBalanceAmount = account.BalanceAmount; //变更前余额
+                    // account.HelpProfitBalanceAmount += money2;
+                    // AfterBalanceAmount = account.BalanceAmount; //变更后余额
+                    // accountRecord = db.UserAccountRecord.Add(new UserAccountRecord()
+                    // {
+                    //     CreateDate = DateTime.Now,
+                    //     UpdateDate = DateTime.Now,
+                    //     Sort = MerchantId,
+                    //     UserId = user.ParentUserId, //创客
+                    //     ProductType = 101, //产品类型
+                    //     ChangeType = 112,
+                    //     ChangeAmount = money2, //变更金额
+                    //     BeforeBalanceAmount = BeforeBalanceAmount, //变更前余额
+                    //     AfterBalanceAmount = AfterBalanceAmount, //变更后余额
+                    //     Remark = Name.Substring(0, 1) + "**:" + DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd") + "交易" + TradeAmount.ToString("f2"),
+                    // }).Entity;
+                    AddProfitRecord(db, puser, pos, mer, TradeAmount, money, DateTime.Now.AddDays(-1), 112);
+                    db.SaveChanges();
+
+                    // string Month = Date.Substring(0, 6);
+                    // HelpProfitRebateDetail selfStat = db.HelpProfitRebateDetail.FirstOrDefault(m => m.UserId == UserId && m.TradeMonth == Month && m.TradeDate == Date);
+                    // if (selfStat == null)
+                    // {
+                    //     selfStat = db.HelpProfitRebateDetail.Add(new HelpProfitRebateDetail()
+                    //     {
+                    //         TradeMonth = Month,
+                    //         TradeDate = Date,
+                    //         UserId = UserId,
+                    //     }).Entity;
+                    //     db.SaveChanges();
+                    // }
+                    // selfStat.CreditRewardAmount += money;
+
+                    // selfStat = db.HelpProfitRebateDetail.FirstOrDefault(m => m.UserId == user.ParentUserId && m.TradeMonth == Month && m.TradeDate == Date);
+                    // if (selfStat == null)
+                    // {
+                    //     selfStat = db.HelpProfitRebateDetail.Add(new HelpProfitRebateDetail()
+                    //     {
+                    //         TradeMonth = Month,
+                    //         TradeDate = Date,
+                    //         UserId = user.ParentUserId,
+                    //     }).Entity;
+                    //     db.SaveChanges();
+                    // }
+                    // selfStat.CreditRewardAmount += money2;
+                    // db.SaveChanges();
+                }
+            }
+            db.Dispose();
+        }
+
+        private void AddProfitRecord(WebCMSEntities db, Users puser, PosMachinesTwo pos, PosMerchantInfo merchant, decimal TradeAmount, decimal Prize, DateTime yesterday, int RewardType)
+        {
+            string RewardDesc = "助利宝分润";
+            if(RewardType == 112)
+            {
+                RewardDesc = "助利宝推荐分润";
+            }
+            HelpProfitRewardDetail detail = db.HelpProfitRewardDetail.Add(new HelpProfitRewardDetail()
+            {
+                CreateDate = DateTime.Now,
+                UpdateDate = DateTime.Now,
+                TradeMonth = yesterday.ToString("yyyyMM"), //交易月
+                TradeDate = yesterday, //达标日期
+                UserId = puser.Id, //创客
+                BrandId = pos.BrandId, //品牌
+                ProductName = RelationClass.GetKqProductsInfo(pos.BrandId), //产品名称
+                MerchantId = pos.BindMerchantId, //商户
+                DirectUserId = merchant.UserId, //商户直属人
+                SnNo = pos.PosSn, //SN号
+                MerNo = merchant.KqMerNo, //渠道商户号
+                SnType = pos.PosSnType, //机具类型
+                StandardDate = pos.ActivationTime, //商户的激活日期
+                SnStoreId = pos.StoreId, //SN仓库
+                MerBuddyType = puser.MerchantType, //商户创客类型
+                RewardType = RewardType, //奖励类型
+                RewardTips = RewardDesc, //奖励描述
+                CreditTradeAmt = TradeAmount, //贷记卡交易总金额
+                CreditRewardAmount = Prize, //贷记卡交易奖励金额
+                RewardDesc = RewardDesc, //奖励描述
+            }).Entity;
+            db.HelpProfitReward.Add(new HelpProfitReward()
+            {
+                CreateDate = DateTime.Now,
+                UpdateDate = DateTime.Now,
+                TradeMonth = yesterday.ToString("yyyyMM"), //交易月
+                TradeDate = DateTime.Now, //达标日期
+                UserId = puser.Id, //创客
+                BrandId = pos.BrandId, //品牌
+                RewardType = RewardType, //奖励类型
+                CreditTradeAmt = TradeAmount, //贷记卡交易总金额
+                CreditRewardAmount = Prize, //贷记卡交易奖励金额
+                RewardDesc = RewardDesc, //奖励描述
+            });
+        }
+    }
+}

+ 1 - 0
AppStart/Helper/StatService.cs

@@ -1749,6 +1749,7 @@ namespace MySystem
                                 {
                                     TradeAmount = db.TradeDaySummary.Where(m => m.UserId == user.Id && m.TradeMonth == TradeMonth && m.SeoTitle == "team").Sum(m => m.HelpNonDirectTradeAmt + m.NotHelpNonDirectTradeAmt);
                                 }
+                                // TODO: 还要加上助利宝的交易额
                                 UserLevelSet set = sets.FirstOrDefault(m => m.UpLevelGrowth <= TradeAmount && m.UpLevelIntegral > TradeAmount);
                                 if (set != null)
                                 {

+ 3 - 0
PxcModels/AppBottomNavs.cs

@@ -25,5 +25,8 @@ namespace MySystem.PxcModels
         public string NormalIcon { get; set; }
         public string SelectIcon { get; set; }
         public string Title { get; set; }
+        public string PagPath { get; set; }
+        public string ScrollerAnimationImages { get; set; }
+        public string Style { get; set; }
     }
 }

+ 3 - 0
PxcModels/BackEndOpRecord.cs

@@ -9,8 +9,11 @@ namespace MySystem.PxcModels
         public int Sort { get; set; }
         public int QueryCount { get; set; }
         public int Status { get; set; }
+        public int Version { get; set; }
         public DateTime? CreateDate { get; set; }
         public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
         public string SeoTitle { get; set; }
         public string SeoKeyword { get; set; }
         public string SeoDescription { get; set; }

+ 47 - 0
PxcModels/BrokenMachineChange.cs

@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class BrokenMachineChange
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public string OutStoreManagerMobile { get; set; }
+        public string OutStoreManager { get; set; }
+        public string OutStoreAddress { get; set; }
+        public string OutStoreAreas { get; set; }
+        public string OutStoreName { get; set; }
+        public int OutStoreId { get; set; }
+        public string OutProductName { get; set; }
+        public int OutProductType { get; set; }
+        public int BackStoreUserId { get; set; }
+        public string Remark { get; set; }
+        public string BackStoreName { get; set; }
+        public int BackStoreId { get; set; }
+        public string ChangeSnExpand { get; set; }
+        public string OrderExpand { get; set; }
+        public DateTime? CompleteTime { get; set; }
+        public string AuditRemark { get; set; }
+        public int AuditResult { get; set; }
+        public DateTime? AuditTime { get; set; }
+        public string AuditBy { get; set; }
+        public DateTime? ChangeTime { get; set; }
+        public int ChangeDeviceNum { get; set; }
+        public string ChangeDeviceName { get; set; }
+        public string BackProductName { get; set; }
+        public int BackProductType { get; set; }
+        public int UserId { get; set; }
+        public string ChangeNo { get; set; }
+    }
+}

+ 34 - 0
PxcModels/BrokenMachineChangeDetail.cs

@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class BrokenMachineChangeDetail
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public int BackSnType { get; set; }
+        public string Remark { get; set; }
+        public int OutSnType { get; set; }
+        public string OutSnNo { get; set; }
+        public string OutProductName { get; set; }
+        public int OutProductType { get; set; }
+        public int BackDeviceStatus { get; set; }
+        public string BackSnNo { get; set; }
+        public int UserId { get; set; }
+        public string BackProductName { get; set; }
+        public int BackProductType { get; set; }
+        public int ChangeId { get; set; }
+        public string ChangeNo { get; set; }
+    }
+}

+ 33 - 0
PxcModels/HelpProfitAccountRecord.cs

@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class HelpProfitAccountRecord
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public string TransRecordNo { get; set; }
+        public string Remark { get; set; }
+        public decimal AfterBalanceAmount { get; set; }
+        public decimal BeforeBalanceAmount { get; set; }
+        public decimal AfterFreezeAmount { get; set; }
+        public decimal BeforeFreezeAmount { get; set; }
+        public decimal AfterTotalAmount { get; set; }
+        public decimal BeforeTotalAmount { get; set; }
+        public decimal ChangeAmount { get; set; }
+        public int ProductType { get; set; }
+        public int ChangeType { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 23 - 0
PxcModels/HelpProfitExchange.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class HelpProfitExchange
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public int ExchangeCount { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 25 - 0
PxcModels/HelpProfitExchangeDetail.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class HelpProfitExchangeDetail
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public int RecordId { get; set; }
+        public string ExchangeCode { get; set; }
+        public int PosCouponId { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 11 - 0
PxcModels/HelpProfitMerIds.cs

@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class HelpProfitMerIds
+    {
+        public int MerchantId { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 26 - 0
PxcModels/HelpProfitMerTradeSummay.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class HelpProfitMerTradeSummay
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public int BrandId { get; set; }
+        public decimal TradeAmount { get; set; }
+        public string TradeDate { get; set; }
+        public string TradeMonth { get; set; }
+        public int MerchantId { get; set; }
+    }
+}

+ 24 - 0
PxcModels/HelpProfitMerchantForUser.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class HelpProfitMerchantForUser
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public string MerNo { get; set; }
+        public int MerchantId { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 29 - 0
PxcModels/HelpProfitRebateDetail.cs

@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class HelpProfitRebateDetail
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public string Remark { get; set; }
+        public decimal DebitRewardAmount { get; set; }
+        public decimal CreditRewardAmount { get; set; }
+        public int MerchantId { get; set; }
+        public int ProductType { get; set; }
+        public int UserId { get; set; }
+        public string TradeDate { get; set; }
+        public string TradeMonth { get; set; }
+    }
+}

+ 33 - 0
PxcModels/HelpProfitReward.cs

@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class HelpProfitReward
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public int TopUserId { get; set; }
+        public int CheckStatus { get; set; }
+        public int RewardMerCount { get; set; }
+        public string Remark { get; set; }
+        public string RewardDesc { get; set; }
+        public string OpenRewardNo { get; set; }
+        public decimal DebitRewardAmount { get; set; }
+        public decimal CreditRewardAmount { get; set; }
+        public decimal DebitTradeAmt { get; set; }
+        public decimal CreditTradeAmt { get; set; }
+        public int RewardType { get; set; }
+        public int BrandId { get; set; }
+        public int UserId { get; set; }
+        public DateTime? TradeDate { get; set; }
+        public string TradeMonth { get; set; }
+    }
+}

+ 44 - 0
PxcModels/HelpProfitRewardDetail.cs

@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class HelpProfitRewardDetail
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public int TopUserId { get; set; }
+        public int CheckStatus { get; set; }
+        public string OpenDetailRec { get; set; }
+        public string Remark { get; set; }
+        public string RewardDesc { get; set; }
+        public string OpenRewardNo { get; set; }
+        public decimal DebitRewardAmount { get; set; }
+        public decimal CreditRewardAmount { get; set; }
+        public decimal DebitTradeAmt { get; set; }
+        public decimal CreditTradeAmt { get; set; }
+        public string RewardTips { get; set; }
+        public int RewardType { get; set; }
+        public int MerBuddyType { get; set; }
+        public int SnStoreId { get; set; }
+        public DateTime? StandardDate { get; set; }
+        public int SnApplyUserId { get; set; }
+        public int SnType { get; set; }
+        public string MerNo { get; set; }
+        public string SnNo { get; set; }
+        public int DirectUserId { get; set; }
+        public int MerchantId { get; set; }
+        public string ProductName { get; set; }
+        public int BrandId { get; set; }
+        public int UserId { get; set; }
+        public DateTime? TradeDate { get; set; }
+        public string TradeMonth { get; set; }
+    }
+}

+ 3 - 0
PxcModels/LeaderAccountRecord.cs

@@ -9,8 +9,11 @@ namespace MySystem.PxcModels
         public int Sort { get; set; }
         public int QueryCount { get; set; }
         public int Status { get; set; }
+        public int Version { get; set; }
         public DateTime? CreateDate { get; set; }
         public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
         public string SeoTitle { get; set; }
         public string SeoKeyword { get; set; }
         public string SeoDescription { get; set; }

+ 3 - 0
PxcModels/PosCoupons.cs

@@ -20,5 +20,8 @@ namespace MySystem.PxcModels
         public string ExchangeCode { get; set; }
         public int UserId { get; set; }
         public int LeaderUserId { get; set; }
+        public int HelpProfitMerchantId { get; set; }
+        public int HelpProfitStatus { get; set; }
+        public ulong HelpProfitFlag { get; set; }
     }
 }

+ 36 - 0
PxcModels/ProfitRewardExport.cs

@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class ProfitRewardExport
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public decimal DebitTradeProfit { get; set; }
+        public decimal DebitTradeAmt { get; set; }
+        public decimal NotHelpCreditTradeProfit { get; set; }
+        public decimal NotHelpCreditTradeAmt { get; set; }
+        public decimal HelpCreditTradeProfit { get; set; }
+        public decimal HelpCreditTradeAmt { get; set; }
+        public decimal NonQrCreditTradeProfit { get; set; }
+        public decimal NonQrCreditTradeAmt { get; set; }
+        public decimal QrCreditTradeProfit { get; set; }
+        public decimal QrCreditTradeAmt { get; set; }
+        public decimal CreditTradeProfit { get; set; }
+        public decimal CreditTradeAmt { get; set; }
+        public string BrandName { get; set; }
+        public string DirectFlag { get; set; }
+        public int Rank { get; set; }
+        public int UserLevel { get; set; }
+        public string RealName { get; set; }
+        public string MakerCode { get; set; }
+    }
+}

+ 77 - 0
PxcModels/ProfitRewardRecordCopy1.cs

@@ -0,0 +1,77 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class ProfitRewardRecordCopy1
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public int TopUserId { get; set; }
+        public string RecordNo { get; set; }
+        public string TradeMonth { get; set; }
+        public string Remark { get; set; }
+        public int CheckStatus { get; set; }
+        public decimal QrDebitAddOrSubRate { get; set; }
+        public decimal QrDebitProfitStandardRate { get; set; }
+        public decimal QrDebitProfitRate { get; set; }
+        public decimal QrCreditAddOrSubRate { get; set; }
+        public decimal QrCreditProfitStandardRate { get; set; }
+        public decimal QrCreditProfitRate { get; set; }
+        public decimal DebitCapSingleReward { get; set; }
+        public decimal HelpDebitAddOrSubRate { get; set; }
+        public decimal HelpDebitProfitStandardRate { get; set; }
+        public decimal HelpDebitProfitRate { get; set; }
+        public decimal NotHelpDebitAddOrSubRate { get; set; }
+        public decimal NotHelpDebitProfitStandardRate { get; set; }
+        public decimal NotHelpDebitProfitRate { get; set; }
+        public decimal HelpCreditAddOrSubRate { get; set; }
+        public decimal HelpCreditProfitStandardRate { get; set; }
+        public decimal HelpCreditProfitRate { get; set; }
+        public decimal NotHelpCreditAddOrSubRate { get; set; }
+        public decimal NotHelpCreditProfitStandardRate { get; set; }
+        public decimal NotHelpCreditProfitRate { get; set; }
+        public decimal DebitTradeCapProfit { get; set; }
+        public decimal HelpDebitNonTradeCapProfit { get; set; }
+        public decimal NotHelpDebitNonTradeCapProfit { get; set; }
+        public decimal NonQrDebitNonTradeCapProfit { get; set; }
+        public decimal QrDebitNonTradeCapProfit { get; set; }
+        public decimal DebitNonTradeCapProfit { get; set; }
+        public decimal HelpCreditTradeProfit { get; set; }
+        public decimal NotHelpCreditTradeProfit { get; set; }
+        public decimal NonQrCreditTradeProfit { get; set; }
+        public decimal QrCreditTradeProfit { get; set; }
+        public decimal CreditTradeProfit { get; set; }
+        public decimal TradeProfit { get; set; }
+        public int DebitCapTradeNum { get; set; }
+        public decimal DebitCapTradeAmt { get; set; }
+        public decimal HelpDebitNonCapTradeAmt { get; set; }
+        public decimal NotHelpDebitNonCapTradeAmt { get; set; }
+        public decimal NonQrDebitNotCapTradeAmt { get; set; }
+        public decimal QrDebitNotCapTradeAmt { get; set; }
+        public decimal DebitNonCapTradeAmt { get; set; }
+        public decimal HelpCreditTradeAmt { get; set; }
+        public decimal NotHelpCreditTradeAmt { get; set; }
+        public decimal NonQrCreditTradeAmt { get; set; }
+        public decimal QrCreditTradeAmt { get; set; }
+        public decimal CreditTradeAmt { get; set; }
+        public decimal TradeAmt { get; set; }
+        public decimal OtherDebitNotCapTradeAmt { get; set; }
+        public decimal OtherCreditTradeAmt { get; set; }
+        public decimal OtherTradeAmt { get; set; }
+        public int ProfitType { get; set; }
+        public int BrandId { get; set; }
+        public int MerchantId { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 41 - 0
PxcModels/ProfitSubsidyDetailCopy1.cs

@@ -0,0 +1,41 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class ProfitSubsidyDetailCopy1
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public string Remark { get; set; }
+        public decimal SubsidyProfit { get; set; }
+        public decimal SubsidyProfitRate { get; set; }
+        public decimal CreditProfitRate { get; set; }
+        public decimal NonQrCreditTradeAmt { get; set; }
+        public decimal QrCreditTradeAmt { get; set; }
+        public decimal CreditTradeAmt { get; set; }
+        public int SubsidyType { get; set; }
+        public int SubsidyUserId { get; set; }
+        public ulong MerHelpFlag { get; set; }
+        public int BelongUserId { get; set; }
+        public DateTime? MerStandardDate { get; set; }
+        public DateTime? MerRegTime { get; set; }
+        public string SnNo { get; set; }
+        public string MerNo { get; set; }
+        public int MerchantId { get; set; }
+        public string TradeMonth { get; set; }
+        public string ProductName { get; set; }
+        public int BrandId { get; set; }
+        public string RecordNo { get; set; }
+    }
+}

+ 28 - 0
PxcModels/ProfitSubsidyExport.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class ProfitSubsidyExport
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public decimal SubsidyProfit { get; set; }
+        public decimal CreditTradeAmt { get; set; }
+        public string BrandName { get; set; }
+        public string DirectFlag { get; set; }
+        public string MerchantName { get; set; }
+        public string KqSnNo { get; set; }
+        public int Rank { get; set; }
+        public int UserLevel { get; set; }
+        public string RealName { get; set; }
+        public string MakerCode { get; set; }
+    }
+}

+ 23 - 0
PxcModels/SchoolMakerStudy.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class SchoolMakerStudy
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public string Url { get; set; }
+        public string Contents { get; set; }
+        public string ListPic { get; set; }
+        public string Detail { get; set; }
+        public string Title { get; set; }
+    }
+}

+ 24 - 0
PxcModels/SchoolMorningMeet.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class SchoolMorningMeet
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public string Contents { get; set; }
+        public string Url { get; set; }
+        public int StudyPerson { get; set; }
+        public string Photo { get; set; }
+        public string Lecturer { get; set; }
+        public string Title { get; set; }
+    }
+}

+ 20 - 0
PxcModels/SchoolMorningMeetLog.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class SchoolMorningMeetLog
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public int UserId { get; set; }
+        public int MeetId { get; set; }
+    }
+}

+ 3 - 0
PxcModels/StoreHouseAmountPromiss.cs

@@ -9,8 +9,11 @@ namespace MySystem.PxcModels
         public int Sort { get; set; }
         public int QueryCount { get; set; }
         public int Status { get; set; }
+        public int Version { get; set; }
         public DateTime? CreateDate { get; set; }
         public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
         public string SeoTitle { get; set; }
         public string SeoKeyword { get; set; }
         public string SeoDescription { get; set; }

+ 1 - 0
PxcModels/UserAccount.cs

@@ -37,5 +37,6 @@ namespace MySystem.PxcModels
         public decimal LeaderReserve { get; set; }
         public decimal ValidAmount { get; set; }
         public decimal LeaderBalanceAmount { get; set; }
+        public decimal HelpProfitBalanceAmount { get; set; }
     }
 }

+ 3 - 1
PxcModels/Users.cs

@@ -83,8 +83,10 @@ namespace MySystem.PxcModels
         public string CashNote { get; set; }
         public decimal ThisMonthTrade { get; set; }
         public int LeaderLevel { get; set; }
-        public decimal ValidAmount { get; set; }
         public int BusinessFlag { get; set; }
+        public decimal ValidAmount { get; set; }
         public string DeviceType { get; set; }
+        public DateTime? HelpProfitAgreeDate { get; set; }
+        public ulong HelpProfitAgree { get; set; }
     }
 }

文件差异内容过多而无法显示
+ 1078 - 12
PxcModels/WebCMSEntities.cs


+ 23 - 22
Startup.cs

@@ -91,8 +91,8 @@ namespace MySystem
             // services.AddHostedService<SycnSpTimer>(); //同步SP数据
 
             // services.AddHostedService<TimerStatTimer>(); //实时统计创客、激活商户数
-            services.AddHostedService<PosTradeStatTimer>(); // 统计头天的交易额、商户型创客、激活奖励、开机奖励
-            services.AddHostedService<AlipayPayBack2Timer>(); //支付宝回调处理
+            // services.AddHostedService<PosTradeStatTimer>(); // 统计头天的交易额、商户型创客、激活奖励、开机奖励
+            // services.AddHostedService<AlipayPayBack2Timer>(); //支付宝回调处理
 
             //services.AddHttpContextAccessor();
 
@@ -190,28 +190,29 @@ namespace MySystem
             // TradeStatTimer2.Instance.Start(); //交易统计
 
             //必须打开的
-            ActiveRewardTimer.Instance.Start(); //实时处理激活记录
-            TradeStatTimer.Instance.Start(); //交易统计
-            ChangePosTimer.Instance.Start(); //售后换新执行机具数据转移
-            MakeReferenceQrCodeService.Instance.StartListen(); //生成创客邀请二维码
-            SycnSpBindService.Instance.Start(); //同步SP绑定数据
-            SycnSpMerchantService.Instance.Start(); //同步SP商户数据
-            SycnSpActiveService.Instance.Start(); //同步SP激活数据
-            SycnSpTradeService.Instance.Start(); //同步SP交易数据
-            SycnSpChangeBindService.Instance.Start(); //同步SP换绑数据
-            SycnSpUnBindService.Instance.Start(); //同步SP解绑数据
-            RedPackageV2Helper.Instance.Start(); //每天生成红包
-            RedPackageV2Helper.Instance.StartStatTop10(); //红包活动统计排行
-            RedPackageV2Helper.Instance.StartSendPrize(); //红包活动发奖
+            // ActiveRewardTimer.Instance.Start(); //实时处理激活记录
+            // TradeStatTimer.Instance.Start(); //交易统计
+            // ChangePosTimer.Instance.Start(); //售后换新执行机具数据转移
+            // MakeReferenceQrCodeService.Instance.StartListen(); //生成创客邀请二维码
+            // SycnSpBindService.Instance.Start(); //同步SP绑定数据
+            // SycnSpMerchantService.Instance.Start(); //同步SP商户数据
+            // SycnSpActiveService.Instance.Start(); //同步SP激活数据
+            // SycnSpTradeService.Instance.Start(); //同步SP交易数据
+            // SycnSpChangeBindService.Instance.Start(); //同步SP换绑数据
+            // SycnSpUnBindService.Instance.Start(); //同步SP解绑数据
+            // RedPackageV2Helper.Instance.Start(); //每天生成红包
+            // RedPackageV2Helper.Instance.StartStatTop10(); //红包活动统计排行
+            // RedPackageV2Helper.Instance.StartSendPrize(); //红包活动发奖
             BalancePayBackService.Instance.Start(); //余额支付队列
-            ReservePayBackService.Instance.Start(); //储备金支付队列
-            LeaderPrizeService.Instance.Start(); //大盟主奖励发奖
-            MessageCenterService.Instance.Start(); // 消息队列
-            RecommendActStatService.Instance.Start(); //推荐王奖励数据统计
+            // ReservePayBackService.Instance.Start(); //储备金支付队列
+            // LeaderPrizeService.Instance.Start(); //大盟主奖励发奖
+            // MessageCenterService.Instance.Start(); // 消息队列
+            // RecommendActStatService.Instance.Start(); //推荐王奖励数据统计
             //必须打开的
 
-            StoreApplyHelper.Instance.Start(); // 每月1号重置仓库额度
-            StoreApplyHelper.Instance.StartEverTime();
+            HelpProfitHelper.Instance.Start();
+            // StoreApplyHelper.Instance.Start(); // 每月1号重置仓库额度
+            // StoreApplyHelper.Instance.StartEverTime();
             // StatService.Instance.StartPosActNum(); //实时统计激活数
             // StatService.Instance.StartNewUserNum(); //实时统计新增创客数
             // StatService.Instance.StatProfit(); //实时统计创客收益
@@ -219,7 +220,7 @@ namespace MySystem
             // StatService.Instance.StartEverDay("");
             // StatService.Instance.StartEverDayV2();
             // RedPackageHelper.Instance.Start();
-            StatService.Instance.StatUserLevel();
+            // StatService.Instance.StatUserLevel();
             // ProfitHelperV2.Instance.StatProfit(); //统计分润
             // StatService.Instance.ListenFluxRecord();
             // StatService.Instance.StartEverDay2();

部分文件因为文件数量过多而无法显示