This commit is contained in:
aozhiwei 2023-08-07 17:38:54 +08:00
parent dc30280971
commit 07edf3f8e4

View File

@ -165,6 +165,18 @@ class MallController extends BaseAuthedController {
{
$goodsUuid = getReqVal('goods_uuid', '');
$price = getReqVal('price', '');
if (empty($price)) {
$this->_rspErr(1, 'price not found');
return;
}
if ($price <= 0) {
$this->_rspErr(1, 'price must > 0');
return;
}
if (!is_numeric($price)) {
$this->_rspErr(1, 'price must be number');
return;
}
$goodsDb = Mall::findByGoodsUuid($goodsUuid);
if (!$goodsDb) {
myself()->_rspErr(1, 'goods not found');