diff --git a/Ewide.Nbzs.BackWorkerService/DbManage.cs b/Ewide.Nbzs.BackWorkerService/DbManage.cs index 31eae7a..0a5eab6 100644 --- a/Ewide.Nbzs.BackWorkerService/DbManage.cs +++ b/Ewide.Nbzs.BackWorkerService/DbManage.cs @@ -46,9 +46,9 @@ namespace Ewide.Nbzs.BackWorkerService { return GetDbClient().GetConnection(id); } - public static string GetHashKey() + public static string GetZlbSecretKey() { - return App.GetConfig("AesHashKey"); + return App.GetConfig("ZlbSecretKey"); } } } diff --git a/Ewide.Nbzs.BackWorkerService/Worker.cs b/Ewide.Nbzs.BackWorkerService/Worker.cs index defafbb..9ef6073 100644 --- a/Ewide.Nbzs.BackWorkerService/Worker.cs +++ b/Ewide.Nbzs.BackWorkerService/Worker.cs @@ -113,7 +113,7 @@ namespace Ewide.Nbzs.BackWorkerService { #region _cache.Set($"CacheData-PoliciesRegulations", db_Zlb_Conn.Queryable().ToList()); - + var listPoliciesRegulations = db_Product_Conn.Queryable().ToList(); //_cache.SetString($"CacheData-PoliciesRegulations", JSON.Serialize(listPoliciesRegulations), new DistributedCacheEntryOptions //{ @@ -136,8 +136,8 @@ namespace Ewide.Nbzs.BackWorkerService var listNonResidentialAgreement = db_Product_Conn.Queryable().Where(p => p.ProjectID == projectId).ToList(); listNonResidentialAgreement.ForEach(p => { - p.ExpropriatedCardNo = AESEncryption.Encrypt(p.ExpropriatedCardNo, DbManage.GetHashKey()); - p.ExpropriatedPhone = AESEncryption.Encrypt(p.ExpropriatedPhone, DbManage.GetHashKey()); + p.ExpropriatedCardNo = MD5Encryption.Encrypt(p.ExpropriatedCardNo); + p.ExpropriatedPhone = MD5Encryption.Encrypt(p.ExpropriatedPhone); }); //_cache.SetString($"CacheData-NonResidentialAgreement-{projectId}", JSON.Serialize(listNonResidentialAgreement), new DistributedCacheEntryOptions //{ @@ -150,7 +150,7 @@ namespace Ewide.Nbzs.BackWorkerService insert_result = db_Zlb_Conn.Insertable(listNonResidentialAgreement).ExecuteCommand(); list_result.Add(new PushResult { Action = "Insert", TableName = "NonResidentialAgreement", IsSuccess = insert_result > 0 }); - + #endregion @@ -160,8 +160,8 @@ namespace Ewide.Nbzs.BackWorkerService var listResidentialAgreement = db_Product_Conn.Queryable().Where(p => p.ProjectID == projectId).ToList(); listResidentialAgreement.ForEach(p => { - p.ExpropriatedCardNo = AESEncryption.Encrypt(p.ExpropriatedCardNo, DbManage.GetHashKey()); - p.ExpropriatedPhone = AESEncryption.Encrypt(p.ExpropriatedPhone, DbManage.GetHashKey()); + p.ExpropriatedCardNo = MD5Encryption.Encrypt(p.ExpropriatedCardNo); + p.ExpropriatedPhone = MD5Encryption.Encrypt(p.ExpropriatedPhone); }); //_cache.SetString($"CacheData-ResidentialAgreement-{projectId}", JSON.Serialize(listResidentialAgreement), new DistributedCacheEntryOptions //{ @@ -219,8 +219,8 @@ namespace Ewide.Nbzs.BackWorkerService var listNonInvestigateTable = db_Product_Conn.Queryable().Where(p => p.ProjectId == projectId).ToList(); listNonInvestigateTable.ForEach(p => { - p.PropertyRightPrsonCardNo = AESEncryption.Encrypt(p.PropertyRightPrsonCardNo, DbManage.GetHashKey()); - p.TheLegalRepresentativePhone = AESEncryption.Encrypt(p.TheLegalRepresentativePhone, DbManage.GetHashKey()); + p.PropertyRightPrsonCardNo = MD5Encryption.Encrypt(p.PropertyRightPrsonCardNo); + p.TheLegalRepresentativePhone = MD5Encryption.Encrypt(p.TheLegalRepresentativePhone); }); //_cache.SetString($"CacheData-NonResidentialInvestigateTable-{projectId}", JSON.Serialize(listNonInvestigateTable), new DistributedCacheEntryOptions //{ @@ -241,8 +241,8 @@ namespace Ewide.Nbzs.BackWorkerService var listInvestigateTable = db_Product_Conn.Queryable().Where(p => p.ProjectId == projectId).ToList(); listInvestigateTable.ForEach(p => { - p.ExpropriatedCardNo = AESEncryption.Encrypt(p.ExpropriatedCardNo, DbManage.GetHashKey()); - p.ExpropriatedPhone = AESEncryption.Encrypt(p.ExpropriatedPhone, DbManage.GetHashKey()); + p.ExpropriatedCardNo = MD5Encryption.Encrypt(p.ExpropriatedCardNo); + p.ExpropriatedPhone = MD5Encryption.Encrypt(p.ExpropriatedPhone); }); //_cache.SetString($"CacheData-InvestigateTable-{projectId}", JSON.Serialize(listInvestigateTable), new DistributedCacheEntryOptions //{ diff --git a/Ewide.Nbzs.BackWorkerService/appsettings.json b/Ewide.Nbzs.BackWorkerService/appsettings.json index 29c502d..ba5689f 100644 --- a/Ewide.Nbzs.BackWorkerService/appsettings.json +++ b/Ewide.Nbzs.BackWorkerService/appsettings.json @@ -35,6 +35,6 @@ "ConnectionString": "data source=118.178.224.202;initial catalog=NbzsZlb;persist security info=True;user id=KYSQLSERVERADMIN;password=KYDBLogin20161103...;MultipleActiveResultSets=True;App=EntityFramework" } ], - "AesHashKey": "A4D58EAF1948B29E5954B3DB425D5F2C", + "ZlbSecretKey": "A4D58EAF1948B29E5954B3DB425D5F2C", "RedisConfig": "10.19.94.250:6380,password=nbzszlb!@#" } diff --git a/Ewide.Nbzs.Entity/Extends/H5IndexPrjModel.cs b/Ewide.Nbzs.Entity/Extends/H5IndexPrjModel.cs index 047211b..ae0c43a 100644 --- a/Ewide.Nbzs.Entity/Extends/H5IndexPrjModel.cs +++ b/Ewide.Nbzs.Entity/Extends/H5IndexPrjModel.cs @@ -21,7 +21,7 @@ namespace Ewide.Nbzs.Entity.Extends public class Fhpgs { public string Id { get; set; } - [Newtonsoft.Json.JsonIgnore] + //[Newtonsoft.Json.JsonIgnore] public string dcbId { get; set; } public string PrjId { get; set; } public string AssessmentNo { get; set; } @@ -35,7 +35,7 @@ namespace Ewide.Nbzs.Entity.Extends public class Bcxy { public string Id { get; set; } - [Newtonsoft.Json.JsonIgnore] + //[Newtonsoft.Json.JsonIgnore] public string dcbId { get; set; } public string PrjId { get; set; } public string XyNo { get; set; } @@ -66,7 +66,7 @@ namespace Ewide.Nbzs.Entity.Extends /// public string Area { get; set; } public string Name { get; set; } - [Newtonsoft.Json.JsonIgnore] + //[Newtonsoft.Json.JsonIgnore] public string AreaID { get; set; } /// /// 征收部门 diff --git a/Ewide.NbzsZheliban/Service/DataService.cs b/Ewide.NbzsZheliban/Service/DataService.cs index b02869d..0301b04 100644 --- a/Ewide.NbzsZheliban/Service/DataService.cs +++ b/Ewide.NbzsZheliban/Service/DataService.cs @@ -97,8 +97,9 @@ namespace Ewide.NbzsZheliban.Service /// /// /// - private async Task> GetzzDcbsAsync(string cardno) + private async Task> GetzzDcbsAsync(string _cardno) { + var cardno = MD5Encryption.Encrypt(_cardno); var list = _cache.Get>("CacheData-InvestigateTable"); if (list != null && list.Count > 0) return list.Where(p => p.ExpropriatedCardNo == cardno).ToList(); @@ -111,8 +112,9 @@ namespace Ewide.NbzsZheliban.Service /// /// /// - private async Task> GetfzzDcbsAsync(string cardno) + private async Task> GetfzzDcbsAsync(string _cardno) { + var cardno = MD5Encryption.Encrypt(_cardno); var list = _cache.Get>("CacheData-NonResidentialInvestigateTable"); if (list != null && list.Count > 0) return list.Where(p => p.ExpropriatedCardNo == cardno).ToList(); @@ -233,7 +235,7 @@ namespace Ewide.NbzsZheliban.Service var dbTicket = db.Queryable().Where(p => p.Ticket == ticket && p.ExpireTime > DateTime.Now).OrderBy(p => p.CreateTime, OrderByType.Desc).First(); if (dbTicket != null) { - var OriginalResponse = AESEncryption.Decrypt(dbTicket.OriginalResponse, Common.GetHashKey()); + var OriginalResponse = DESCEncryption.Decrypt(dbTicket.OriginalResponse, Common.GetZlbSecretKey()); return JObject.Parse(OriginalResponse); } else @@ -287,11 +289,11 @@ namespace Ewide.NbzsZheliban.Service { ID = Guid.NewGuid().ToString(), Ticket = ticket, - IdCardNo = AESEncryption.Encrypt(userinfoObj["idnum"].ToString(), Common.GetHashKey()), + IdCardNo = MD5Encryption.Encrypt(userinfoObj["idnum"].ToString()), UserName = userinfoObj["username"].ToString(), ExpireTime = DateTime.Now.AddHours(4),//浙里办的token时效也是4个小时 CreateTime = DateTime.Now, - OriginalResponse = AESEncryption.Encrypt(userinfoRsltStr, Common.GetHashKey()) + OriginalResponse = DESCEncryption.Encrypt(userinfoRsltStr, Common.GetZlbSecretKey()) }).ExecuteCommand(); if (temp1 <= 0) throw Oops.Oh("出现异常,请联系管理员"); diff --git a/Ewide.NbzsZheliban/Tools/Common.cs b/Ewide.NbzsZheliban/Tools/Common.cs index 6d70125..810a0a4 100644 --- a/Ewide.NbzsZheliban/Tools/Common.cs +++ b/Ewide.NbzsZheliban/Tools/Common.cs @@ -9,9 +9,9 @@ namespace Ewide.NbzsZheliban.Tools { public class Common { - public static string GetHashKey() + public static string GetZlbSecretKey() { - return App.GetConfig("AesHashKey"); + return App.GetConfig("ZlbSecretKey"); } } } diff --git a/Ewide.NbzsZheliban/bin/Debug/net5.0/Ewide.NbzsZheliban.dll b/Ewide.NbzsZheliban/bin/Debug/net5.0/Ewide.NbzsZheliban.dll index 2c4ff87..dea31ee 100644 Binary files a/Ewide.NbzsZheliban/bin/Debug/net5.0/Ewide.NbzsZheliban.dll and b/Ewide.NbzsZheliban/bin/Debug/net5.0/Ewide.NbzsZheliban.dll differ diff --git a/Ewide.NbzsZheliban/bin/Debug/net5.0/Ewide.NbzsZheliban.pdb b/Ewide.NbzsZheliban/bin/Debug/net5.0/Ewide.NbzsZheliban.pdb index be0213f..43d64b6 100644 Binary files a/Ewide.NbzsZheliban/bin/Debug/net5.0/Ewide.NbzsZheliban.pdb and b/Ewide.NbzsZheliban/bin/Debug/net5.0/Ewide.NbzsZheliban.pdb differ diff --git a/Ewide.NbzsZheliban/bin/Debug/net5.0/ref/Ewide.NbzsZheliban.dll b/Ewide.NbzsZheliban/bin/Debug/net5.0/ref/Ewide.NbzsZheliban.dll index 64283cc..5d597de 100644 Binary files a/Ewide.NbzsZheliban/bin/Debug/net5.0/ref/Ewide.NbzsZheliban.dll and b/Ewide.NbzsZheliban/bin/Debug/net5.0/ref/Ewide.NbzsZheliban.dll differ diff --git a/Ewide.NbzsZheliban/bin/Release/net5.0/Ewide.NbzsZheliban.dll b/Ewide.NbzsZheliban/bin/Release/net5.0/Ewide.NbzsZheliban.dll index 85176a7..bbb98ed 100644 Binary files a/Ewide.NbzsZheliban/bin/Release/net5.0/Ewide.NbzsZheliban.dll and b/Ewide.NbzsZheliban/bin/Release/net5.0/Ewide.NbzsZheliban.dll differ diff --git a/Ewide.NbzsZheliban/bin/Release/net5.0/Ewide.NbzsZheliban.pdb b/Ewide.NbzsZheliban/bin/Release/net5.0/Ewide.NbzsZheliban.pdb index b865bce..ec9dda9 100644 Binary files a/Ewide.NbzsZheliban/bin/Release/net5.0/Ewide.NbzsZheliban.pdb and b/Ewide.NbzsZheliban/bin/Release/net5.0/Ewide.NbzsZheliban.pdb differ diff --git a/Ewide.NbzsZheliban/bin/Release/net5.0/ref/Ewide.NbzsZheliban.dll b/Ewide.NbzsZheliban/bin/Release/net5.0/ref/Ewide.NbzsZheliban.dll index 73dc8cf..2370c09 100644 Binary files a/Ewide.NbzsZheliban/bin/Release/net5.0/ref/Ewide.NbzsZheliban.dll and b/Ewide.NbzsZheliban/bin/Release/net5.0/ref/Ewide.NbzsZheliban.dll differ diff --git a/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.csproj.AssemblyReference.cache b/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.csproj.AssemblyReference.cache index 91eea0b..0bc3a86 100644 Binary files a/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.csproj.AssemblyReference.cache and b/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.csproj.AssemblyReference.cache differ diff --git a/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.dll b/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.dll index 2c4ff87..dea31ee 100644 Binary files a/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.dll and b/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.dll differ diff --git a/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.pdb b/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.pdb index be0213f..43d64b6 100644 Binary files a/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.pdb and b/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.pdb differ diff --git a/Ewide.NbzsZheliban/obj/Debug/net5.0/ref/Ewide.NbzsZheliban.dll b/Ewide.NbzsZheliban/obj/Debug/net5.0/ref/Ewide.NbzsZheliban.dll index 64283cc..5d597de 100644 Binary files a/Ewide.NbzsZheliban/obj/Debug/net5.0/ref/Ewide.NbzsZheliban.dll and b/Ewide.NbzsZheliban/obj/Debug/net5.0/ref/Ewide.NbzsZheliban.dll differ diff --git a/Ewide.NbzsZheliban/obj/Release/net5.0/Ewide.NbzsZheliban.csproj.AssemblyReference.cache b/Ewide.NbzsZheliban/obj/Release/net5.0/Ewide.NbzsZheliban.csproj.AssemblyReference.cache index f11121e..b97bb00 100644 Binary files a/Ewide.NbzsZheliban/obj/Release/net5.0/Ewide.NbzsZheliban.csproj.AssemblyReference.cache and b/Ewide.NbzsZheliban/obj/Release/net5.0/Ewide.NbzsZheliban.csproj.AssemblyReference.cache differ diff --git a/Ewide.NbzsZheliban/obj/Release/net5.0/Ewide.NbzsZheliban.dll b/Ewide.NbzsZheliban/obj/Release/net5.0/Ewide.NbzsZheliban.dll index 85176a7..bbb98ed 100644 Binary files a/Ewide.NbzsZheliban/obj/Release/net5.0/Ewide.NbzsZheliban.dll and b/Ewide.NbzsZheliban/obj/Release/net5.0/Ewide.NbzsZheliban.dll differ diff --git a/Ewide.NbzsZheliban/obj/Release/net5.0/Ewide.NbzsZheliban.pdb b/Ewide.NbzsZheliban/obj/Release/net5.0/Ewide.NbzsZheliban.pdb index b865bce..ec9dda9 100644 Binary files a/Ewide.NbzsZheliban/obj/Release/net5.0/Ewide.NbzsZheliban.pdb and b/Ewide.NbzsZheliban/obj/Release/net5.0/Ewide.NbzsZheliban.pdb differ diff --git a/Ewide.NbzsZheliban/obj/Release/net5.0/ref/Ewide.NbzsZheliban.dll b/Ewide.NbzsZheliban/obj/Release/net5.0/ref/Ewide.NbzsZheliban.dll index 73dc8cf..2370c09 100644 Binary files a/Ewide.NbzsZheliban/obj/Release/net5.0/ref/Ewide.NbzsZheliban.dll and b/Ewide.NbzsZheliban/obj/Release/net5.0/ref/Ewide.NbzsZheliban.dll differ