Sfoglia il codice sorgente

Merge branch 'develop' of http://47.109.31.237:13000/kxs-end/admin-server into DuGuYang
调整收支明细显示问题

DuGuYang 2 anni fa
parent
commit
a6fedd65b6

+ 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;

+ 3 - 1
Areas/Admin/Controllers/MainServer/UserAccountRecordController.cs

@@ -190,8 +190,10 @@ namespace MySystem.Areas.Admin.Controllers
                     dic["TopMakerCode"] = tuser.MakerCode;
                     dic["TopRealName"] = tuser.RealName;
                 }
+                var ProductTypeName = "";
                 int ProductTypes = int.Parse(dic["ProductType"].ToString());
-                dic["ProductTypeName"] = RelationClass.GetKqProductBrandInfo(ProductTypes);
+                if (ProductTypes > 0) ProductTypeName = RelationClass.GetKqProductBrandInfo(ProductTypes);
+                dic["ProductTypeName"] = ProductTypeName;
                 int ChangeTypes = int.Parse(dic["ChangeType"].ToString());
                 dic["ChangeTypeName"] = RelationClassForConst.GetChangeTypeInfo(ChangeTypes);
 

+ 4 - 4
Startup.cs

@@ -167,10 +167,10 @@ namespace MySystem
         private void initMainServer(string Env)
         {
             string dbName = "KxsMainServer";
-            // if(Env == "Production")
-            // {
-            //     dbName = "KxsProfitServer";
-            // }
+            if(Env == "Production")
+            {
+                dbName = "KxsProfitServer";
+            }
             Dictionary<string, Dictionary<string, string>> tables = new Dictionary<string, Dictionary<string, string>>();
             Library.OtherMySqlConn.connstr = Configuration["Setting:SqlConnStr"];
             System.Data.DataTable tablecollection = Library.OtherMySqlConn.dtable("select DISTINCT TABLE_NAME from information_schema.columns where table_schema = '" + dbName + "'");