Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b79054995 | ||
|
|
9cf1aacd74 |
+14
-1
@@ -6,7 +6,7 @@ const EXCEL_FILE = path.join(__dirname, '新建 XLSX 工作表.xlsx');
|
|||||||
const SHEET_NAME = '2026';
|
const SHEET_NAME = '2026';
|
||||||
|
|
||||||
const BASE_URL = 'https://superstar.geelytravel.com';
|
const BASE_URL = 'https://superstar.geelytravel.com';
|
||||||
const AUTH_TOKEN = 'Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKV1QtRC1TRVFfVVNFUl9UTUNfMDAwMDAxODMiLCJ1c2VyX2NvZGUiOiJTRVFfVVNFUl9UTUNfMDAwMDAxODMiLCJyb2xlcyI6WyLnu5PnrpfkuJPlkZgiLCLnu5PnrpfkuJPlkZgiXSwiZXhwIjoxNzg2NTMzNTUxLCJpYXQiOjE3ODM5NDE1NTF9.1Mcmf5IM07Scrry4FzPs6TAcfUu0Nqtjre_2iJlNd5c';
|
const AUTH_TOKEN = 'Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKV1QtRC1TRVFfVVNFUl9UTUNfMDAwMDAxODMiLCJ1c2VyX2NvZGUiOiJTRVFfVVNFUl9UTUNfMDAwMDAxODMiLCJyb2xlcyI6WyLnu5PnrpfkuJPlkZgiLCLnu5PnrpfkuJPlkZgiXSwiZXhwIjoxNzk1MDkxMTI3LCJpYXQiOjE3OTI0OTkxMjd9.wPYA-ntdWfT86LsQIYEJdVUHEksbMM9VwE96VqPdGms';
|
||||||
|
|
||||||
const COMMON_HEADERS = {
|
const COMMON_HEADERS = {
|
||||||
'accept': 'application/json, text/plain, */*',
|
'accept': 'application/json, text/plain, */*',
|
||||||
@@ -301,6 +301,17 @@ function randomDelaySeconds() {
|
|||||||
return Math.floor(15 + Math.random() * 31);
|
return Math.floor(15 + Math.random() * 31);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ========== 接口错误检查 ==========
|
||||||
|
function ensureOk(resp, what) {
|
||||||
|
if (resp && resp.code && resp.code !== 'Z000') {
|
||||||
|
if (resp.code === 'E003') {
|
||||||
|
console.error(' ✗ token 已失效(E003: ' + (resp.msg || '') + '),请更新 AUTH_TOKEN');
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
throw new Error(what + ' 失败: [' + resp.code + '] ' + (resp.msg || resp.message || ''));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ========== 主流程 ==========
|
// ========== 主流程 ==========
|
||||||
async function main() {
|
async function main() {
|
||||||
const teamIds = readTeamIds();
|
const teamIds = readTeamIds();
|
||||||
@@ -315,6 +326,7 @@ async function main() {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const settlementResp = await querySettlementAccountIds(teamId);
|
const settlementResp = await querySettlementAccountIds(teamId);
|
||||||
|
ensureOk(settlementResp, 'querySettlementAccountIds');
|
||||||
const resultList = settlementResp?.result || [];
|
const resultList = settlementResp?.result || [];
|
||||||
if (resultList.length === 0) {
|
if (resultList.length === 0) {
|
||||||
console.log(' ⚠ ' + teamId + ' 没有 settlement account,跳过\n');
|
console.log(' ⚠ ' + teamId + ' 没有 settlement account,跳过\n');
|
||||||
@@ -324,6 +336,7 @@ async function main() {
|
|||||||
console.log(' -> settlementAccountId: ' + settlementAccountId);
|
console.log(' -> settlementAccountId: ' + settlementAccountId);
|
||||||
|
|
||||||
const billResp = await queryBillList(settlementAccountId);
|
const billResp = await queryBillList(settlementAccountId);
|
||||||
|
ensureOk(billResp, 'queryBillList');
|
||||||
const allBills = billResp?.result?.list || [];
|
const allBills = billResp?.result?.list || [];
|
||||||
const total = billResp?.result?.total || 0;
|
const total = billResp?.result?.total || 0;
|
||||||
console.log(' -> 共 ' + total + ' 条对账单');
|
console.log(' -> 共 ' + total + ' 条对账单');
|
||||||
|
|||||||
+14
-1
@@ -6,7 +6,7 @@ const EXCEL_FILE = path.join(__dirname, '新建 XLSX 工作表.xlsx');
|
|||||||
const SHEET_NAME = '2026';
|
const SHEET_NAME = '2026';
|
||||||
|
|
||||||
const BASE_URL = 'https://superstar.geelytravel.com';
|
const BASE_URL = 'https://superstar.geelytravel.com';
|
||||||
const AUTH_TOKEN = 'Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKV1QtRC1TRVFfVVNFUl9UTUNfMDAwMDAxODMiLCJ1c2VyX2NvZGUiOiJTRVFfVVNFUl9UTUNfMDAwMDAxODMiLCJyb2xlcyI6WyLnu5PnrpfkuJPlkZgiLCLnu5PnrpfkuJPlkZgiXSwiZXhwIjoxNzg2NTMzNTUxLCJpYXQiOjE3ODM5NDE1NTF9.1Mcmf5IM07Scrry4FzPs6TAcfUu0Nqtjre_2iJlNd5c';
|
const AUTH_TOKEN = 'Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKV1QtRC1TRVFfVVNFUl9UTUNfMDAwMDAxODMiLCJ1c2VyX2NvZGUiOiJTRVFfVVNFUl9UTUNfMDAwMDAxODMiLCJyb2xlcyI6WyLnu5PnrpfkuJPlkZgiLCLnu5PnrpfkuJPlkZgiXSwiZXhwIjoxNzk1MDkxMTI3LCJpYXQiOjE3OTI0OTkxMjd9.wPYA-ntdWfT86LsQIYEJdVUHEksbMM9VwE96VqPdGms';
|
||||||
|
|
||||||
const COMMON_HEADERS = {
|
const COMMON_HEADERS = {
|
||||||
'accept': 'application/json, text/plain, */*',
|
'accept': 'application/json, text/plain, */*',
|
||||||
@@ -350,6 +350,17 @@ function randomDelaySeconds() {
|
|||||||
return Math.floor(15 + Math.random() * 31);
|
return Math.floor(15 + Math.random() * 31);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ========== 接口错误检查 ==========
|
||||||
|
function ensureOk(resp, what) {
|
||||||
|
if (resp && resp.code && resp.code !== 'Z000') {
|
||||||
|
if (resp.code === 'E003') {
|
||||||
|
console.error(' ✗ token 已失效(E003: ' + (resp.msg || '') + '),请更新 AUTH_TOKEN');
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
throw new Error(what + ' 失败: [' + resp.code + '] ' + (resp.msg || resp.message || ''));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ========== 主流程 ==========
|
// ========== 主流程 ==========
|
||||||
async function main() {
|
async function main() {
|
||||||
const teamIds = readTeamIds();
|
const teamIds = readTeamIds();
|
||||||
@@ -364,6 +375,7 @@ async function main() {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const settlementResp = await querySettlementAccountIds(teamId);
|
const settlementResp = await querySettlementAccountIds(teamId);
|
||||||
|
ensureOk(settlementResp, 'querySettlementAccountIds');
|
||||||
const resultList = settlementResp?.result || [];
|
const resultList = settlementResp?.result || [];
|
||||||
if (resultList.length === 0) {
|
if (resultList.length === 0) {
|
||||||
console.log(' ⚠ ' + teamId + ' 没有 settlement account,跳过\n');
|
console.log(' ⚠ ' + teamId + ' 没有 settlement account,跳过\n');
|
||||||
@@ -373,6 +385,7 @@ async function main() {
|
|||||||
console.log(' -> settlementAccountId: ' + settlementAccountId);
|
console.log(' -> settlementAccountId: ' + settlementAccountId);
|
||||||
|
|
||||||
const billResp = await queryBillList(settlementAccountId);
|
const billResp = await queryBillList(settlementAccountId);
|
||||||
|
ensureOk(billResp, 'queryBillList');
|
||||||
const allBills = billResp?.result?.list || [];
|
const allBills = billResp?.result?.list || [];
|
||||||
const total = billResp?.result?.total || 0;
|
const total = billResp?.result?.total || 0;
|
||||||
console.log(' -> 共 ' + total + ' 条对账单');
|
console.log(' -> 共 ' + total + ' 条对账单');
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"server": {
|
"server": {
|
||||||
"url": "ws://bh.vps.honor3.com:18888/websocket_path",
|
"url": "ws://baishe.vps.honor3.com:18888/websocket_path",
|
||||||
"password": "helloworld"
|
"password": "helloworld"
|
||||||
},
|
},
|
||||||
"client_name": "cheney"
|
"client_name": "cheney"
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
"name": "superstar",
|
"name": "superstar",
|
||||||
"remote_port": 4443,
|
"remote_port": 4443,
|
||||||
"local_port": 443,
|
"local_port": 443,
|
||||||
"local_ip": "198.19.0.115",
|
"local_ip": "198.19.0.22",
|
||||||
"speed_limit": 0.0,
|
"speed_limit": 0.0,
|
||||||
"protocol": "tcp"
|
"protocol": "tcp"
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user