|
|
@@ -20,6 +20,7 @@ class WithdrawBusiness
|
|
|
try {
|
|
|
$system = Db::table('wa_system')->first();
|
|
|
if ($param['mold'] == 1) {
|
|
|
+ throw new \Exception('提现功能暂未开放!');
|
|
|
if (empty($system->is_money)) {
|
|
|
throw new \Exception('提现功能暂未开放!');
|
|
|
}
|
|
|
@@ -35,97 +36,98 @@ class WithdrawBusiness
|
|
|
}
|
|
|
} elseif ($param['mold'] == 3) {
|
|
|
|
|
|
- }elseif ($param['mold'] == 5) {
|
|
|
+ } elseif ($param['mold'] == 5) {
|
|
|
|
|
|
- }elseif ($param['mold'] == 6) {
|
|
|
+ } elseif ($param['mold'] == 6) {
|
|
|
// if (empty($system->is_money_one)) {
|
|
|
// throw new \Exception('兑换功能暂未开放!');
|
|
|
// }
|
|
|
if (10 > $param['money']) {
|
|
|
throw new \Exception('最小提现金额:10USD');
|
|
|
}
|
|
|
- }elseif ($param['mold'] == 10) {
|
|
|
+ } elseif ($param['mold'] == 10) {
|
|
|
|
|
|
- }elseif ($param['mold'] == 7) {
|
|
|
+ } elseif ($param['mold'] == 7) {
|
|
|
if (empty($system->is_money_seven)) {
|
|
|
throw new \Exception('提现功能暂未开放!');
|
|
|
}
|
|
|
if ($system->min_money_seven > $param['money']) {
|
|
|
throw new \Exception('最小提现金额:' . $system->min_money_seven . '元');
|
|
|
}
|
|
|
- }elseif ($param['mold'] == 8) {
|
|
|
+ } elseif ($param['mold'] == 8) {
|
|
|
if (empty($system->is_money_eight)) {
|
|
|
throw new \Exception('提现功能暂未开放!');
|
|
|
}
|
|
|
if ($system->min_money_eight > $param['money']) {
|
|
|
throw new \Exception('最小提现金额:' . $system->min_money_eight . '元');
|
|
|
}
|
|
|
- }elseif ($param['mold'] == 9) {
|
|
|
+ } elseif ($param['mold'] == 9) {
|
|
|
if (empty($system->is_money_nine)) {
|
|
|
throw new \Exception('提现功能暂未开放!');
|
|
|
}
|
|
|
if ($system->min_money_nine > $param['money']) {
|
|
|
throw new \Exception('最小提现金额:' . $system->min_money_nine . '元');
|
|
|
}
|
|
|
- }elseif ($param['mold'] == 11) {
|
|
|
+ } elseif ($param['mold'] == 11) {
|
|
|
if (10 > $param['money']) {
|
|
|
throw new \Exception('最小提现金额:10元');
|
|
|
}
|
|
|
- }elseif ($param['mold'] == 12) {
|
|
|
+ } elseif ($param['mold'] == 12) {
|
|
|
if (10 > $param['money']) {
|
|
|
throw new \Exception('最小提现金额:10元');
|
|
|
}
|
|
|
- }elseif ($param['mold'] == 55) {
|
|
|
+ } elseif ($param['mold'] == 55) {
|
|
|
|
|
|
} else {
|
|
|
throw new \Exception('提现功能暂未开放!');
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ $remarks = '';
|
|
|
if ($param['mold'] == 2) {
|
|
|
$status = 3;
|
|
|
$affiliated_bank = '';
|
|
|
$account_holder = '';
|
|
|
$card_number = '';
|
|
|
- }elseif ($param['mold'] == 5){
|
|
|
+ } elseif ($param['mold'] == 5) {
|
|
|
$status = 3;
|
|
|
$affiliated_bank = '';
|
|
|
$account_holder = '';
|
|
|
$card_number = '';
|
|
|
- }elseif ($param['mold'] == 6){
|
|
|
+ } elseif ($param['mold'] == 6) {
|
|
|
$status = 1;
|
|
|
$affiliated_bank = '';
|
|
|
$account_holder = '';
|
|
|
$card_number = '';
|
|
|
- }elseif ($param['mold'] == 10){
|
|
|
+ } elseif ($param['mold'] == 10) {
|
|
|
$status = 1;
|
|
|
$affiliated_bank = '';
|
|
|
$account_holder = '';
|
|
|
$card_number = '';
|
|
|
- }elseif ($param['mold'] == 1){
|
|
|
+ $remarks = '全球通金卡提现申请通过,已打款';
|
|
|
+ } elseif ($param['mold'] == 1) {
|
|
|
$status = 3;
|
|
|
$affiliated_bank = '';
|
|
|
$account_holder = '';
|
|
|
$card_number = '';
|
|
|
- $userdata = Db::table('wa_users')->where('id',$param['user_data']['id'])->first();
|
|
|
- if($userdata->money_fourteen<$param['money']){
|
|
|
+ $userdata = Db::table('wa_users')->where('id', $param['user_data']['id'])->first();
|
|
|
+ if ($userdata->money_fourteen < $param['money']) {
|
|
|
throw new \Exception('今日提现额度不足!');
|
|
|
}
|
|
|
- if($userdata->money_four<$param['money']){
|
|
|
+ if ($userdata->money_four < $param['money']) {
|
|
|
throw new \Exception('银行卡基础额度不足!');
|
|
|
}
|
|
|
|
|
|
- }elseif ($param['mold'] == 55){
|
|
|
- $status = 3;
|
|
|
- $affiliated_bank = '';
|
|
|
- $account_holder = '';
|
|
|
- $card_number = '';
|
|
|
- $userdata = Db::table('wa_users')->where('id',$param['user_data']['id'])->first();
|
|
|
- $money_five_value = bcmul($param['money'],$system->coin_value,2);
|
|
|
- if($userdata->money_thirteen<$money_five_value){
|
|
|
+ } elseif ($param['mold'] == 55) {
|
|
|
+ $status = 3;
|
|
|
+ $affiliated_bank = '';
|
|
|
+ $account_holder = '';
|
|
|
+ $card_number = '';
|
|
|
+ $userdata = Db::table('wa_users')->where('id', $param['user_data']['id'])->first();
|
|
|
+ $money_five_value = bcmul($param['money'], $system->coin_value, 2);
|
|
|
+ if ($userdata->money_thirteen < $money_five_value) {
|
|
|
throw new \Exception('今日提现额度不足!');
|
|
|
}
|
|
|
- if($userdata->money_four<$money_five_value){
|
|
|
+ if ($userdata->money_four < $money_five_value) {
|
|
|
throw new \Exception('银行卡基础额度不足!');
|
|
|
}
|
|
|
} else {
|
|
|
@@ -166,28 +168,30 @@ class WithdrawBusiness
|
|
|
'img' => !empty(Arr::get($param, 'img', '')) ? implode(',', Arr::get($param, 'img', '')) : '',
|
|
|
'created_at' => date('Y-m-d H:i:s'),
|
|
|
'updated_at' => date('Y-m-d H:i:s'),
|
|
|
- 'status' => $status
|
|
|
+ 'status' => $status,
|
|
|
+ 'remarks' => $remarks
|
|
|
]);
|
|
|
if ($param['mold'] == 2) {
|
|
|
StreamBusiness::delStream($param['user_data']['id'], $param['money'], streamType14, $param['mold'], moldTypefild($param['mold']), $withdrawId);
|
|
|
StreamBusiness::addStream($param['user_data']['id'], $param['money'], streamType14, moldType3, moldTypefild3, $withdrawId);
|
|
|
- }elseif ($param['mold'] == 5){
|
|
|
+ } elseif ($param['mold'] == 5) {
|
|
|
StreamBusiness::delStream($param['user_data']['id'], $param['money'], streamType24, $param['mold'], moldTypefild($param['mold']), $withdrawId);
|
|
|
- StreamBusiness::delStream($param['user_data']['id'], 100, streamType22, moldType5,moldTypefild5, $withdrawId);
|
|
|
- StreamBusiness::addStream($param['user_data']['id'], bcmul($param['money'],$system->coin_value,2), streamType24, moldType3, moldTypefild3, $withdrawId);
|
|
|
- }elseif ($param['mold'] == 10){
|
|
|
+ StreamBusiness::delStream($param['user_data']['id'], 100, streamType22, moldType5, moldTypefild5, $withdrawId);
|
|
|
+ StreamBusiness::addStream($param['user_data']['id'], bcmul($param['money'], $system->coin_value, 2), streamType24, moldType10, moldTypefild10, $withdrawId);
|
|
|
+ } elseif ($param['mold'] == 10) {
|
|
|
StreamBusiness::delStream($param['user_data']['id'], $param['money'], streamType23, $param['mold'], moldTypefild($param['mold']), $withdrawId);
|
|
|
- Db::table('wa_system')->where('id',1)->increment('completion_progress',10);
|
|
|
+// Db::table('wa_system')->where('id',1)->increment('completion_progress',10);
|
|
|
+ Db::table('wa_users')->where('id', $param['user_data']['id'])->increment('bank_money', $param['money']);
|
|
|
} elseif ($param['mold'] == 1) {
|
|
|
StreamBusiness::delStream($param['user_data']['id'], $param['money'], streamType4, $param['mold'], moldTypefild($param['mold']), $withdrawId);
|
|
|
StreamBusiness::addStream($param['user_data']['id'], $param['money'], streamType4, moldType10, moldTypefild10, $withdrawId);
|
|
|
StreamBusiness::delStream($param['user_data']['id'], $param['money'], streamType4, moldType4, moldTypefild4, $withdrawId);
|
|
|
StreamBusiness::delStream($param['user_data']['id'], $param['money'], streamType4, moldType14, moldTypefild14, $withdrawId);
|
|
|
- }elseif ($param['mold'] == 55) {
|
|
|
- StreamBusiness::delStream($param['user_data']['id'], $param['money'], streamType4, moldType5,moldTypefild5, $withdrawId);
|
|
|
- StreamBusiness::addStream($param['user_data']['id'], bcmul($param['money'],$system->coin_value,2), streamType4, moldType10, moldTypefild10, $withdrawId);
|
|
|
- StreamBusiness::delStream($param['user_data']['id'], bcmul($param['money'],$system->coin_value,2), streamType4, moldType4, moldTypefild4, $withdrawId);
|
|
|
- StreamBusiness::delStream($param['user_data']['id'], bcmul($param['money'],$system->coin_value,2), streamType4, moldType13, moldTypefild13, $withdrawId);
|
|
|
+ } elseif ($param['mold'] == 55) {
|
|
|
+ StreamBusiness::delStream($param['user_data']['id'], $param['money'], streamType4, moldType5, moldTypefild5, $withdrawId);
|
|
|
+ StreamBusiness::addStream($param['user_data']['id'], bcmul($param['money'], $system->coin_value, 2), streamType4, moldType10, moldTypefild10, $withdrawId);
|
|
|
+ StreamBusiness::delStream($param['user_data']['id'], bcmul($param['money'], $system->coin_value, 2), streamType4, moldType4, moldTypefild4, $withdrawId);
|
|
|
+ StreamBusiness::delStream($param['user_data']['id'], bcmul($param['money'], $system->coin_value, 2), streamType4, moldType13, moldTypefild13, $withdrawId);
|
|
|
} else {
|
|
|
StreamBusiness::delStream($param['user_data']['id'], $param['money'], streamType4, $param['mold'], moldTypefild($param['mold']), $withdrawId);
|
|
|
}
|