SVN-Revision: r538
This commit is contained in:
wyf
2025-05-07 02:24:33 +00:00
parent 61f4426f5d
commit 4bbdcfb69a
4 changed files with 252 additions and 19 deletions
+1 -19
View File
@@ -779,22 +779,4 @@ namespace Lskj.Util
/// <param name="iPersonnelCustomerId">客户标识</param>
/// <param name="iPersonnelPrivateKey">私钥</param>
/// <returns>System.String.</returns>
public static string ReplaceIPersonnel(string defaultValue, string iPersonnelAllowInformation, string iPersonnelCustomerId, string iPersonnelPrivateKey)
{
if (defaultValue.Contains(_iPersonnelAllowInformation) || defaultValue.Contains(_iPersonnelEncryptedMessage))
{
//替换许可
defaultValue = defaultValue.Replace(_iPersonnelAllowInformation, iPersonnelAllowInformation);
//替换加密的签名信息
TimeSpan ts = DateTime.Now.ToUniversalTime() - new DateTime(1970, 1, 1);
long time = (long)ts.TotalMilliseconds;//当前时间的时间戳
string EncryptedMessage = string.Format("company_id={0}&mobile_no={1}&timestamp={2}", iPersonnelCustomerId, ERPInfo.Instance.UserLinkPhone, time);
string value = Lskj.Util.EncryptByPrivateKey.encryptByPrivateKey(EncryptedMessage, iPersonnelPrivateKey);
defaultValue = defaultValue.Replace(_iPersonnelEncryptedMessage, value);
}
return defaultValue;
}
}
}
public static string ReplaceIPersonnel(string defaultValue, string iPersonnelAllowInformation