Commit b5bb2af4 authored by zhz's avatar zhz

goods

parent d810dc5c
...@@ -237,7 +237,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel ...@@ -237,7 +237,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
$firstClassId = intval($param['firstClassId']); $firstClassId = intval($param['firstClassId']);
$secondClassId = intval($param['secondClassId']); $secondClassId = intval($param['secondClassId']);
$thirdClassId = intval($param['thirdClassId']); $thirdClassId = intval($param['thirdClassId']);
$keyword = trim($param['keyword']); $keyword = (string)trim($param['keyword']);
$minPrice = intval($param['minPrice']); $minPrice = intval($param['minPrice']);
$maxPrice = intval($param['maxPrice']); $maxPrice = intval($param['maxPrice']);
$goodsSort = intval($param['goodsSort']); $goodsSort = intval($param['goodsSort']);
...@@ -247,7 +247,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel ...@@ -247,7 +247,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
$secondClassId && $where[] = "gc_id_2 = {$secondClassId}"; $secondClassId && $where[] = "gc_id_2 = {$secondClassId}";
$thirdClassId && $where[] = "gc_id_3 = {$thirdClassId}"; $thirdClassId && $where[] = "gc_id_3 = {$thirdClassId}";
$storeThirdClassId && $where[] = "goods_class_t_id = {$storeThirdClassId}"; $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); list($_where,$order,$attrStr,$saleSort) = $this->getParam($attrValue,$minPrice,$maxPrice,$goodsSort);
$where = array_merge($where,$_where); $where = array_merge($where,$_where);
...@@ -803,7 +803,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel ...@@ -803,7 +803,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
$thirdClassId = (int)($param['thirdClassId']); $thirdClassId = (int)($param['thirdClassId']);
$storeThirdClassId = (int)($param['storeThirdClassId']); $storeThirdClassId = (int)($param['storeThirdClassId']);
$couponId = (int)$param['couponId']; $couponId = (int)$param['couponId'];
$keyword = trim($param['keyword']); $keyword = (string)trim($param['keyword']);
$couponDao = \DAO\Coupon\CouponModel::getInstance(); $couponDao = \DAO\Coupon\CouponModel::getInstance();
$couponId && $coupon = $couponDao->findById($couponId); $couponId && $coupon = $couponDao->findById($couponId);
...@@ -832,7 +832,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel ...@@ -832,7 +832,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
$productData = []; $productData = [];
$attributeRedis = \Redis\Db4\GoodsAttributeRedisModel::getInstance(); $attributeRedis = \Redis\Db4\GoodsAttributeRedisModel::getInstance();
$attrbuteDAO = \DAO\GoodsAttributeModel::getInstance(); $attrbuteDAO = \DAO\GoodsAttributeModel::getInstance();
if(!empty($keyword)){ if($keyword !== ''){
// if($where){ // if($where){
// $where = implode(' AND ',$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