From 0ee8b25e39fee9e689b0b807f1fa3efd38545ed2 Mon Sep 17 00:00:00 2001 From: lai <10633968+laiyujun1@user.noreply.gitee.com> Date: Fri, 10 Jan 2025 16:37:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E8=8A=82=E5=BA=8F=E5=88=97=E5=8F=8D?= =?UTF-8?q?=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wxc2_omc/account/priSubsMng/hlrGetAll.php | 7 +++++-- wxc2_omc/account/pubSubsMng/hlrGetAll.php | 13 ++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/wxc2_omc/account/priSubsMng/hlrGetAll.php b/wxc2_omc/account/priSubsMng/hlrGetAll.php index bb31f92..b78fd34 100644 --- a/wxc2_omc/account/priSubsMng/hlrGetAll.php +++ b/wxc2_omc/account/priSubsMng/hlrGetAll.php @@ -54,11 +54,14 @@ echo '
0%
'; for ($k = 0; $k < $userNum; $k++) { $hlr_detail = $redis->hGetAll($hlruser[$k]); $imsi = explode(":", $hlruser[$k])[1]; - $camel = bin2hex($hlr_detail['camel']); + // 反转字节顺序 + $reversedCamel = strrev($hlr_detail['camel']); + // 将反转后的字节序列转换为十六进制字符串 + $hexValue = bin2hex($reversedCamel); $nam = bin2hex($hlr_detail['nam']); $usedFlag = bin2hex($hlr_detail['enable']); - $updateSql = "INSERT INTO HLR_DB.subscriberData (imsi, inter_msisdn, camel_flag, nam, used_flag) VALUES ('$imsi', '$hlr_detail[msisdn]', '$camel', '$nam', '$usedFlag')"; + $updateSql = "INSERT INTO HLR_DB.subscriberData (imsi, inter_msisdn, camel_flag, nam, used_flag) VALUES ('$imsi', '$hlr_detail[msisdn]', '$hexValue', '$nam', '$usedFlag')"; mysqli_query($dbConn, $updateSql); // 检查错误 diff --git a/wxc2_omc/account/pubSubsMng/hlrGetAll.php b/wxc2_omc/account/pubSubsMng/hlrGetAll.php index 7f15d96..b78fd34 100644 --- a/wxc2_omc/account/pubSubsMng/hlrGetAll.php +++ b/wxc2_omc/account/pubSubsMng/hlrGetAll.php @@ -54,11 +54,14 @@ echo '
0%
'; for ($k = 0; $k < $userNum; $k++) { $hlr_detail = $redis->hGetAll($hlruser[$k]); $imsi = explode(":", $hlruser[$k])[1]; - $camel = bin2hex($hlr_detail['camel']); + // 反转字节顺序 + $reversedCamel = strrev($hlr_detail['camel']); + // 将反转后的字节序列转换为十六进制字符串 + $hexValue = bin2hex($reversedCamel); $nam = bin2hex($hlr_detail['nam']); $usedFlag = bin2hex($hlr_detail['enable']); - $updateSql = "INSERT INTO HLR_DB.subscriberData (imsi, inter_msisdn, camel_flag, nam, used_flag) VALUES ('$imsi', '$hlr_detail[msisdn]', '$camel', '$nam', '$usedFlag')"; + $updateSql = "INSERT INTO HLR_DB.subscriberData (imsi, inter_msisdn, camel_flag, nam, used_flag) VALUES ('$imsi', '$hlr_detail[msisdn]', '$hexValue', '$nam', '$usedFlag')"; mysqli_query($dbConn, $updateSql); // 检查错误 @@ -74,15 +77,15 @@ for ($k = 0; $k < $userNum; $k++) { document.getElementById('progressBar').style.width = '$progress%'; document.getElementById('progressText').innerText = '$progress%'; "; - flush(); + flush(); // 刷新输出缓冲区 } -// 更新进度条到 100% +// 最后更新进度条到 100% echo ""; -usleep(100000); +usleep(100000); // 可选:添加延迟以便观察进度条变化 echo ""; ?>