|
@@ -38,14 +38,18 @@ class BankAccountController extends CatchController
|
|
|
$data = $request->only(['owner_name', 'name_of_payee', 'card_no',
|
|
|
'bank_name', 'sub_bank_name', 'phone_of_payee', 'business_id']);
|
|
|
$data['updated_at'] = $now;
|
|
|
- // 只有待审核的允许修改
|
|
|
+ // 只有待审核的允许修改 --放弃
|
|
|
+ // DB::table('bank_cards')
|
|
|
+ // ->where([
|
|
|
+ // 'id' => $id, 'status' => 1, 'company_uid'=> $company_uid
|
|
|
+ // ])->update($data);
|
|
|
DB::table('bank_cards')
|
|
|
->where([
|
|
|
- 'id' => $id, 'status' => 1, 'company_uid'=> $company_uid
|
|
|
+ 'id' => $id, 'company_uid'=> $company_uid
|
|
|
])->update($data);
|
|
|
} else {
|
|
|
$data = $request->all();
|
|
|
- $data['status'] = 1;
|
|
|
+ $data['status'] = 2; // 免审直接通过
|
|
|
$data['updated_at'] = $data['created_at'] = $now;
|
|
|
$data['company_uid'] = $company_uid;
|
|
|
DB::table('bank_cards')
|
|
@@ -116,8 +120,9 @@ class BankAccountController extends CatchController
|
|
|
return DB::table('bank_cards')
|
|
|
->where([
|
|
|
'company_uid' => $company_uid,
|
|
|
- 'status' => 2
|
|
|
- ])->select('id', 'bank_name', 'card_no', 'sub_bank_name')
|
|
|
+ // 'status' => 2
|
|
|
+ ])->where('status','>',0)
|
|
|
+ ->select('id', 'bank_name', 'card_no', 'sub_bank_name')
|
|
|
->get();
|
|
|
}
|
|
|
|