From aff9aac26e1d8689f458a6cc74a580453ba347ef Mon Sep 17 00:00:00 2001
From: wzp <2040239371@qq.com>
Date: 星期一, 21 十一月 2022 15:19:45 +0800
Subject: [PATCH] 优化代码

---
 web/Dao/GwClientDao.cs  |    5 ++++-
 web/Lib/Dao.dll         |    0 
 web/web/Bin/Dao.dll     |    0 
 web/web/GwProduct.ashx  |   11 +++++++++--
 web/.vs/Web/v16/.suo    |    0 
 web/web/GwOrder.ashx    |    5 ++---
 web/web/gwspupdate.aspx |   12 ++++++------
 web/Lib/Dao.pdb         |    0 
 web/web/Bin/Dao.pdb     |    0 
 9 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/web/.vs/Web/v16/.suo b/web/.vs/Web/v16/.suo
index b2cc19e..09edc4e 100644
--- a/web/.vs/Web/v16/.suo
+++ b/web/.vs/Web/v16/.suo
Binary files differ
diff --git a/web/Dao/GwClientDao.cs b/web/Dao/GwClientDao.cs
index 4b02d9d..5414c9e 100644
--- a/web/Dao/GwClientDao.cs
+++ b/web/Dao/GwClientDao.cs
@@ -305,7 +305,10 @@
          */
         public bool UpdateClientAmount(Int64 AddBalance, Int64 payAmount, string clientId )
         {
-            return OracleHelper.ExecuteSql("UPDATE GW_CLIENT SET BALANCE=(BALANCE + :BALANCE), TOP_UP_AMOUNT_TOTAL=(TOP_UP_AMOUNT_TOTAL + :TOP_UP_AMOUNT_TOTAL) WHERE CLIENT_ID=:CLIENT_ID", OracleHelper.Connection, new OracleParameter(":BALANCE", (object)AddBalance), new OracleParameter(":TOP_UP_AMOUNT_TOTAL", (object)payAmount), new OracleParameter(":CLIENT_ID", (object)clientId)) > 0;
+            return OracleHelper.ExecuteSql("UPDATE GW_CLIENT SET BALANCE=(BALANCE + :BALANCE)," +
+                " TOP_UP_AMOUNT_TOTAL=(TOP_UP_AMOUNT_TOTAL + :TOP_UP_AMOUNT_TOTAL) WHERE CLIENT_ID=:CLIENT_ID", 
+                OracleHelper.Connection, new OracleParameter(":BALANCE", (object)AddBalance), 
+                new OracleParameter(":TOP_UP_AMOUNT_TOTAL", (object)payAmount), new OracleParameter(":CLIENT_ID", (object)clientId)) > 0;
         }
 
         public bool UpdateClientProduct(string clientId, string productId)
diff --git a/web/Lib/Dao.dll b/web/Lib/Dao.dll
index 95c2d16..e06ece8 100644
--- a/web/Lib/Dao.dll
+++ b/web/Lib/Dao.dll
Binary files differ
diff --git a/web/Lib/Dao.pdb b/web/Lib/Dao.pdb
index 64fb680..aec911e 100644
--- a/web/Lib/Dao.pdb
+++ b/web/Lib/Dao.pdb
Binary files differ
diff --git a/web/web/Bin/Dao.dll b/web/web/Bin/Dao.dll
index 95c2d16..e06ece8 100644
--- a/web/web/Bin/Dao.dll
+++ b/web/web/Bin/Dao.dll
Binary files differ
diff --git a/web/web/Bin/Dao.pdb b/web/web/Bin/Dao.pdb
index 64fb680..aec911e 100644
--- a/web/web/Bin/Dao.pdb
+++ b/web/web/Bin/Dao.pdb
Binary files differ
diff --git a/web/web/GwOrder.ashx b/web/web/GwOrder.ashx
index 6718de6..2289a51 100644
--- a/web/web/GwOrder.ashx
+++ b/web/web/GwOrder.ashx
@@ -316,7 +316,7 @@
         Int64 basicNum = context.GetInt64("basicNum");
         Int64 givingNum = context.GetInt64("givingNum");
         string clientId = "";
-        Int64 payAmount = 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);
@@ -325,7 +325,7 @@
         int status = context.GetInt("status");  //0-瀹℃牳涓嶉�氳繃锛�1-瀹℃牳閫氳繃
         string auditReason = context.GetString("auditReason");
 
-        if (status == 0 && string.IsNullOrEmpty(auditReason) )
+        if (status == 0 && string.IsNullOrEmpty(auditReason))
         {
             throw new ArgumentException("璇疯緭鍏ヤ笉閫氳繃鍘熷洜锛�");
         }
@@ -425,7 +425,6 @@
                 nextSort = nowSort + 1;
                 //鑾峰彇瀹℃牳娴佺▼鐨勭涓�鐜妭娴佺▼浠g爜
                 nextFlowCode = getNextFlowCode(flowGroup, nextSort);
-
             }
 
         }
diff --git a/web/web/GwProduct.ashx b/web/web/GwProduct.ashx
index 1c965d3..b8f3d18 100644
--- a/web/web/GwProduct.ashx
+++ b/web/web/GwProduct.ashx
@@ -265,7 +265,7 @@
         int ctGroupid = 0;
         int price = 0;
         int givingNum = 0;
-            
+
         string parentId = context.GetString("parentId", "");
         string path = "";
         if (string.IsNullOrEmpty(parentId) )
@@ -453,9 +453,16 @@
         int ctGroupid = 0;
         int price = 0;
         int givingNum = 0;
-            
+
         string parentId = context.GetString("parentId", "");
         string path = "";
+
+        if (id == parentId)
+        {
+            throw new ArgumentException("鐖剁骇鍒嗙被id涓嶈兘閫夊綋鍓嶇被鍒紒璇烽噸鏂伴�夋嫨");
+        }
+
+
         if (string.IsNullOrEmpty(parentId) )
         {
             path = "0";
diff --git a/web/web/gwspupdate.aspx b/web/web/gwspupdate.aspx
index 36ae177..ca4025a 100644
--- a/web/web/gwspupdate.aspx
+++ b/web/web/gwspupdate.aspx
@@ -1118,7 +1118,7 @@
                     <th>鐪佺綉鍒嗘祦锛�</th>
                     <td><input type="checkbox" value="1" name="ProvincialNetworkMode" id="ProvincialNetworkMode" <%=GwSp.ProvincialNetworkMode==1? "checked":"" %> />&nbsp;鏄惁鍚敤鐪佺綉鍒嗘祦</td>
                 </tr>
-                <tr>
+                <%--<tr>
                     <th>鍒嗗寘鏉℃暟锛�</th>
                     <td>
                         <input type="text" name="SubPackageNum" id="SubPackageNum" style="width: 50px;" maxlength="10" value="<%=(double)GwSp.SubPackageNum%>"
@@ -1131,20 +1131,20 @@
                             onkeyup="value=value.replace(/[^\d]/g,'')" onpaste="value=value.replace(/[^\d]/g,'')"
                             oncontextmenu="return false" />
                         &nbsp;榛樿0琛ㄧず涓嶉檺鍒讹紝鍚敤闄愬埗鍚庡皬浜庤鎻愪氦鏉℃暟鐨勫皢琚嫆缁濄��</td>
-                </tr>
+                </tr>--%>
                 <tr>
                     <th>鏄惁鏄剧ず鍗曚环锛�</th>
                     <td>
                         <input type="radio" class="icheck-me" name="IsDispalyPrice" value="0" <%=(GwSp.IsDispalyPrice==0 ? "checked":"")%> /><label>鍚�</label>
                         <input type="radio" class="icheck-me" name="IsDispalyPrice" value="1" <%=(GwSp.IsDispalyPrice==1 ? "checked":"")%> /><label>鏄�</label>
                         </td>
-                    <th>鎵h垂鏂瑰紡锛�</th>
+                    <%--<th>鎵h垂鏂瑰紡锛�</th>
                     <td>
                         <input type="radio" class="icheck-me" name="DeductionMode" value="1" <%=(GwSp.DeductionMode==1 ? "checked":"")%>/><label>鎻愪氦閲�</label>
                         <input type="radio" class="icheck-me" name="DeductionMode" value="2" <%=(GwSp.DeductionMode==2 ? "checked":"")%> /><label>鎴愬姛閲�</label>
-                        </td>
+                        </td>--%>
                 </tr>
-                <tr>
+                <%--<tr>
                     <th>鍙戦�佹槸鍚﹀鏍革細</th>
                     <td colspan="3">
                         <span id="IsSendAuditSpan">
@@ -1179,7 +1179,7 @@
                             </div>
                         </div>
                     </td>
-                </tr>
+                </tr>--%>
             </table>
         </div>            
         <!-- 楂樼骇鍙傛暟閰嶇疆锛氱粨鏉� -->

--
Gitblit v1.9.1