浏览代码

首页-客小爽产品-收益查看-达标奖励调整

lcl 1 年之前
父节点
当前提交
830388f25c
共有 3 个文件被更改,包括 27 次插入7 次删除
  1. 20 0
      .vscode/launch.json
  2. 6 6
      Areas/Api/Controllers/v1/MainServer/ActiveRewardController.cs
  3. 1 1
      appsettings.json

+ 20 - 0
.vscode/launch.json

@@ -23,6 +23,26 @@
                 "/Views": "${workspaceFolder}/Views"
             }
         },
+        {
+            "name": ".NET Core Launch (pro)",
+            "type": "coreclr",
+            "request": "launch",
+            "preLaunchTask": "build",
+            "program": "${workspaceFolder}/bin/Debug/netcoreapp3.0/MySystem.dll",
+            "args": [],
+            "cwd": "${workspaceFolder}",
+            "stopAtEntry": false,
+            "serverReadyAction": {
+                "action": "openExternally",
+                "pattern": "^\\s*Now listening on:\\s+(https?://\\S+)"
+            },
+            "env": {
+                "ASPNETCORE_ENVIRONMENT": "Production"
+            },
+            "sourceFileMap": {
+                "/Views": "${workspaceFolder}/Views"
+            }
+        },
         {
             "name": ".NET Core Attach",
             "type": "coreclr",

+ 6 - 6
Areas/Api/Controllers/v1/MainServer/ActiveRewardController.cs

@@ -42,10 +42,10 @@ namespace MySystem.Areas.Api.Controllers.v1.pos
             int Kind = int.Parse(function.CheckInt(data["Kind"].ToString()));
             string Date = Kind == 1 ? "%Y%m%d" : "%Y%m";
             string TradeMonthCondi = "";
-            if(Kind == 2)
+            if(Kind == 1)
             {
                 string TradeMonth = data["TradeMonth"].ToString();
-                string StartTradeMonth = TradeMonth + "-01 00:00:00";
+                string StartTradeMonth = TradeMonth.Substring(0, 4) + "-" + TradeMonth.Substring(4, 2) + "-01 00:00:00";
                 string EndTradeMonth = DateTime.Parse(StartTradeMonth).AddMonths(1).ToString("yyyy-MM-dd HH:mm:ss");
                 TradeMonthCondi = " and CreateDate>='" + StartTradeMonth + "' and CreateDate<'" + EndTradeMonth + "'";
             }
@@ -96,8 +96,8 @@ namespace MySystem.Areas.Api.Controllers.v1.pos
             int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
             int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
             List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
-            DateTime start = DateTime.Parse(ActDate + " 00:00:00");
-            DateTime end = DateTime.Parse(ActDate + " 23:59:59");
+            DateTime start = DateTime.Parse(ActDate.Substring(0, 4) + "-" + ActDate.Substring(4, 2) + "-" + ActDate.Substring(6, 2) + " 00:00:00");
+            DateTime end = DateTime.Parse(ActDate.Substring(0, 4) + "-" + ActDate.Substring(4, 2) + "-" + ActDate.Substring(6, 2) + " 23:59:59");
             IQueryable<ActiveReward> query = maindb.ActiveReward.Where(m => m.UserId == UserId && m.CreateDate >= start && m.CreateDate <= end);
             if (PageNum == 1)
             {
@@ -111,9 +111,9 @@ namespace MySystem.Areas.Api.Controllers.v1.pos
             foreach (var subdata in query.ToList())
             {
                 Dictionary<string, object> curData = new Dictionary<string, object>();
-                PosMerchantInfo merchant = PosMerchantInfoDbconn.Instance.Get(subdata.MerchantId) ?? new PosMerchantInfo();
+                MerchantInfo merchant = MerchantInfoDbconn.Instance.Get(subdata.MerchantId) ?? new MerchantInfo();
                 curData.Add("SnNo", subdata.KqSnNo);
-                curData.Add("MerchantName", merchant.MerchantName); //商户名称
+                curData.Add("MerchantName", merchant.Name); //商户名称
                 curData.Add("RewardAmount", subdata.RewardAmount); //奖励金额
                 dataList.Add(curData);
             }

+ 1 - 1
appsettings.json

@@ -22,7 +22,7 @@
     "StatSqlConnStr": "server=rm-2vc27k81v217qs1t55o.mysql.cn-chengdu.rds.aliyuncs.com;port=3306;user=QrCodePlateMainServer;password=ll4DFaALMu9YIooM;database=QrCodePlateStatServer;charset=utf8;",
     "SqlConnStr2": "server=rm-2vc27k81v217qs1t55o.mysql.cn-chengdu.rds.aliyuncs.com;port=3306;user=QrCodePlateMainServer;password=ll4DFaALMu9YIooM;database=QrCodePlateMainServer2;charset=utf8;",
     "BsSqlConnStr": "server=rm-2vc27k81v217qs1t55o.mysql.cn-chengdu.rds.aliyuncs.com;port=3306;user=QrCodePlateBsServer;password=ld5Px33wvhyEz44P;database=QrCodePlateBsServer;charset=utf8;",
-    "RedisConnStr": "redis:6379,password=kxsmp@2023,DefaultDatabase=0,poolsize=500,preheat=50,asyncPipeline=true",
+    "RedisConnStr": "8.137.99.48:6379,password=kxsmp@2023,DefaultDatabase=0,poolsize=500,preheat=50,asyncPipeline=true",
     "IOSAppVersion": "1.0.0",
     "AndroidAppVersion": "1.0.0",
     "OSSKey": "",