|
|
@@ -150,27 +150,29 @@ class ClearController extends Controller
|
|
|
$ownPtStyle = $ghs['ownPtStyle'] ?? 1;
|
|
|
$balance = $ghs['balance'] ?? 0;
|
|
|
$customId = $ghs['customId'] ?? 0;
|
|
|
- if ($ownPtStyle == 1) {
|
|
|
- $custom = CustomClass::getById($customId, true);
|
|
|
- if (!empty($custom)) {
|
|
|
- $shopId = $ghs['shopId'] ?? 0;
|
|
|
- $shop = \bizGhs\shop\classes\ShopClass::getById($shopId, true);
|
|
|
- if (!empty($shop)) {
|
|
|
- $staff = new \stdClass();
|
|
|
- $staff->id = 0;
|
|
|
- $staff->name = '';
|
|
|
- $params = [
|
|
|
- 'remark' => '系统升级恢复',
|
|
|
- 'rechargeType' => 0, // 0 代表正常充值
|
|
|
- ];
|
|
|
- // 模拟商家帮充并自动销挂账,payWay 设为 0 (线下微信)
|
|
|
- GhsRechargeSettleService::merchantRechargeWithAutoClear($custom, $balance, $shop, $staff, 0, $params);
|
|
|
- echo "customId: {$customId} 充值成功 {$balance} 元\n";
|
|
|
+ if($customId == 16440 || $customId == 46425){
|
|
|
+ if ($ownPtStyle == 1) {
|
|
|
+ $custom = CustomClass::getById($customId, true);
|
|
|
+ if (!empty($custom)) {
|
|
|
+ $shopId = $ghs['shopId'] ?? 0;
|
|
|
+ $shop = \bizGhs\shop\classes\ShopClass::getById($shopId, true);
|
|
|
+ if (!empty($shop)) {
|
|
|
+ $staff = new \stdClass();
|
|
|
+ $staff->id = 0;
|
|
|
+ $staff->name = '';
|
|
|
+ $params = [
|
|
|
+ 'remark' => '系统升级恢复',
|
|
|
+ 'rechargeType' => 0, // 0 代表正常充值
|
|
|
+ ];
|
|
|
+ // 模拟商家帮充并自动销挂账,payWay 设为 0 (线下微信)
|
|
|
+ GhsRechargeSettleService::merchantRechargeWithAutoClear($custom, $balance, $shop, $staff, 0, $params);
|
|
|
+ echo "customId: {$customId} 充值成功 {$balance} 元\n";
|
|
|
+ } else {
|
|
|
+ echo "customId: {$customId} 找不到对应的 shop\n";
|
|
|
+ }
|
|
|
} else {
|
|
|
- echo "customId: {$customId} 找不到对应的 shop\n";
|
|
|
+ echo "customId: {$customId} 找不到对应的 custom\n";
|
|
|
}
|
|
|
- } else {
|
|
|
- echo "customId: {$customId} 找不到对应的 custom\n";
|
|
|
}
|
|
|
}
|
|
|
}
|