mirror of
https://gitee.com/openharmony/applications_dlp_manager
synced 2024-11-23 09:59:57 +00:00
update
Signed-off-by: 孟立 <mengli12@huawei.com>
This commit is contained in:
parent
2c182fb4d3
commit
7caea19770
@ -9,4 +9,5 @@ userIdCipher
|
|||||||
telephone
|
telephone
|
||||||
contactObjects
|
contactObjects
|
||||||
isTextContent
|
isTextContent
|
||||||
descriptionEn
|
descriptionEn
|
||||||
|
keywordsList
|
@ -12,8 +12,8 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import BaseResponse from "../base/BaseResponse";
|
import BaseResponse from '../base/BaseResponse';
|
||||||
import DomainAccountInfo from "../data/DomainAccountInfo";
|
import DomainAccountInfo from '../data/DomainAccountInfo';
|
||||||
|
|
||||||
export default class DomainAccountResponse extends BaseResponse {
|
export default class DomainAccountResponse extends BaseResponse {
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import { buffer } from "@kit.ArkTS";
|
import { buffer } from '@kit.ArkTS';
|
||||||
import { HiLog } from "./HiLog";
|
import { HiLog } from './HiLog';
|
||||||
|
|
||||||
const TAG = 'CommonUtil';
|
const TAG = 'CommonUtil';
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ export default class CredConnection {
|
|||||||
HiLog.info(TAG, `getDomainAccountInfo sendMessageRequest is error, code: ${code}`);
|
HiLog.info(TAG, `getDomainAccountInfo sendMessageRequest is error, code: ${code}`);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = DomainAccountConvertor.convertToDomainAccountResp(sendResult.reply.readString());
|
result = DomainAccountConvertor.convertToDomainAccountResp(sendResult.reply.readString());
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
HiLog.error(TAG, `getDomainAccountInfo result: ${error}`);
|
HiLog.error(TAG, `getDomainAccountInfo result: ${error}`);
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -12,16 +12,16 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import DomainAccountRequest from "../bean/request/DomainAccountRequest";
|
import DomainAccountRequest from '../bean/request/DomainAccountRequest';
|
||||||
import DomainAccountResponse from "../bean/response/DomainAccountResponse";
|
import DomainAccountResponse from '../bean/response/DomainAccountResponse';
|
||||||
import CommonUtil from "../common/CommonUtil";
|
import CommonUtil from '../common/CommonUtil';
|
||||||
import { HiLog } from "../common/HiLog";
|
import { HiLog } from '../common/HiLog';
|
||||||
|
|
||||||
const TAG = 'DomainAccountConvertor';
|
const TAG = 'DomainAccountConvertor';
|
||||||
|
|
||||||
export default class DomainAccountConvertor {
|
export default class DomainAccountConvertor {
|
||||||
|
|
||||||
private static readonly DOMAIN_ACCOUNT_TYPE_IDAAS =2;
|
private static readonly DOMAIN_ACCOUNT_TYPE_IDAAS = 2;
|
||||||
|
|
||||||
public static convertBatchToDomainAccountReq(searchArray: string[], accountName: string, accountId: string):
|
public static convertBatchToDomainAccountReq(searchArray: string[], accountName: string, accountId: string):
|
||||||
DomainAccountRequest {
|
DomainAccountRequest {
|
||||||
@ -29,7 +29,7 @@ export default class DomainAccountConvertor {
|
|||||||
result.setAccountName(CommonUtil.encodeByBase64(accountName));
|
result.setAccountName(CommonUtil.encodeByBase64(accountName));
|
||||||
result.setAccountId(CommonUtil.encodeByBase64(accountId));
|
result.setAccountId(CommonUtil.encodeByBase64(accountId));
|
||||||
result.setAccountType(this.DOMAIN_ACCOUNT_TYPE_IDAAS);
|
result.setAccountType(this.DOMAIN_ACCOUNT_TYPE_IDAAS);
|
||||||
result.setKeywordsList(searchArray)
|
result.setKeywordsList(searchArray);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ const TAG = 'AccountManager';
|
|||||||
export default class AccountManager {
|
export default class AccountManager {
|
||||||
|
|
||||||
public static connectAbility(context: ESObject): void {
|
public static connectAbility(context: ESObject): void {
|
||||||
let connection: CredConnection | undefined = AppStorage.get<CredConnection>(AppStorageConstant.CRED_CONNECTION);
|
let connection: CredConnection | undefined = AppStorage.get<CredConnection>(AppStorageConstant.CRED_CONNECTION);
|
||||||
if (!connection) {
|
if (!connection) {
|
||||||
connection = new CredConnection(context);
|
connection = new CredConnection(context);
|
||||||
}
|
}
|
||||||
@ -60,7 +60,7 @@ export default class AccountManager {
|
|||||||
}
|
}
|
||||||
let searchReq = DomainAccountConvertor.convertBatchToDomainAccountReq(
|
let searchReq = DomainAccountConvertor.convertBatchToDomainAccountReq(
|
||||||
searchArray, accountInfo.domainInfo?.accountName, accountInfo.domainInfo?.accountId);
|
searchArray, accountInfo.domainInfo?.accountName, accountInfo.domainInfo?.accountId);
|
||||||
let connection: CredConnection | undefined = AppStorage.get<CredConnection>(AppStorageConstant.CRED_CONNECTION);
|
let connection: CredConnection | undefined = AppStorage.get<CredConnection>(AppStorageConstant.CRED_CONNECTION);
|
||||||
let response: DomainAccountResponse | undefined = await connection?.getDomainAccountInfo(searchReq);
|
let response: DomainAccountResponse | undefined = await connection?.getDomainAccountInfo(searchReq);
|
||||||
AccountManager.dealDomainAccountMapCache(response?.getData());
|
AccountManager.dealDomainAccountMapCache(response?.getData());
|
||||||
return response;
|
return response;
|
||||||
|
Loading…
Reference in New Issue
Block a user