Commit b41fd1ff authored by liuyuzhen's avatar liuyuzhen

Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into lyz

parents 798cc48c dc924a6d
...@@ -74,6 +74,7 @@ class EvaluationServiceModel extends \Business\AbstractModel { ...@@ -74,6 +74,7 @@ class EvaluationServiceModel extends \Business\AbstractModel {
//$images = $this->_upload($v['images']); //$images = $this->_upload($v['images']);
$images = $v['images']; $images = $v['images'];
if(!is_array($images)) $images = json_decode($images, true); if(!is_array($images)) $images = json_decode($images, true);
if(empty($images)) $images = null;
$images ? $data['goods'][$k]['haveImg'] = 1 : $data['goods'][$k]['haveImg'] = 0; $images ? $data['goods'][$k]['haveImg'] = 1 : $data['goods'][$k]['haveImg'] = 0;
if($data['goods'][$k]['haveImg'] == 1) { if($data['goods'][$k]['haveImg'] == 1) {
foreach ($images as &$image) { foreach ($images as &$image) {
......
...@@ -183,9 +183,9 @@ class GoodsCommonModel extends \DAO\AbstractModel { ...@@ -183,9 +183,9 @@ class GoodsCommonModel extends \DAO\AbstractModel {
public function getCount($where,$attrStr=''){ public function getCount($where,$attrStr=''){
$this->setDb($this->dbName); $this->setDb($this->dbName);
if($attrStr){ if($attrStr){
return $this->db->from($this->_tableName)->join('han_goods_attribute_value','han_goods_attribute_value.goods_commonid = han_goods_common.goods_commonid')->where($where)->where($attrStr)->fetchNum(); return $this->db->from($this->_tableName)->join('han_goods_attribute_value','han_goods_attribute_value.goods_commonid = han_goods_common.goods_commonid')->where($where)->where($attrStr)->where(array('goods_state'=>1,'goods_verify'=>1))->fetchNum();
} }
return $this->db->from($this->_tableName)->where($where)->fetchNum(); return $this->db->from($this->_tableName)->where(array('goods_state'=>1,'goods_verify'=>1))->where($where)->fetchNum();
} }
/** /**
* 获取分享信息 * 获取分享信息
......
File mode changed from 100755 to 100644
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