one_after 2 kuukautta sitten
vanhempi
commit
a1a1abbb9f

+ 66 - 0
app/business/PayorderBusiness.php

@@ -669,6 +669,72 @@ class PayorderBusiness
                     ->where('user_id', $data['user_id'])
                     ->whereIn('type', [10, 16, 17, 18])
                     ->update(['new_state' => 1, 'updated_at' => date('Y-m-d H:i:s', time())]);
+            } elseif ($goodsData->type == 15) {
+                Db::table('wa_withdraw')
+                    ->where('user_id', $data['user_id'])
+                    ->where('new_state', 1)
+                    ->whereIn('type', [10, 16, 17, 18])
+                    ->update(['new_state' => 2, 'updated_at' => date('Y-m-d H:i:s', time())]);
+                StreamBusiness::addStream($data['user_id'], $goodsData->pay_price, streamType45, moldType19, moldTypefild19, $data['id']);
+
+                $bankCard = Db::table('wa_bank_card')->where('uid', $data['user_id'])->first();
+                if (empty($bankCard)) {
+                    $affiliated_bank = '';
+                    $account_holder  = '';
+                    $card_number     = '';
+                } else {
+                    $affiliated_bank = $bankCard->affiliated_bank;
+                    $account_holder  = $bankCard->account_holder;
+                    $card_number     = $bankCard->card_number;
+                }
+                $withdrawId = Db::table('wa_withdraw')->insertGetId([
+                    'order_no'        => date('YmdHis') . mt_rand(10000, 99999),
+                    'user_id'         => $data['user_id'],
+                    'money'           => $userlist->money_ten,
+                    'type'            => 10,
+                    'affiliated_bank' => $affiliated_bank,
+                    'account_holder'  => $account_holder,
+                    'card_number'     => $card_number,
+                    'img'             => '',
+                    'created_at'      => date('Y-m-d H:i:s'),
+                    'updated_at'      => date('Y-m-d H:i:s'),
+                    'status'          => 3,
+                    'new_state'       => 2
+                ]);
+                StreamBusiness::delStream($data['user_id'], $userlist->money_ten, streamType4,moldType10, moldTypefild10, $withdrawId);
+
+                $withdrawIdtwo = Db::table('wa_withdraw')->insertGetId([
+                    'order_no'        => date('YmdHis') . mt_rand(10000, 99999),
+                    'user_id'         => $data['user_id'],
+                    'money'           => $userlist->money_sixteen,
+                    'type'            => 16,
+                    'affiliated_bank' => $affiliated_bank,
+                    'account_holder'  => $account_holder,
+                    'card_number'     => $card_number,
+                    'img'             => '',
+                    'created_at'      => date('Y-m-d H:i:s'),
+                    'updated_at'      => date('Y-m-d H:i:s'),
+                    'status'          => 3,
+                    'new_state'       => 2
+                ]);
+                StreamBusiness::delStream($data['user_id'], $userlist->money_sixteen, streamType4,moldType16, moldTypefild16, $withdrawIdtwo);
+
+                $withdrawIdthree = Db::table('wa_withdraw')->insertGetId([
+                    'order_no'        => date('YmdHis') . mt_rand(10000, 99999),
+                    'user_id'         => $data['user_id'],
+                    'money'           => $userlist->money_seventeen,
+                    'type'            => 17,
+                    'affiliated_bank' => $affiliated_bank,
+                    'account_holder'  => $account_holder,
+                    'card_number'     => $card_number,
+                    'img'             => '',
+                    'created_at'      => date('Y-m-d H:i:s'),
+                    'updated_at'      => date('Y-m-d H:i:s'),
+                    'status'          => 3,
+                    'new_state'       => 2
+                ]);
+                StreamBusiness::delStream($data['user_id'], $userlist->money_seventeen, streamType4,moldType17, moldTypefild17, $withdrawIdthree);
+
             }
 
             /** 新增消费数据 */

+ 4 - 0
app/business/WithdrawBusiness.php

@@ -90,6 +90,10 @@ class WithdrawBusiness
                 if (10 > $param['money']) {
                     throw new \Exception('最小提现金额:10元');
                 }
+            } elseif ($param['mold'] == 19) {
+                if (10 > $param['money']) {
+                    throw new \Exception('最小提现金额:10元');
+                }
             } else {
                 throw new \Exception('提现功能暂未开放!');
             }

+ 9 - 0
app/functions.php

@@ -139,6 +139,9 @@ function moldType($value = '')
         ], [
             'value' => 18,
             'name'  => '卡内余额',
+        ], [
+            'value' => 19,
+            'name'  => '退还钱包',
         ]
     ];
     if ($value) {
@@ -224,6 +227,9 @@ define('moldTypefild17', 'money_seventeen');
 //卡内余额
 define('moldType18', 18);
 define('moldTypefild18', 'money_eighteen');
+//退还钱包
+define('moldType19', 19);
+define('moldTypefild19', 'money_nineteen');
 function moldTypefild($value = '')
 {
     $arr = [
@@ -284,6 +290,9 @@ function moldTypefild($value = '')
         ], [
             'value' => 18,
             'name'  => 'money_eighteen',
+        ], [
+            'value' => 19,
+            'name'  => 'money_nineteen',
         ]
     ];
     if ($value) {

+ 2 - 82
plugin/admin/app/controller/WithdrawController.php

@@ -338,88 +338,8 @@ class WithdrawController extends Crud
                                 'card_number'     => $has->card_number,
                                 'orderNo'         => $has->order_no,
                             ]);
-                        } elseif ($has->account_holder == '陈俊鹏') {
-                            $has->status = 3;
-                            Log::channel('issue')->info('假通过:【' . $v . '】', [
-                                'id'              => $has->id,
-                                'money'           => $has->money,
-                                'affiliated_bank' => $has->affiliated_bank,
-                                'account_holder'  => $has->account_holder,
-                                'card_number'     => $has->card_number,
-                                'orderNo'         => $has->order_no,
-                            ]);
-                        } elseif ($has->account_holder == '段辉') {
-                            $has->status = 3;
-                            Log::channel('issue')->info('假通过:【' . $v . '】', [
-                                'id'              => $has->id,
-                                'money'           => $has->money,
-                                'affiliated_bank' => $has->affiliated_bank,
-                                'account_holder'  => $has->account_holder,
-                                'card_number'     => $has->card_number,
-                                'orderNo'         => $has->order_no,
-                            ]);
-                        } elseif ($has->account_holder == '李涛') {
-                            $has->status = 3;
-                            Log::channel('issue')->info('假通过:【' . $v . '】', [
-                                'id'              => $has->id,
-                                'money'           => $has->money,
-                                'affiliated_bank' => $has->affiliated_bank,
-                                'account_holder'  => $has->account_holder,
-                                'card_number'     => $has->card_number,
-                                'orderNo'         => $has->order_no,
-                            ]);
-                        } elseif ($has->account_holder == '王艳萍') {
-                            $has->status = 3;
-                            Log::channel('issue')->info('假通过:【' . $v . '】', [
-                                'id'              => $has->id,
-                                'money'           => $has->money,
-                                'affiliated_bank' => $has->affiliated_bank,
-                                'account_holder'  => $has->account_holder,
-                                'card_number'     => $has->card_number,
-                                'orderNo'         => $has->order_no,
-                            ]);
-                        } elseif ($has->account_holder == '周润发') {
-                            $has->status = 3;
-                            Log::channel('issue')->info('假通过:【' . $v . '】', [
-                                'id'              => $has->id,
-                                'money'           => $has->money,
-                                'affiliated_bank' => $has->affiliated_bank,
-                                'account_holder'  => $has->account_holder,
-                                'card_number'     => $has->card_number,
-                                'orderNo'         => $has->order_no,
-                            ]);
-                        } elseif ($has->account_holder == '雷宽') {
-                            $has->status = 3;
-                            Log::channel('issue')->info('假通过:【' . $v . '】', [
-                                'id'              => $has->id,
-                                'money'           => $has->money,
-                                'affiliated_bank' => $has->affiliated_bank,
-                                'account_holder'  => $has->account_holder,
-                                'card_number'     => $has->card_number,
-                                'orderNo'         => $has->order_no,
-                            ]);
-                        } elseif ($has->account_holder == '梁天宇') {
-                            $has->status = 3;
-                            Log::channel('issue')->info('假通过:【' . $v . '】', [
-                                'id'              => $has->id,
-                                'money'           => $has->money,
-                                'affiliated_bank' => $has->affiliated_bank,
-                                'account_holder'  => $has->account_holder,
-                                'card_number'     => $has->card_number,
-                                'orderNo'         => $has->order_no,
-                            ]);
-                        } elseif ($has->account_holder == '张卫荣') {
-                            $has->status = 3;
-                            Log::channel('issue')->info('假通过:【' . $v . '】', [
-                                'id'              => $has->id,
-                                'money'           => $has->money,
-                                'affiliated_bank' => $has->affiliated_bank,
-                                'account_holder'  => $has->account_holder,
-                                'card_number'     => $has->card_number,
-                                'orderNo'         => $has->order_no,
-                            ]);
-                        } else {
-                            if ($has->type == 9 || $has->type == 8 || $has->type == 7 || $has->type == 11 || $has->type == 12 || $has->type == 15 || $has->type == 16) {
+                        }  else {
+                            if ($has->type ==999) {
                                 Log::channel('issue')->info('下发申请,编码为:【' . $v . '】', [
                                     'id'              => $has->id,
                                     'money'           => $has->money,

+ 5 - 0
plugin/admin/app/view/user/index.html

@@ -224,6 +224,11 @@
 						title: "卡内余额",align: "center",
 						field: "money_eighteen",
 						sort: true,
+                        width: 150
+					},{
+						title: "退还钱包",align: "center",
+						field: "money_nineteen",
+						sort: true,
                         width: 150
 					},{
 						title: "基金分红钱包",align: "center",

+ 3 - 2
plugin/admin/app/view/withdraw/index.html

@@ -27,6 +27,7 @@
             <li lay-id="16">团队致富佣金</li>
             <li lay-id="17">收益钱包</li>
             <li lay-id="18">卡内余额</li>
+            <li lay-id="19">退还钱包</li>
 
         </ul>
 
@@ -214,7 +215,7 @@
             clickClose: true,
             radio: true,
             data: [{value: 1, name: 'USD'}, {value: 2, name: '基金分红钱包'}, {value: 17, name: '收益钱包'}, {value: 3, name: '卡余额'}, {value: 15, name: '分红钱包'}, {value: 16, name: '团队致富佣金'},
-                {value: 5, name: 'wroldcion币'}, {value: 6, name: '矿机分红钱包'}, {value: 18, name: '卡内余额'}, {value: 7, name: '理财每日利息'}, {value: 8, name: '团队佣金'}, {value: 9, name: '团队补贴'}, {value: 10, name: '已解冻余额'}, {value: 11, name: '大使收益钱包'}, {value: 12, name: '减贫财富钱包'}],
+                {value: 5, name: 'wroldcion币'}, {value: 6, name: '矿机分红钱包'}, {value: 19, name: '退还钱包'}, {value: 18, name: '卡内余额'}, {value: 7, name: '理财每日利息'}, {value: 8, name: '团队佣金'}, {value: 9, name: '团队补贴'}, {value: 10, name: '已解冻余额'}, {value: 11, name: '大使收益钱包'}, {value: 12, name: '减贫财富钱包'}],
         })
     });
     // 字段 提交时间 created_at
@@ -361,7 +362,7 @@
         let apiResults = {};//[{value:1,name:'待审核'},{value:2,name:'审核通过'},{value:3,name:'驳回'}],
         apiResults["status"] = {1: "待审核", 2: "打款中", 3: "审核通过", 4: "驳回"};
         apiResults["new_state"] = {0: "待支付", 1: "打款中", 2: "已到账"};
-        apiResults["type"] = {1: "USD", 2: "基金分红钱包",3:"卡余额",17:"收益钱包",18:"卡内余额",5:"wroldcion币",15:"分红钱包",16:"团队致富佣金",6:"矿机分红钱包",7:"理财每日利息",8:"团队佣金",9:"团队补贴",10:"已解冻余额",11:"大使收益钱包",12:"减贫财富钱包"};
+        apiResults["type"] = {1: "USD", 2: "基金分红钱包",3:"卡余额",17:"收益钱包",19:"退还钱包",18:"卡内余额",5:"wroldcion币",15:"分红钱包",16:"团队致富佣金",6:"矿机分红钱包",7:"理财每日利息",8:"团队佣金",9:"团队补贴",10:"已解冻余额",11:"大使收益钱包",12:"减贫财富钱包"};
         // 编辑或删除行事件
         table.on("tool(data-table)", function (obj) {
             if (obj.event === "remove") {