Commit f40ba069 authored by zhz's avatar zhz

goods

parent 5875548d
...@@ -182,12 +182,11 @@ class GoodsCommonServiceModel extends \Business\AbstractModel ...@@ -182,12 +182,11 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
}elseif ($type == 3){ }elseif ($type == 3){
if($attrStr || $activities){ if($attrStr || $activities){
$where[] = 'han_goods_common.goods_commonid in('.trim($ids,',').')'; $where[] = 'han_goods_common.goods_commonid in('.trim($ids,',').')';
$order[] = ['han_goods_common.goods_commonid','DESC'];
}else{ }else{
$where[] = 'goods_commonid in('.trim($ids,',').')'; $where[] = 'goods_commonid in('.trim($ids,',').')';
$order[] = ['goods_commonid','DESC'];
} }
} }
$order[] = ['goodsCommonid','DESC'];
$saleSort ? $ttl = \Our\ApiConst::oneHour : \Our\ApiConst::oneDaySecond; $saleSort ? $ttl = \Our\ApiConst::oneHour : \Our\ApiConst::oneDaySecond;
if($activities){ if($activities){
$activities = array_keys($activities); $activities = array_keys($activities);
...@@ -487,11 +486,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel ...@@ -487,11 +486,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
$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);
if($attrStr || $activities){ $order[] = ['goodsCommonId','DESC'];
$order[] = ['han_goods_common.goods_commonid','DESC'];
}else{
$order[] = ['goods_commonid','DESC'];
}
$commonDAO = \DAO\GoodsCommonModel::getInstance(); $commonDAO = \DAO\GoodsCommonModel::getInstance();
$saleSort ? $ttl = \Our\ApiConst::oneHour : \Our\ApiConst::oneDaySecond; $saleSort ? $ttl = \Our\ApiConst::oneHour : \Our\ApiConst::oneDaySecond;
if(!$activities){ if(!$activities){
......
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