Commit 73c38f6b by 杨树贤

添加商品ID的录入

parent 88242302
......@@ -91,7 +91,7 @@ class ArticleModel extends Model
public function ApiSaveArticle($AdminID){
$Arr=['art_id','top_type_id','type_id','title','flag','sort_order','art_type','start_review','title_seo','description','keyword','litpic',
'banner_flag','banner_title','banner_img','tag_tag_id','tag_tag','tag_url','tag_status','content','writer'];
'banner_flag','banner_title','banner_img','tag_tag_id','tag_tag','tag_url','tag_status','content','writer','goods_id'];
$collert=Request::only($Arr);
$collert=TrimX($collert,true,$Arr);
//先处理文章主表
......@@ -103,9 +103,8 @@ class ArticleModel extends Model
}
$ArticleArr=['top_type_id','type_id','title','description','keyword','sort_order','writer','title_seo','litpic',
'start_review','art_type','banner_flag','banner_title','banner_img'];
'start_review','art_type','banner_flag','banner_title','banner_img','goods_id'];
foreach ($ArticleArr as $k=>$v) $data[$v]=empty($collert[$v])?'':$collert[$v];
DB::connection($this->connection)->beginTransaction();
$ErrInfo=empty($collert['art_id'])?'新增':'编辑';
if(empty($collert['art_id'])){//新增
......@@ -171,7 +170,6 @@ class ArticleModel extends Model
//删除这一次没有更新的关联标签
$ArticleTagModel->where('art_id','=',$BodyData['art_id'])->where('update_time','<',$time)->update(['flag'=>1,'update_time'=>$time]);
DB::connection($this->connection)->commit();
PushThesaurus($BodyData['art_id']);
return [0,$ErrInfo.'成功'];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment