Commit b5bb2af4 authored by zhz's avatar zhz

goods

parent d810dc5c
......@@ -237,7 +237,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
$firstClassId = intval($param['firstClassId']);
$secondClassId = intval($param['secondClassId']);
$thirdClassId = intval($param['thirdClassId']);
$keyword = trim($param['keyword']);
$keyword = (string)trim($param['keyword']);
$minPrice = intval($param['minPrice']);
$maxPrice = intval($param['maxPrice']);
$goodsSort = intval($param['goodsSort']);
......@@ -247,7 +247,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
$secondClassId && $where[] = "gc_id_2 = {$secondClassId}";
$thirdClassId && $where[] = "gc_id_3 = {$thirdClassId}";
$storeThirdClassId && $where[] = "goods_class_t_id = {$storeThirdClassId}";
$keyword && $where[] = "goods_name like '%{$keyword}%'";
$keyword !== '' && $where[] = "goods_name like '%{$keyword}%'";
list($_where,$order,$attrStr,$saleSort) = $this->getParam($attrValue,$minPrice,$maxPrice,$goodsSort);
$where = array_merge($where,$_where);
......@@ -803,7 +803,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
$thirdClassId = (int)($param['thirdClassId']);
$storeThirdClassId = (int)($param['storeThirdClassId']);
$couponId = (int)$param['couponId'];
$keyword = trim($param['keyword']);
$keyword = (string)trim($param['keyword']);
$couponDao = \DAO\Coupon\CouponModel::getInstance();
$couponId && $coupon = $couponDao->findById($couponId);
......@@ -832,7 +832,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
$productData = [];
$attributeRedis = \Redis\Db4\GoodsAttributeRedisModel::getInstance();
$attrbuteDAO = \DAO\GoodsAttributeModel::getInstance();
if(!empty($keyword)){
if($keyword !== ''){
// if($where){
// $where = implode(' AND ',$where);
// }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment