232 lines
5.7 KiB
JavaScript
232 lines
5.7 KiB
JavaScript
const NoSuccessfulWithdraw = {
|
|
withdrawTransfer$withdrawAccount: {
|
|
"#sqp": 'not in',
|
|
iState: 'successful',
|
|
},
|
|
};
|
|
const attrUpdateMatrix = {
|
|
pay: {
|
|
meta: {
|
|
actions: ['update', 'succeedPaying', 'close'],
|
|
filter: {
|
|
$or: [
|
|
{
|
|
entity: 'offlineAccount',
|
|
},
|
|
{
|
|
iState: {
|
|
$in: ['unpaid', 'paying'],
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
accountOper$entity: {
|
|
actions: ['startPaying', 'continuePaying'],
|
|
filter: {
|
|
$or: [{
|
|
depositId: {
|
|
$exists: true,
|
|
},
|
|
entity: 'account',
|
|
}, {
|
|
orderId: {
|
|
$exists: true,
|
|
},
|
|
entity: 'account',
|
|
}]
|
|
}
|
|
},
|
|
paid: {
|
|
actions: ['succeedPaying', 'continuePaying'],
|
|
},
|
|
refunded: {
|
|
actions: ['refundPartially', 'refundAll'],
|
|
},
|
|
refundable: {
|
|
actions: ['succeedPaying', 'closeRefund'],
|
|
},
|
|
forbidRefundAt: {
|
|
actions: ['succeedPaying'],
|
|
},
|
|
successAt: {
|
|
actions: ['succeedPaying'],
|
|
},
|
|
entity: {
|
|
actions: ['update', 'succeedPaying'],
|
|
filter: {
|
|
iState: 'paying',
|
|
entity: 'offlineAccount',
|
|
}
|
|
},
|
|
entityId: {
|
|
actions: ['update', 'succeedPaying'],
|
|
filter: {
|
|
iState: 'paying',
|
|
entity: 'offlineAccount',
|
|
}
|
|
},
|
|
externalId: {
|
|
actions: ['startPaying', 'succeedPaying', 'update'],
|
|
filter: {
|
|
iState: {
|
|
$in: ['unpaid', 'paying'],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
refund: {
|
|
externalId: {
|
|
actions: ['succeed', 'update'],
|
|
filter: {
|
|
iState: 'refunding',
|
|
},
|
|
},
|
|
reason: {
|
|
actions: ['fail'],
|
|
}
|
|
},
|
|
withdraw: {
|
|
dealLoss: {
|
|
actions: ['succeed', 'fail', 'succeedPartially'],
|
|
},
|
|
dealPrice: {
|
|
actions: ['succeed', 'fail', 'succeedPartially'],
|
|
},
|
|
reason: {
|
|
actions: ['succeed', 'fail', 'succeedPartially'],
|
|
},
|
|
meta: {
|
|
actions: ['succeed', 'fail', 'succeedPartially'],
|
|
},
|
|
},
|
|
offlineAccount: {
|
|
name: {
|
|
actions: ['update'],
|
|
filter: {
|
|
// 只有从来没用过的才能改
|
|
sysAccountOper$entity: {
|
|
"#sqp": 'not in',
|
|
}
|
|
}
|
|
},
|
|
channel: {
|
|
actions: ['update'],
|
|
filter: {
|
|
// 只有从来没用过的才能改
|
|
sysAccountOper$entity: {
|
|
"#sqp": 'not in',
|
|
}
|
|
}
|
|
},
|
|
qrCode: {
|
|
actions: ['update'],
|
|
},
|
|
enabled: {
|
|
actions: ['update'],
|
|
},
|
|
taxLossRatio: {
|
|
actions: ['update'],
|
|
},
|
|
depositLossRatio: {
|
|
actions: ['update'],
|
|
},
|
|
refundCompensateRatio: {
|
|
actions: ['update'],
|
|
},
|
|
refundGapDays: {
|
|
actions: ['update'],
|
|
},
|
|
price: {
|
|
actions: ['pay', 'refund', 'deposit', 'withdraw', 'tax'],
|
|
},
|
|
allowDeposit: {
|
|
actions: ['update'],
|
|
filter: {
|
|
enabled: true,
|
|
},
|
|
},
|
|
allowPay: {
|
|
actions: ['update'],
|
|
filter: {
|
|
enabled: true,
|
|
},
|
|
},
|
|
allowWithdrawTransfer: {
|
|
actions: ['update'],
|
|
filter: {
|
|
enabled: true,
|
|
},
|
|
},
|
|
withdrawTransferLossRatio: {
|
|
actions: ['update'],
|
|
filter: {
|
|
enabled: true,
|
|
},
|
|
},
|
|
},
|
|
wpAccount: {
|
|
wechatPay: {
|
|
actions: ['update'],
|
|
},
|
|
taxLossRatio: {
|
|
actions: ['update'],
|
|
},
|
|
depositLossRatio: {
|
|
actions: ['update'],
|
|
},
|
|
refundCompensateRatio: {
|
|
actions: ['update'],
|
|
},
|
|
refundGapDays: {
|
|
actions: ['update'],
|
|
},
|
|
refundLossRatio: {
|
|
actions: ['update'],
|
|
},
|
|
refundLossFloor: {
|
|
actions: ['update'],
|
|
},
|
|
publicKeyFilePath: {
|
|
actions: ['update'],
|
|
},
|
|
privateKeyFilePath: {
|
|
actions: ['update'],
|
|
},
|
|
apiV3Key: {
|
|
actions: ['update'],
|
|
},
|
|
enabled: {
|
|
actions: ['update'],
|
|
},
|
|
price: {
|
|
actions: ['pay', 'refund', 'deposit', 'withdraw', 'tax'],
|
|
}
|
|
},
|
|
withdrawAccount: {
|
|
isDefault: {
|
|
actions: ['update'],
|
|
},
|
|
org: {
|
|
actions: ['update'],
|
|
filter: NoSuccessfulWithdraw,
|
|
},
|
|
name: {
|
|
actions: ['update'],
|
|
filter: NoSuccessfulWithdraw,
|
|
},
|
|
code: {
|
|
actions: ['update'],
|
|
filter: NoSuccessfulWithdraw,
|
|
},
|
|
data: {
|
|
actions: ['update'],
|
|
filter: NoSuccessfulWithdraw,
|
|
},
|
|
enabled: {
|
|
actions: ['disable'],
|
|
}
|
|
}
|
|
};
|
|
export default attrUpdateMatrix;
|