瀏覽代碼

数据库字符串加密

zhoufan 3 年之前
父節點
當前提交
b5d0cf82cd
共有 36 個文件被更改,包括 49 次插入21567 次删除
  1. 33 1
      CallCenterApi/CallCenterApi.BLL/T_Sys_SeatGroup.cs
  2. 1 1
      CallCenterApi/CallCenterApi.DB/DbHelperSQL.cs
  3. 13 0
      CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/HomeController.cs
  4. 1 1
      CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallInScreenController.cs
  5. 1 1
      CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Web.config
  6. 二進制
      Push/bin/Debug/Newtonsoft.Json.dll
  7. 0 10760
      Push/bin/Debug/Newtonsoft.Json.xml
  8. 二進制
      Push/bin/Debug/Push.exe
  9. 0 6
      Push/bin/Debug/Push.exe.config
  10. 二進制
      Push/bin/Debug/Push.pdb
  11. 二進制
      Push/bin/Release/Newtonsoft.Json.dll
  12. 0 10760
      Push/bin/Release/Newtonsoft.Json.xml
  13. 二進制
      Push/bin/Release/Push.exe
  14. 0 6
      Push/bin/Release/Push.exe.config
  15. 二進制
      Push/bin/Release/Push.pdb
  16. 0 4
      Push/obj/Debug/.NETFramework,Version=v4.6.1.AssemblyAttributes.cs
  17. 二進制
      Push/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  18. 二進制
      Push/obj/Debug/Push.csproj.AssemblyReference.cache
  19. 0 0
      Push/obj/Debug/Push.csproj.CopyComplete
  20. 0 1
      Push/obj/Debug/Push.csproj.CoreCompileInputs.cache
  21. 0 11
      Push/obj/Debug/Push.csproj.FileListAbsolute.txt
  22. 0 0
      Push/obj/Debug/Push.csproj.SuggestedBindingRedirects.cache
  23. 二進制
      Push/obj/Debug/Push.exe
  24. 二進制
      Push/obj/Debug/Push.pdb
  25. 0 4
      Push/obj/Release/.NETFramework,Version=v4.6.1.AssemblyAttributes.cs
  26. 二進制
      Push/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache
  27. 二進制
      Push/obj/Release/Push.csproj.AssemblyReference.cache
  28. 0 0
      Push/obj/Release/Push.csproj.CopyComplete
  29. 0 1
      Push/obj/Release/Push.csproj.CoreCompileInputs.cache
  30. 0 10
      Push/obj/Release/Push.csproj.FileListAbsolute.txt
  31. 二進制
      Push/obj/Release/Push.csprojAssemblyReference.cache
  32. 二進制
      Push/obj/Release/Push.exe
  33. 二進制
      Push/obj/Release/Push.pdb
  34. 0 0
      Push/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
  35. 0 0
      Push/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
  36. 0 0
      Push/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs

+ 33 - 1
CallCenterApi/CallCenterApi.BLL/T_Sys_SeatGroup.cs

@@ -2,6 +2,8 @@
2 2
 using System.Data;
3 3
 using System.Collections.Generic;
4 4
 using CallCenterApi.Model;
5
+using CallCenter.Utility;
6
+
5 7
 namespace CallCenterApi.BLL
6 8
 {
7 9
     /// <summary>
@@ -19,6 +21,7 @@ namespace CallCenterApi.BLL
19 21
         /// </summary>
20 22
         public int Add(CallCenterApi.Model.T_Sys_SeatGroup model)
21 23
         {
24
+            OutRedis();
22 25
             return dal.Add(model);
23 26
         }
24 27
 
@@ -27,6 +30,7 @@ namespace CallCenterApi.BLL
27 30
         /// </summary>
28 31
         public bool Update(CallCenterApi.Model.T_Sys_SeatGroup model)
29 32
         {
33
+            OutRedis();
30 34
             return dal.Update(model);
31 35
         }
32 36
 
@@ -35,7 +39,7 @@ namespace CallCenterApi.BLL
35 39
         /// </summary>
36 40
         public bool Delete(int F_ID)
37 41
         {
38
-
42
+            OutRedis();
39 43
             return dal.Delete(F_ID);
40 44
         }
41 45
         /// <summary>
@@ -43,6 +47,7 @@ namespace CallCenterApi.BLL
43 47
         /// </summary>
44 48
         public bool DeleteList(string F_IDlist)
45 49
         {
50
+            OutRedis();
46 51
             return dal.DeleteList(F_IDlist);
47 52
         }
48 53
 
@@ -132,6 +137,33 @@ namespace CallCenterApi.BLL
132 137
         #endregion  BasicMethod
133 138
         #region  ExtensionMethod
134 139
 
140
+        private DataTable GetRedis()
141
+        {
142
+            var strList = RedisHelper.StringGet("T_Sys_SeatGroup");
143
+            if (strList != null)
144
+            {
145
+                return strList.ToString().ToObject<DataTable>();
146
+            }
147
+            else
148
+            {
149
+                return InRedis();
150
+            }
151
+        }
152
+
153
+        private DataTable InRedis()
154
+        {
155
+            var dt = dal.GetList("").Tables[0];
156
+
157
+            RedisHelper.StringSet("T_Sys_SeatGroup", dt.ToJson(), new TimeSpan(24, 0, 0));
158
+
159
+            return dt;
160
+        }
161
+
162
+        private void OutRedis()
163
+        {
164
+            RedisHelper.KeyDelete("T_Sys_SeatGroup");
165
+        }
166
+
135 167
         #endregion  ExtensionMethod
136 168
     }
137 169
 }

+ 1 - 1
CallCenterApi/CallCenterApi.DB/DbHelperSQL.cs

@@ -15,7 +15,7 @@ namespace CallCenterApi.DB
15 15
     public abstract class DbHelperSQL
16 16
     {
17 17
         //数据库连接字符串(web.config来配置),可以动态更改connectionString支持多数据库.		
18
-        public static string connectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
18
+        public static string connectionString = EncryptHelper.DecryptAES(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
19 19
         public static Log log = LogFactory.GetLogger("DbHelperSQL");
20 20
         public DbHelperSQL() { }
21 21
 

+ 13 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/HomeController.cs

@@ -22,8 +22,21 @@ namespace CallCenterApi.Interface.Controllers
22 22
         // GET: Home
23 23
         public ActionResult Index()
24 24
         {
25
+            //string result = EncryptHelper.EncryptAES("Data Source=192.168.8.3;User ID=sa;pwd=800100;Connection Timeout=2880000;Initial Catalog=SQ12345;");
26
+            
27
+            //string result = EncryptHelper.EncryptAES("Data Source = 172.16.1.7; User ID = sa; pwd = sqszrx12345; Connection Timeout = 3600; Initial Catalog = SQSZRX;");
25 28
             return Success("成功");
26 29
         }
30
+        public ActionResult Index1()
31
+        {
32
+            string result = DB.DbHelperSQL.GetSingle("select count(1) from T_Sys_UserAccount").ToString();
33
+            return Success("成功");
34
+        }
35
+        public ActionResult Index2(string url)
36
+        {
37
+            string result = EncryptHelper.DecryptAES(url);
38
+            return Success(result);
39
+        }
27 40
         [Authorize]
28 41
         public JsonResult json1()
29 42
         {

+ 1 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallInScreenController.cs

@@ -516,7 +516,7 @@ namespace CallCenterApi.Interface.Controllers.tel
516 516
             {
517 517
                 //vmodel.F_CallOutType = tid;
518 518
                 //if (new BLL.T_Call_CallRecords().Update(vmodel))
519
-                bool bl = DbHelperSQL.ExecuteSql1("update T_Call_CallRecords set F_CallInType=" + tid + " where CallRecordsId=" + vmodel.CallRecordsId) > 0;
519
+                bool bl = DbHelperSQL.ExecuteSql1("update T_Call_CallRecords set F_CallOutType=" + tid + " where CallRecordsId=" + vmodel.CallRecordsId) > 0;
520 520
                 if (bl)
521 521
                 {
522 522
                     return Success("操作成功");

+ 1 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Web.config

@@ -24,7 +24,7 @@
24 24
   <connectionStrings>
25 25
     <!--<add name="ConnectionString" connectionString="Data Source=192.168.4.18;User ID=sa;pwd=800100;Initial Catalog=SQ12345;"/>-->
26 26
     <!--<add name="ConnectionString" connectionString="Data Source=192.168.8.3;User ID=sa;pwd=800100;Initial Catalog=SQ12345;"/>-->
27
-    <add name="ConnectionString" connectionString="Data Source=192.168.8.3;User ID=sa;pwd=800100;Connection Timeout=2880000;Initial Catalog=SQ12345;"/>
27
+    <add name="ConnectionString" connectionString="+W8IUPbrCEH773KLes7fVCZXGyev2Glt1NnofzL1brrJvKyuORdNZq/9XMcFT7XXE/a/bfQj+Y06yLwqPdh4aRR/269d0uZTWIHmvd/Z2bV7Hwa74N5f6UwjDzebHiqu2K1yU3vav+tx9H+n2D4y2Q=="/>
28 28
   </connectionStrings>
29 29
   <system.web>
30 30
     <compilation debug="true" targetFramework="4.5"/>

二進制
Push/bin/Debug/Newtonsoft.Json.dll


File diff suppressed because it is too large
+ 0 - 10760
Push/bin/Debug/Newtonsoft.Json.xml


二進制
Push/bin/Debug/Push.exe


+ 0 - 6
Push/bin/Debug/Push.exe.config

@@ -1,6 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8" ?>
2
-<configuration>
3
-    <startup> 
4
-        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
5
-    </startup>
6
-</configuration>

二進制
Push/bin/Debug/Push.pdb


二進制
Push/bin/Release/Newtonsoft.Json.dll


File diff suppressed because it is too large
+ 0 - 10760
Push/bin/Release/Newtonsoft.Json.xml


二進制
Push/bin/Release/Push.exe


+ 0 - 6
Push/bin/Release/Push.exe.config

@@ -1,6 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8" ?>
2
-<configuration>
3
-    <startup> 
4
-        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
5
-    </startup>
6
-</configuration>

二進制
Push/bin/Release/Push.pdb


+ 0 - 4
Push/obj/Debug/.NETFramework,Version=v4.6.1.AssemblyAttributes.cs

@@ -1,4 +0,0 @@
1
-// <autogenerated />
2
-using System;
3
-using System.Reflection;
4
-[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.1", FrameworkDisplayName = ".NET Framework 4.6.1")]

二進制
Push/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache


二進制
Push/obj/Debug/Push.csproj.AssemblyReference.cache


+ 0 - 0
Push/obj/Debug/Push.csproj.CopyComplete


+ 0 - 1
Push/obj/Debug/Push.csproj.CoreCompileInputs.cache

@@ -1 +0,0 @@
1
-e5de9096ec1ac88eb2a1392c765bd7e187a3c656

+ 0 - 11
Push/obj/Debug/Push.csproj.FileListAbsolute.txt

@@ -1,11 +0,0 @@
1
-D:\projectCode\SQ12345_Api\Push\bin\Debug\Push.exe.config
2
-D:\projectCode\SQ12345_Api\Push\bin\Debug\Push.exe
3
-D:\projectCode\SQ12345_Api\Push\bin\Debug\Push.pdb
4
-D:\projectCode\SQ12345_Api\Push\bin\Debug\Newtonsoft.Json.dll
5
-D:\projectCode\SQ12345_Api\Push\bin\Debug\Newtonsoft.Json.xml
6
-D:\projectCode\SQ12345_Api\Push\obj\Debug\Push.csproj.AssemblyReference.cache
7
-D:\projectCode\SQ12345_Api\Push\obj\Debug\Push.csproj.SuggestedBindingRedirects.cache
8
-D:\projectCode\SQ12345_Api\Push\obj\Debug\Push.csproj.CoreCompileInputs.cache
9
-D:\projectCode\SQ12345_Api\Push\obj\Debug\Push.csproj.CopyComplete
10
-D:\projectCode\SQ12345_Api\Push\obj\Debug\Push.exe
11
-D:\projectCode\SQ12345_Api\Push\obj\Debug\Push.pdb

+ 0 - 0
Push/obj/Debug/Push.csproj.SuggestedBindingRedirects.cache


二進制
Push/obj/Debug/Push.exe


二進制
Push/obj/Debug/Push.pdb


+ 0 - 4
Push/obj/Release/.NETFramework,Version=v4.6.1.AssemblyAttributes.cs

@@ -1,4 +0,0 @@
1
-// <autogenerated />
2
-using System;
3
-using System.Reflection;
4
-[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.1", FrameworkDisplayName = ".NET Framework 4.6.1")]

二進制
Push/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache


二進制
Push/obj/Release/Push.csproj.AssemblyReference.cache


+ 0 - 0
Push/obj/Release/Push.csproj.CopyComplete


+ 0 - 1
Push/obj/Release/Push.csproj.CoreCompileInputs.cache

@@ -1 +0,0 @@
1
-019b41d3aecbea82a2ce656e584a01faf0b00468

+ 0 - 10
Push/obj/Release/Push.csproj.FileListAbsolute.txt

@@ -1,10 +0,0 @@
1
-D:\项目\商丘市级\ShangQiu_API\Push\bin\Release\Push.exe.config
2
-D:\项目\商丘市级\ShangQiu_API\Push\bin\Release\Push.exe
3
-D:\项目\商丘市级\ShangQiu_API\Push\bin\Release\Push.pdb
4
-D:\项目\商丘市级\ShangQiu_API\Push\bin\Release\Newtonsoft.Json.dll
5
-D:\项目\商丘市级\ShangQiu_API\Push\bin\Release\Newtonsoft.Json.xml
6
-D:\项目\商丘市级\ShangQiu_API\Push\obj\Release\Push.csprojAssemblyReference.cache
7
-D:\项目\商丘市级\ShangQiu_API\Push\obj\Release\Push.csproj.CoreCompileInputs.cache
8
-D:\项目\商丘市级\ShangQiu_API\Push\obj\Release\Push.csproj.CopyComplete
9
-D:\项目\商丘市级\ShangQiu_API\Push\obj\Release\Push.exe
10
-D:\项目\商丘市级\ShangQiu_API\Push\obj\Release\Push.pdb

二進制
Push/obj/Release/Push.csprojAssemblyReference.cache


二進制
Push/obj/Release/Push.exe


二進制
Push/obj/Release/Push.pdb


+ 0 - 0
Push/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs


+ 0 - 0
Push/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs


+ 0 - 0
Push/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs