Commit aebd8775 authored by testshenbd's avatar testshenbd

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

parents 84aff275 965035ca
...@@ -1197,7 +1197,11 @@ class OrderServiceModel extends \Business\AbstractModel ...@@ -1197,7 +1197,11 @@ class OrderServiceModel extends \Business\AbstractModel
} }
public function updateGoodsStoregeByGoodsIds($storeId,$goodsid,$num=ApiConst::zero,$type=ApiConst::plus){ public function updateGoodsStoregeByGoodsIds($storeId,$goodsid,$num=ApiConst::zero,$type=ApiConst::plus){
$where['goods_id']=$goodsid; if(is_array($goodsid)){
$where['goods_id']=array('in',$goodsid);
}else{
$where['goods_id']=$goodsid;
}
$where['store_id']=$storeId; $where['store_id']=$storeId;
$goodsDao = \DAO\GoodsModel::getInstance(DbNameConst::masterDBConnectName); $goodsDao = \DAO\GoodsModel::getInstance(DbNameConst::masterDBConnectName);
$goodses=$goodsDao->getList($where,$goodsDao->goodsDetailField); $goodses=$goodsDao->getList($where,$goodsDao->goodsDetailField);
......
...@@ -74,8 +74,11 @@ class GoodsModel extends \DAO\AbstractModel { ...@@ -74,8 +74,11 @@ class GoodsModel extends \DAO\AbstractModel {
public function getList($where,$field){ public function getList($where,$field){
$this->setDb(); $this->setDb();
$res= $this->db->select($field)->from($this->_tableName)->where($where)->order('goods_storage','desc')->fetchAll(); if(is_array($where)){
return $res; $where=$this->db->getSqlWhereByArray($where);
}
$res= $this->db->select($field)->from($this->_tableName)->where($where)->order('goods_storage','desc')->fetchAll();
return $res;
} }
public function getListGroup($where,$field,$groupField){ public function getListGroup($where,$field,$groupField){
......
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