Browse Source

增加累计任务数

Jason 1 year ago
parent
commit
feca975f0d

+ 1 - 1
application/api/controller/Money.php

@@ -228,7 +228,7 @@ class Money extends Api
             $this->error(__('无提现信息'));
         }
 
-        $withdraw_fee = (new Config())->getValue('withdraw_fee');
+        $withdraw_fee = (new Config())->getValue('withdrawal_fee');
         if(empty($withdraw_fee)){
             $withdraw_fee = 0;
         }elseif($withdraw_fee > 1){

+ 11 - 2
application/api/controller/Order.php

@@ -187,6 +187,10 @@ class Order extends Api
             $this->error(__('参数有误'));
         }
 
+        if($user['balance'] < 0){
+            $this->error(__('余额不足'));
+        }
+
         if($order_info['status'] == OrderModel::Success){
             $this->success('');
         }
@@ -205,8 +209,13 @@ class Order extends Api
             (new MoneyLog())->change($user['id'], $order_info['amount'], MoneyLog::PayBack, '', '');
             //订单佣金
             (new MoneyLog())->change($user['id'], $order_info['bonus'], MoneyLog::OrderBonus, '', '');
-            //累积充值金额
-            //(new Users())->where('id', $row->user_id)->setInc('money_in_sum', $row->amount);
+            //累积佣金和任务次数
+            (new Users())
+                ->where('id', $user['id'])
+                ->update([
+                    'task_num'		=>	Db::raw('task_num + 1'),
+                    'bonus_sum'		=>	Db::raw('bonus_sum + ' .$order_info['bonus']),
+                ]);
             //向上级发放
 
 

+ 3 - 3
application/extra/site.php

@@ -2,7 +2,7 @@
 
 return array (
   'name' => '投标系统',
-  'logo' => 'https://www.estyzl38.com/static/img/gemini.90d29b68.png',
+  'logo' => 'http://dapp-static.oss-cn-shenzhen.aliyuncs.com/tou-biao/202403/logo.png',
   'maintain_switch' => '1',
   'day_tasks_num' => '1',
   'task_income' => '0.1',
@@ -34,7 +34,7 @@ return array (
     'custom' => 'Custom',
   ),
   'recharge_usdt_switch' => '1',
-  'recharge_usdt_address' => '12',
+  'recharge_usdt_address' => 'ox5454534cccccccccc',
   'recharge_bank_switch' => '1',
   'recharge_bank_name' => '花旗银行',
   'withdraw_usdt_switch' => '1',
@@ -43,5 +43,5 @@ return array (
   'withdrawal_fee' => '0.2',
   'recharge_bank_card' => '银行卡号号码',
   'recharge_real_name' => '开户人姓名',
-  'withdraw_fee' => '0.05',
+  'withdraw_fee' => '1',
 );