浏览代码

交易列表

afa 6 月之前
父节点
当前提交
bbbe7893fd
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      application/api/controller/Teac.php

+ 3 - 0
application/api/controller/Teac.php

@@ -31,6 +31,9 @@ class Teac extends Api
              ->where('product_teac.status', ProductTeac::Normal)->where('type_id', $type_id)
              ->where('product_teac.status', ProductTeac::Normal)->where('type_id', $type_id)
              ->order('create_time desc')
              ->order('create_time desc')
              ->paginate($this->pageSize);
              ->paginate($this->pageSize);
+        //总价     
+        foreach ($list as &$item) 
+            $item->total_price = bcmul($item->stock - $item->num, $item->price, 2);
         $this->success('ok', $list);
         $this->success('ok', $list);
     }
     }