1.提交缺失的东西
This commit is contained in:
@ -40,7 +40,7 @@ class GoodsLogic extends BaseLogic
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
Goods::create([
|
||||
$id = Goods::insertGetId([
|
||||
'name' => $params['name'],
|
||||
'code' => $params['code'],
|
||||
'first_category_id' => $params['first_category_id'],
|
||||
@ -87,7 +87,11 @@ class GoodsLogic extends BaseLogic
|
||||
'is_express' => $params['is_express'],
|
||||
'is_selffetch' => $params['is_selffetch']
|
||||
]);
|
||||
|
||||
foreach($params['goods_image'] as $key=>$value){
|
||||
$d['goods_id'] = $id;
|
||||
$d['uri'] = $value;
|
||||
Db::name("goods_image")->save($d);
|
||||
}
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
||||
Reference in New Issue
Block a user