feat: 修改了store_product_cate表中关于level的命名错误,由leve修改为level

This commit is contained in:
mkm 2024-06-11 17:35:39 +08:00
parent 3dd394f537
commit 75a335b3b6

View File

@ -195,13 +195,13 @@ class StoreProductLogic extends BaseLogic
}
}
public static function cate_update($cate_id = 0,$pid=0, $product_id = 0, $leve = 1)
public static function cate_update($cate_id = 0,$pid=0, $product_id = 0, $level = 1)
{
$find = Db::name('store_product_cate')->where(['store_id' => 1, 'cate_id' => $cate_id, 'leve' => $leve])->find();
$find = Db::name('store_product_cate')->where(['store_id' => 1, 'cate_id' => $cate_id, 'level' => $level])->find();
if ($find) {
Db::name('store_product_cate')->where('id', $find['id'])->inc('count', 1)->update();
} else {
Db::name('store_product_cate')->insert(['pid'=>$pid,'store_id' => 1, 'cate_id' => $cate_id, 'count' => 1, 'leve' => $leve, 'create_time' => time(), 'update_time' => time()]);
Db::name('store_product_cate')->insert(['pid'=>$pid,'store_id' => 1, 'cate_id' => $cate_id, 'count' => 1, 'level' => $level, 'create_time' => time(), 'update_time' => time()]);
}
}
/**