|
|
@@ -19,11 +19,19 @@ class Stock {
|
|
|
return $Table_stock->getInfoById($id);
|
|
|
}
|
|
|
|
|
|
- static public function update($stock_code,$attrs)
|
|
|
+ static public function update($stock_id,$attrs)
|
|
|
{
|
|
|
if (empty($attrs)) throw new Exception('参数不能为空', 102);
|
|
|
$Table_stock = new Table_stock();
|
|
|
- $id = $Table_stock->update($stock_code,$attrs);
|
|
|
+ $id = $Table_stock->update($stock_id,$attrs);
|
|
|
+ return $id;
|
|
|
+ }
|
|
|
+
|
|
|
+ static public function updateByCode($stock_code,$attrs)
|
|
|
+ {
|
|
|
+ if (empty($attrs)) throw new Exception('参数不能为空', 102);
|
|
|
+ $Table_stock = new Table_stock();
|
|
|
+ $id = $Table_stock->updateByCode($stock_code,$attrs);
|
|
|
return $id;
|
|
|
}
|
|
|
|