From 705909e14fe4e9f2fc261ee4eb40a8b41fa2f6d4 Mon Sep 17 00:00:00 2001
From: wzp <2880584989@qq.com>
Date: 星期二, 12 七月 2022 17:37:26 +0800
Subject: [PATCH] 增加免密登陆的token

---
 web/web/GwOrder.ashx |   69 +++++++++++++++++-----------------
 1 files changed, 35 insertions(+), 34 deletions(-)

diff --git a/web/web/GwOrder.ashx b/web/web/GwOrder.ashx
index b1a5ef4..041cf20 100644
--- a/web/web/GwOrder.ashx
+++ b/web/web/GwOrder.ashx
@@ -25,7 +25,7 @@
     //private List<GwProduct> _ProductClassList;  //浜у搧鍒嗙被
     
     private int _userId = -1;
-    private int _userType = -1;
+    private string _userType = "";
     private string _account = "";
 
     public override JsonPageResult ProcessRequestInternal(PageContext<SysUser> context)
@@ -80,7 +80,7 @@
             
         string permissionsSQL = new GwClientDao().GetClientPermissions(_userId, _userType, "GWC");
 
-        List<GwOrder> list = _Dao.LoadInfoList(spId, clientId, compay, flag, startDate, endDate, pageSize, pageIndex, permissionsSQL, out recordCount);
+        List<GwOrder> list = _Dao.LoadInfoList(spId, clientId, compay, flag, startDate, endDate.AddDays(1.0), pageSize, pageIndex, permissionsSQL, out recordCount);
 
         string str1 = "";
         if (list != null && list.Count > 0)
@@ -142,7 +142,7 @@
             
         string permissionsSQL = new GwClientDao().GetClientPermissions(_userId, _userType, "GWC");
 
-        List<GwOrder> list = _Dao.LoadInfoList(spId, clientId, company, flag, startDate, endDate, pageSize, pageIndex, permissionsSQL, out recordCount);
+        List<GwOrder> list = _Dao.LoadInfoList(spId, clientId, company, flag, startDate, endDate.AddDays(1.0), pageSize, pageIndex, permissionsSQL, out recordCount);
 
         string str1 = "";
         if (list != null && list.Count > 0)
@@ -313,11 +313,11 @@
     {
         string spId = context.GetString("spId");
         string orderId = context.GetString("orderId");
-        int basicNum = context.GetInt("basicNum");
-        int givingNum = context.GetInt("givingNum");
+        Int64 basicNum = context.GetInt64("basicNum");
+        Int64 givingNum = context.GetInt64("givingNum");
         string clientId = "";
-        int payAmount = 0;
-        int tmpPayAmount = Math.Max((int) (context.GetDecimal("payAmount", new Decimal(4, 0, 0, false, (byte) 2)) * new Decimal(1000)), 0);
+        Int64 payAmount = 0;
+        Int64 tmpPayAmount = Math.Max((int) (context.GetDecimal("payAmount", new Decimal(4, 0, 0, false, (byte) 2)) * new Decimal(1000)), 0);
         payAmount = tmpPayAmount;
         //double price = context.GetDecimal(price);
         int num = Math.Max((int) (context.GetDecimal("price", new Decimal(4, 0, 0, false, (byte) 2)) * new Decimal(1000)), 0);
@@ -455,10 +455,10 @@
         }
         else if(status==1)
         {
-            int beforeBasicNum = 0;
-            int beforeGivingNum = 0;
-            int balance = 0;
-            int topUpAmountTotal = 0;
+            Int64 beforeBasicNum = 0;
+            Int64 beforeGivingNum = 0;
+            Int64 balance = 0;
+            Int64 topUpAmountTotal = 0;
             if (string.IsNullOrEmpty(nextFlowCode))
             {
                 orderStatus = 2;                    
@@ -472,8 +472,8 @@
 
                 //鑾峰彇瀹㈡埛淇℃伅
                 GwClient gwClient = _GwClientDao.Get(gwSp.ClientID);
-                balance =  int.Parse(gwClient.Balance.ToString() );
-                topUpAmountTotal = int.Parse(gwClient.Top_up_Amount_Total.ToString() );
+                balance =  Int64.Parse(gwClient.Balance.ToString() );
+                topUpAmountTotal = Int64.Parse(gwClient.Top_up_Amount_Total.ToString() );
 
                 //涓�1-棰勪粯璐�
                 //if (gwSp.ChargeType==1 && (balance + payAmount) < num * basicNum)
@@ -544,21 +544,21 @@
         string clientId = context.GetString("clientId");
         string productId = context.GetString("productId");
         //string comboId = context.GetString("comboId");
-        int basicNum = context.GetInt("basicNum", 0);
-        int givingNum = context.GetInt("givingNum", 0);
+        Int64 basicNum = context.GetInt("basicNum", 0);
+        Int64 givingNum = context.GetInt("givingNum", 0);
         int price = 0;
 
-        int orderNumTotal = context.GetInt("orderNumTotal", 0);
-        int orderAmountTotal = context.GetInt("orderAmountTotal", 0);
-        int payAmount = 0;
-        int beforeBalanceNum = context.GetInt("beforeBalanceNum", 0);
+        Int64 orderNumTotal = context.GetInt("orderNumTotal", 0);
+        Int64 orderAmountTotal = context.GetInt("orderAmountTotal", 0);
+        Int64 payAmount = 0;
+        Int64 beforeBalanceNum = context.GetInt("beforeBalanceNum", 0);
         //瀹㈡湇浜哄憳鎻愪氦璁㈠崟鏃剁殑鐘舵�佷负1-瀹℃牳涓��
         int status = 1; //0-寰呭鏍革紙宸叉彁浜わ級锛�1-瀹℃牳涓紱2-瀹℃牳閫氳繃锛�3-瀹℃牳涓嶉�氳繃锛�4-鍙栨秷锛涚敵璇疯鍗曞湪鏈鏍告儏鍐典笅鍙互鍙栨秷銆�
         string remark = context.GetString("remark");
         DateTime createTime = DateTime.Now;
         string creator = context.OperatorID;
 
-        int tmpPayAmount = Math.Max((int) (context.GetDecimal("payAmount", new Decimal(4, 0, 0, false, (byte) 2)) * new Decimal(1000)), 0);
+        Int64 tmpPayAmount = Math.Max((Int64) (context.GetDecimal("payAmount", new Decimal(4, 0, 0, false, (byte) 2)) * new Decimal(1000)), 0);
         payAmount = tmpPayAmount;
         int num = Math.Max((int) (context.GetDecimal("price", new Decimal(4, 0, 0, false, (byte) 2)) * new Decimal(1000)), 0);
         price = num;
@@ -587,7 +587,7 @@
 
         //鑾峰彇璐﹀彿淇℃伅
         GwSp gwSp = _GwSpDao.Get(spId);
-        int balance = 0;
+        Int64 balance = 0;
         if (gwSp == null)
         {
             throw new ArgumentException("璐﹀彿涓嶅瓨鍦紒");
@@ -600,7 +600,7 @@
 
         //鑾峰彇瀹㈡埛淇℃伅
         GwClient gwClient = _GwClientDao.Get(gwSp.ClientID);
-        balance =  int.Parse(gwClient.Balance.ToString() );
+        balance =  Int64.Parse(gwClient.Balance.ToString() );
 
         //涓�1-棰勪粯璐�
         //if (gwSp.ChargeType==1 && (balance + payAmount) < num * basicNum)
@@ -727,20 +727,20 @@
         string clientId = context.GetString("clientId");
         string productId = context.GetString("productId");
         string comboId = context.GetString("clientId");
-        int basicNum = context.GetInt("basicNum", 0);
-        int givingNum = context.GetInt("givingNum", 0);
+        Int64 basicNum = context.GetInt("basicNum", 0);
+        Int64 givingNum = context.GetInt("givingNum", 0);
         int price = 0;
 
-        int orderNumTotal = context.GetInt("orderNumTotal", 0);
-        int orderAmountTotal = context.GetInt("orderAmountTotal", 0);
-        int payAmount = 0;
-        int beforeBalanceNum = context.GetInt("beforeBalanceNum", 0);
+        Int64 orderNumTotal = context.GetInt("orderNumTotal", 0);
+        Int64 orderAmountTotal = context.GetInt("orderAmountTotal", 0);
+        Int64 payAmount = 0;
+        Int64 beforeBalanceNum = context.GetInt("beforeBalanceNum", 0);
         int status = 0;
         string remark = context.GetString("remark");
         DateTime createTime = DateTime.Now;
         string creator = context.OperatorID;
 
-        int tmpPayAmount = Math.Max((int) (context.GetDecimal("payAmount", new Decimal(4, 0, 0, false, (byte) 2)) * new Decimal(1000)), 0);
+        Int64 tmpPayAmount = Math.Max((Int64) (context.GetDecimal("payAmount", new Decimal(4, 0, 0, false, (byte) 2)) * new Decimal(1000)), 0);
         payAmount = tmpPayAmount;
 
         int num = Math.Max((int) (context.GetDecimal("price", new Decimal(4, 0, 0, false, (byte) 2)) * new Decimal(1000)), 0);
@@ -817,23 +817,24 @@
 
             }
 
+            
+            GwOrder gwOrder = new GwOrder();
 
             GwClient gwClient = new GwClient();
             using (GwClientDao gwClientDao = new GwClientDao())
             {
                 gwClient = gwClientDao.Get(gwSp.ClientID);
+                gwOrder.Company = gwClient.Company;
+                gwOrder.Balance = long.Parse(gwClient.Balance.ToString() );    //浣欓
             }
 
-
-            GwOrder gwOrder = new GwOrder();
                 gwOrder.SpId = gwSp.SpID;
                 gwOrder.ClientId = gwSp.ClientID;
                 gwOrder.ProductId = gwSp.ProductId;
+                gwOrder.ProductName = gwSp.ProductName;
                 gwOrder.Price = gwSp.Price;
                 gwOrder.BasicNum = gwSp.BasicNum;  //鍩烘湰鏉℃暟
-                gwOrder.GivingNum = gwSp.GivingNum;
-                
-                gwOrder.Balance = long.Parse(gwClient.Balance.ToString() );    //浣欓
+                gwOrder.GivingNum = gwSp.GivingNum;                
                 
             return new JsonPageResult(true, gwOrder);
         }

--
Gitblit v1.9.1