checkSharpGoods($goodsId); } /** * 验证商品是否允许删除 * @param $goodsId * @return bool */ public static function checkIsAllowDelete($goodsId) { $service = new static; if ($service->checkSharpGoods($goodsId)) return false; if ($service->checkBargainGoods($goodsId)) return false; return true; } /** * 验证商品是否参与了秒杀商品 * @param $goodsId * @return bool */ private function checkSharpGoods($goodsId) { return SharpGoodsModel::isExistGoodsId($goodsId); } /** * 验证商品是否参与了砍价商品 * @param $goodsId * @return bool */ private function checkBargainGoods($goodsId) { return BargainGoodsModel::isExistGoodsId($goodsId); } }