浏览代码

解除质抵押订单

afa 7 月之前
父节点
当前提交
f1ff240eb6
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      application/common/logic/PledgeLogic.php

+ 4 - 0
application/common/logic/PledgeLogic.php

@@ -57,6 +57,8 @@ class PledgeLogic
         Loader::model('UserPledge')::setPledgeData($user_id, $pledge->id, $pledge->product_id, 
         $product, //订单信息
         $pledge->day_num, $pledge_num);
+
+        \think\Log::info('添加质抵押订单', ['pledge_id' => $pledge->id, 'order_no' => $order_no, 'user_id' => $user_id]);
        
         //修改状态
         return $model->whereIn('order_no', $order_no)->where('status', $model::Paid)->limit(count($order_no))->setField('status', $model::Freeze);
@@ -107,9 +109,11 @@ class PledgeLogic
         $total = bcmul($reta, $inter, 6) * $rows->num; //累计收益
         $rows->total_self= bcadd($total, $rows->total_self, 6);
 
+        \think\Log::info('解除质抵押订单', ['pledge_id' => $pledge_id, 'detail' => $rows->details, 'user_id' => $user_id]);
         //修改状态
         $detail =json_decode($rows->details, true);
         Loader::model('ProductOrder')::whereIn('order_no', array_column($detail, 'order_no'))->setField('status', ProductOrder::Paid);
+
         $rows->status    = $model::Remove;
         $rows->last_time = $time;
         return  $rows->save();