...
|
...
|
@@ -41,7 +41,7 @@ class Add extends Api |
|
|
}
|
|
|
$params = $this->request->param();
|
|
|
$battery_type_id=Db::name('battery_code')->where('BatteryCode', $params['battery_code'])->value('battery_type_id');
|
|
|
if(empty($battery_type_id))$this->error('未在产品库找到给电池类型');
|
|
|
if(empty($battery_type_id))$this->error('未在产品库找到该电池类型');
|
|
|
$data = [
|
|
|
'battery_code' => $params['battery_code'],
|
|
|
'battery_type_id' => $battery_type_id,
|
...
|
...
|
|