songxingwei před 3 roky
rodič
revize
1fe91be6ca
1 změnil soubory, kde provedl 7 přidání a 2 odebrání
  1. 7 2
      application/common/model/User.php

+ 7 - 2
application/common/model/User.php

@@ -636,7 +636,8 @@ class User Extends Model
         }
 
         //收益记录
-        $record = MoneyLog::where('user_id',$user_id)->where('title','订单收益')->select();
+        //$record = MoneyLog::where('user_id',$user_id)->where('title','订单收益')->select();
+        $record = MoneyLog::where('user_id',$user_id)->whereIn('title','订单收益,系统增加,,系统减少,加班费收益')->select();
         if (count($record)>0){
             $record = $record->toArray();
             $array = [];
@@ -645,7 +646,11 @@ class User Extends Model
                 $array2['paid'] = 1;
                 $array2['why'] = '';
                 $array2['create_at'] = $v['create_at'];
-                $array2['price'] = '+'.$v['change_money'];
+                if ($v['pm']==1){
+                    $array2['price'] = '+'.$v['change_money'];
+                }else{
+                    $array2['price'] = '-'.$v['change_money'];
+                }
                 if ($v['link_id']!=0){
                     $project_name = Order::where('id',$v['link_id'])->value('project_name');
                 }else{