@@ -450,26 +450,26 @@ private async Task<CheckResultModel> CheckKeysFunc(string ProductKey, string PKe
450450 {
451451 checkResult . ActiveCount = KeyCheckFunModel . GetCount ( KeyCheckFunModel . GetStringFromID ( npid , 0x0008 ) ) ;
452452 //如果只获取OEM密钥的计数,就不会有ConfigID,这里手动获取一下
453- checkResult . ConfigID = eccheckresult . ConfigId = GetConfigID ( ProductKey , PKeyPath ) ;
453+ checkResult . ConfigID = ProductKey . Contains ( "N" ) ? GetConfigID_2009 ( ProductKey , PKeyPath ) : GetConfigID_2005 ( ProductKey , PKeyPath ) ;
454454 }
455455 else
456456 {
457- eccheckresult = await ConsumeKey ( ProductKey , PKeyPath ) ;
457+ eccheckresult = ProductKey . Contains ( "N" ) ? await ConsumeKey_2009 ( ProductKey , PKeyPath ) : await ConsumeKey_2005 ( ProductKey , PKeyPath ) ;
458458 checkResult . ActiveCount = eccheckresult . CheckResult == "" ? "---" : eccheckresult . CheckResult ;
459459 }
460460 }
461461 else
462462 {
463463 if ( CheckMAKErrorCode == 1 && checkResult . LicenseType . Contains ( "MAK" ) )
464464 {
465- eccheckresult = await ConsumeKey ( ProductKey , PKeyPath ) ;
465+ eccheckresult = ProductKey . Contains ( "N" ) ? await ConsumeKey_2009 ( ProductKey , PKeyPath ) : await ConsumeKey_2005 ( ProductKey , PKeyPath ) ;
466466 checkResult . ActiveCount = eccheckresult . CheckResult == "" ? "---" : eccheckresult . CheckResult ;
467467 }
468468 else
469469 {
470470 checkResult . ActiveCount = KeyCheckFunModel . GetCount ( KeyCheckFunModel . GetStringFromID ( npid , 0x0008 ) ) ;
471471 //批量密钥默认不检测错误代码,所以不会有ConfigID,这里手动获取一下
472- checkResult . ConfigID = eccheckresult . ConfigId = GetConfigID ( ProductKey , PKeyPath ) ;
472+ checkResult . ConfigID = ProductKey . Contains ( "N" ) ? GetConfigID_2009 ( ProductKey , PKeyPath ) : GetConfigID_2005 ( ProductKey , PKeyPath ) ;
473473 }
474474
475475 }
0 commit comments