|
|
@@ -701,22 +701,23 @@ class ProductController extends BaseController
|
|
|
util::fail('没有找到花材');
|
|
|
}
|
|
|
$productName = $productInfo->name ?? '';
|
|
|
- if (isset($product['id']) == false) {
|
|
|
+
|
|
|
+ if (!isset($product['id'])) {
|
|
|
util::fail('没有花材');
|
|
|
}
|
|
|
- if (isset($product['price']) == false || is_numeric($product['price']) == false || $product['price'] < 0) {
|
|
|
+ if (!isset($product['price']) || !is_numeric($product['price']) || $product['price'] < 0) {
|
|
|
util::fail('请填写' . $productName . '的批发价');
|
|
|
}
|
|
|
$price = $product['price'];
|
|
|
- if (isset($product['skPrice']) == false || is_numeric($product['skPrice']) == false || $product['skPrice'] < 0) {
|
|
|
+ if (!isset($product['skPrice']) || !is_numeric($product['skPrice']) || $product['skPrice'] < 0) {
|
|
|
util::fail('请填写' . $productName . '的零售价');
|
|
|
}
|
|
|
$skPrice = $product['skPrice'];
|
|
|
- if (isset($product['hjPrice']) == false || is_numeric($product['hjPrice']) == false || $product['hjPrice'] < 0) {
|
|
|
+ if (!isset($product['hjPrice']) || !is_numeric($product['hjPrice']) || $product['hjPrice'] < 0) {
|
|
|
util::fail('请填写' . $productName . '的会员价');
|
|
|
}
|
|
|
$hjPrice = $product['hjPrice'] ?? 0;
|
|
|
- if (isset($productInfo->mainId) == false || $productInfo->mainId != $this->mainId) {
|
|
|
+ if (!isset($productInfo->mainId) || $productInfo->mainId != $this->mainId) {
|
|
|
util::fail('无法访问');
|
|
|
}
|
|
|
if ($hjPrice > $price) {
|