Jelajahi Sumber

修正展示分润

lcl 2 tahun lalu
induk
melakukan
94bbce24aa
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      AppStart/Helper/SycnProfitServiceV3.cs

+ 1 - 1
AppStart/Helper/SycnProfitServiceV3.cs

@@ -75,7 +75,7 @@ namespace MySystem
             {
                 StartId = "0";
             }
-            OtherMySqlConn.op("insert into ProfitRecord (CreateDate,CreateMan,SeoTitle,ParentNav,BrandId,UserId,DirectFlag,ProfitAmount) select now(),'root','" + date + "',(select ParentNav from Users where Id=p.UserId)," + BrandId + ",UserId,ProfitType,sum(CreditTradeProfit+DebitNonTradeCapProfit+DebitTradeCapProfit) from ProfitRewardRecord p where Id>=" + StartId + " and CheckStatus=0 and BrandId=" + BrandId + " and UserId>0 and TradeMonth='" + date + "' group by UserId,ProfitType order by UserId");
+            OtherMySqlConn.op("insert into ProfitRecord (CreateDate,CreateMan,SeoTitle,ParentNav,BrandId,UserId,DirectFlag,SeoDescription,ProfitAmount) select now(),'root','" + date + "',(select ParentNav from Users where Id=p.UserId)," + BrandId + ",UserId,ProfitType,(case when Version=1 then '存量' else '新增' end),sum(CreditTradeProfit+DebitNonTradeCapProfit+DebitTradeCapProfit) from ProfitRewardRecord p where Id>=" + StartId + " and CheckStatus=0 and BrandId=" + BrandId + " and UserId>0 and TradeMonth='" + date + "' group by UserId,ProfitType,Version order by UserId");
             DataTable dt = OtherMySqlConn.dtable("select UserId,sum(CreditTradeProfit+DebitNonTradeCapProfit+DebitTradeCapProfit) from ProfitRewardRecord where Id>=" + StartId + " and CheckStatus=0 and BrandId=" + BrandId + " and UserId>0 and TradeMonth='" + date + "' group by UserId");
             function.WriteLog("分润:" + BrandId + ":" + dt.Rows.Count, "同步分润数据");
             int index = 0;