diff --git a/.gitignore b/.gitignore index ab6c5d63..041cceaf 100644 --- a/.gitignore +++ b/.gitignore @@ -55,3 +55,5 @@ BookingJieFeng/BookingJieFeng.csproj.user DispatchWeb/DispatchWeb.csproj.user DSWeb/Properties/PublishProfiles/FolderProfile.pubxml /DSWeb/Areas/MvcShipping/DAL/MsChFee/MsChFeeDAL.cs +/DS7GIT.rar +/WebSqlHelper/Fakes/Microsoft.Practices.EnterpriseLibrary.Common.fakes diff --git a/DSWeb/Areas/MvcShipping/Helper/DingTalkHelper.cs b/DSWeb/Areas/MvcShipping/Helper/DingTalkHelper.cs index aa6cf2ea..00bd9c16 100644 --- a/DSWeb/Areas/MvcShipping/Helper/DingTalkHelper.cs +++ b/DSWeb/Areas/MvcShipping/Helper/DingTalkHelper.cs @@ -1,4 +1,5 @@ -using DSWeb.Areas.Dispatch.Helper; +using AlibabaCloud.SDK.Dingtalkh5package_1_0.Models; +using DSWeb.Areas.Dispatch.Helper; using DSWeb.Areas.MvcShipping.DB; using DSWeb.Areas.MvcShipping.Job; using log4net; @@ -9,6 +10,7 @@ using System.Configuration; using System.Linq; using System.Runtime.Caching; using System.Web; +using Tea; namespace DSWeb.Areas.MvcShipping.Helper { @@ -65,10 +67,47 @@ namespace DSWeb.Areas.MvcShipping.Helper } } + + public class DingTalkAuditHelper { + public static AlibabaCloud.SDK.Dingtalkoauth2_1_0.Client CreateClient() + { + AlibabaCloud.OpenApiClient.Models.Config config = new AlibabaCloud.OpenApiClient.Models.Config(); + config.Protocol = "https"; + config.RegionId = "central"; + return new AlibabaCloud.SDK.Dingtalkoauth2_1_0.Client(config); + } - public class DingTalkAuditHelper { - private - + public static void GetToken() { + AlibabaCloud.SDK.Dingtalkoauth2_1_0.Client client = CreateClient(); + AlibabaCloud.SDK.Dingtalkoauth2_1_0.Models.GetSsoAccessTokenRequest getSsoAccessTokenRequest = new AlibabaCloud.SDK.Dingtalkoauth2_1_0.Models.GetSsoAccessTokenRequest + { + Corpid = "ding7f22510fcf025d5424f2f5cc6abecb85", + SsoSecret = "LPHtv90gkqmq-fzQ3i36vUNaOtSS39SmtdpsUgQaQbJStHoaWey2na9Pu6_SmCCp", + }; + try + { + client.GetSsoAccessToken(getSsoAccessTokenRequest); + var _rstr=client.ToString(); + } + catch (TeaException err) + { + if (!AlibabaCloud.TeaUtil.Common.Empty(err.Code) && !AlibabaCloud.TeaUtil.Common.Empty(err.Message)) + { + // err 中含有 code 和 message 属性,可帮助开发定位问题 + } + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + if (!AlibabaCloud.TeaUtil.Common.Empty(err.Code) && !AlibabaCloud.TeaUtil.Common.Empty(err.Message)) + { + // err 中含有 code 和 message 属性,可帮助开发定位问题 + } + } + } } } \ No newline at end of file diff --git a/Job_Get_FanWeiDeE9/Job_Get_FanWeiDeE9.cs b/Job_Get_FanWeiDeE9/Job_Get_FanWeiDeE9.cs index 24bbe0fc..c2ee3860 100644 --- a/Job_Get_FanWeiDeE9/Job_Get_FanWeiDeE9.cs +++ b/Job_Get_FanWeiDeE9/Job_Get_FanWeiDeE9.cs @@ -28,7 +28,7 @@ namespace Job_Get_FanWeiDeE9 public class Job_Get_FanWeiDeE9 : IJob { - private ILog log = LogManager.GetLogger(typeof(Job_Bosch_FTP)); + private ILog log = LogManager.GetLogger(typeof(Job_Get_FanWeiDeE9)); //private string connStr { get; set; } private const string admin_userid = "1BEC90E1-9780-472F-90C2-0C6390C044A4"; diff --git a/Job_Get_FanWeiDeE9/Job_Get_FanWeiDeE9.csproj b/Job_Get_FanWeiDeE9/Job_Get_FanWeiDeE9.csproj index e20ed193..6ba69797 100644 --- a/Job_Get_FanWeiDeE9/Job_Get_FanWeiDeE9.csproj +++ b/Job_Get_FanWeiDeE9/Job_Get_FanWeiDeE9.csproj @@ -79,8 +79,9 @@ ..\packages\MimeKit.2.9.2\lib\net45\MimeKit.dll - - ..\packages\Newtonsoft.Json.12.0.2\lib\net40\Newtonsoft.Json.dll + + False + ..\DSWeb\bin\Newtonsoft.Json.dll ..\packages\Quartz.2.6.2\lib\net40\Quartz.dll