作者 anyv
1 个管道 的构建 通过 耗费 0 秒

44

... ... @@ -155,6 +155,8 @@ class GoodsController extends AdminBaseController{
$data['id'] = $id;
$data['is_out'] = 0;
$res = Db::name('Goods') -> update($data);
Db::name('collect') -> where('goods_id',$id) -> delete();
Db::name('browsing_history') -> where('goods_id',$id) -> delete();
if($res){
return true;
}else{
... ... @@ -189,6 +191,7 @@ class GoodsController extends AdminBaseController{
$data = Db::name('goods') -> delete($id);
Db::name('goods_label') -> where('goods_id',$id) -> delete();
Db::name('collect') -> where("goods_id = ".$id) -> delete();
Db::name('browsing_history') -> where("goods_id = ".$id) -> delete();
if($data){
return true;
}else{
... ...