|
@@ -107,7 +107,6 @@ async function tryRevokeEntrust() {
|
|
|
let name = getRevokeEntrustName();
|
|
let name = getRevokeEntrustName();
|
|
|
let page = 1;
|
|
let page = 1;
|
|
|
let optOrderNum = 0;
|
|
let optOrderNum = 0;
|
|
|
- let entrustOrderTotal = 0;
|
|
|
|
|
while (page < 100) {
|
|
while (page < 100) {
|
|
|
let retOrder = await getOrderList(0, page);
|
|
let retOrder = await getOrderList(0, page);
|
|
|
if (retOrder && retOrder.code == 200) {
|
|
if (retOrder && retOrder.code == 200) {
|
|
@@ -121,6 +120,7 @@ async function tryRevokeEntrust() {
|
|
|
// 8=空投订单
|
|
// 8=空投订单
|
|
|
// 13=委托订单
|
|
// 13=委托订单
|
|
|
if (orderInfo.orderType == 13 && orderInfo.title.indexOf(name) > -1) {
|
|
if (orderInfo.orderType == 13 && orderInfo.title.indexOf(name) > -1) {
|
|
|
|
|
+ entrustOrderTotal += 1;
|
|
|
magicJS.logger.info(`找到[${orderInfo.title}]${orderInfo.createdTime}的一个委托单,状态:${orderInfo.state}!`);
|
|
magicJS.logger.info(`找到[${orderInfo.title}]${orderInfo.createdTime}的一个委托单,状态:${orderInfo.state}!`);
|
|
|
if (orderInfo.state == -1) {//已取消
|
|
if (orderInfo.state == -1) {//已取消
|
|
|
continue;
|
|
continue;
|
|
@@ -134,7 +134,6 @@ async function tryRevokeEntrust() {
|
|
|
if (orderInfo.state == 9) {//已支付
|
|
if (orderInfo.state == 9) {//已支付
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
- entrustOrderTotal += 1;
|
|
|
|
|
magicJS.logger.info(`正在撤销[${orderInfo.title}x${orderInfo.num}]¥${orderInfo.price}委托单...`);
|
|
magicJS.logger.info(`正在撤销[${orderInfo.title}x${orderInfo.num}]¥${orderInfo.price}委托单...`);
|
|
|
let retDetail = await getOrderInfo(orderInfo.orderSn);
|
|
let retDetail = await getOrderInfo(orderInfo.orderSn);
|
|
|
if (retDetail && retDetail.code == 200) {
|
|
if (retDetail && retDetail.code == 200) {
|
|
@@ -158,7 +157,7 @@ async function tryRevokeEntrust() {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- magicJS.logger.info(`共检测到历史总共${entrustOrderTotal}个委托单,需处理的委托单数:${optOrderNum}`);
|
|
|
|
|
|
|
+ magicJS.logger.info(`共检测到需处理的委托单数:${optOrderNum}/${entrustOrderTotal}`);
|
|
|
if (optOrderNum == 0) {
|
|
if (optOrderNum == 0) {
|
|
|
if (name && name.length > 0) {
|
|
if (name && name.length > 0) {
|
|
|
magicJS.notification.appendNotifyInfo(`不存在购买[${name}]未完成的委托单!`);
|
|
magicJS.notification.appendNotifyInfo(`不存在购买[${name}]未完成的委托单!`);
|