浏览代码

会员升级

Kirin 1 月之前
父节点
当前提交
63772aedff

+ 2 - 0
app/controller/admin/v1/finance/UserExchange.php

@@ -77,6 +77,7 @@ class UserExchange extends AuthController
 
         $data = $this->request->postMore([
             'real_name',
+            'account',
             'extract_price',
             'extract_num',
             'exchange_num',
@@ -90,6 +91,7 @@ class UserExchange extends AuthController
         if ($data['exchange_num'] <= 0) return $this->fail('请输入转换股份');
         if (!$data['bank_code']) return $this->fail('请输入银行卡号');
         if (!$data['bank_address']) return $this->fail('请输入开户行');
+        if (!$data['account']) return $this->fail('请输入账号');
 
         return $this->success($this->services->update($id, $data) ? '修改成功' : '修改失败');
     }

+ 2 - 0
app/controller/api/v1/user/UserExchangeController.php

@@ -57,6 +57,7 @@ class UserExchangeController
             ['name', ''],
             ['bankname', ''],
             ['cardnum', ''],
+            ['account', ''],
         ]);
         if (!preg_match('/^[0-9]+(.[0-9]{1,2})?$/', (float)$extractInfo['energy'])) return app('json')->fail('转换能量输入有误');
         if (!$extractInfo['cardnum'] == '')
@@ -64,6 +65,7 @@ class UserExchangeController
                 return app('json')->fail('银行卡号输入有误');
         if (!$extractInfo['cardnum']) return app('json')->fail('请输入银行卡账号');
         if (!$extractInfo['bankname']) return app('json')->fail('请输入开户行信息');
+        if (!$extractInfo['account']) return app('json')->fail('请输入账号信息');
         $uid = (int)$request->uid();
         if ($this->services->cash($uid, $extractInfo))
             return app('json')->successful('申请转换成功!');

+ 2 - 1
app/services/other/export/ExportServices.php

@@ -939,7 +939,7 @@ class ExportServices extends BaseServices
      */
     public function exchange($data = [], $type = 1)
     {
-        $header = ['交易账号', '姓名', '银行', '银行卡号', '身份证号', '联系电话', '申购价额', '申购份额', '冻结份额', '封闭期'];
+        $header = ['交易账号', '姓名', '银行', '交易账号', '银行卡号', '身份证号', '联系电话', '申购价额', '申购份额', '冻结份额', '封闭期'];
         $title = ['用户能量转份额导出', '用户能量转份额信息' . time(), ' 生成时间:' . date('Y-m-d H:i:s', time())];
         $filename = '用户能量转份额导出_' . date('YmdHis', time());
         $export = [];
@@ -951,6 +951,7 @@ class ExportServices extends BaseServices
                     'trade_no' => '',
                     'real_name' => $item['user']['real_name'],
                     'bank' => $item['bank_address'],
+                    'account' => $item['account'],
                     'bank_code' => $item['bank_code'],
                     'id_card' => $item['user']['card_id'],
                     'phone' => $item['user']['phone'],

+ 2 - 0
app/services/user/UserExchangeServices.php

@@ -224,6 +224,7 @@ class UserExchangeServices extends BaseServices
         $f[] = Form::number('extract_num', '转换能量', (float)$UserExtract['extract_num'])->precision(2)->disabled(true);
         $f[] = Form::number('extract_price', '股份价格', (float)$UserExtract['extract_price'])->precision(2)->disabled(true);
         $f[] = Form::number('exchange_num', '转换股份', (float)$UserExtract['exchange_num'])->precision(2)->disabled(true);
+        $f[] = Form::input('account', '账号', $UserExtract['account']);
         $f[] = Form::input('bank_code', '银行卡号', $UserExtract['bank_code']);
         $f[] = Form::input('bank_address', '开户行', $UserExtract['bank_address']);
         $f[] = Form::input('mark', '备注', $UserExtract['mark'])->type('textarea');
@@ -362,6 +363,7 @@ class UserExchangeServices extends BaseServices
         if ($extract_fee < 0) $extract_fee = 0;
         $insertData = [
             'uid' => $user['uid'],
+            'account' => $data['account'],
             'extract_num' => bcsub((string)$data['money'], (string)$extract_fee, 2),
             'extract_fee' => $extract_fee,
             'extract_price' => $stock_price,