Commit d810dc5c authored by wwccw0591's avatar wwccw0591

pc

parent a8a7f374
...@@ -66,8 +66,15 @@ class OrderGoodsModel extends \DAO\AbstractModel { ...@@ -66,8 +66,15 @@ class OrderGoodsModel extends \DAO\AbstractModel {
} }
public function getOrderGoodsCountByStoreId($storeId){ public function getOrderGoodsCountByStoreId($storeId){
$this->setDb($this->dbName); $this->setDb($this->dbName);
$orderDao=\DAO\Order\OrderModel::getInstance(DbNameConst::salveDBConnectName);
$where['store_id']=$storeId; $where['store_id']=$storeId;
$where['is_refund']=array('neq',ApiConst::refundSuccess); $where['is_refund']=array('neq',ApiConst::refundSuccess);
$whereOrder['store_id']=array('eq',$storeId);
$whereOrder['order_state']=array('in',ArrayConst::orderCloseAndCancel);
$orderIds=$orderDao->getFieldByWhere($whereOrder,'order_id');
if($orderIds){
$where['order_id']=array('notin',$orderIds);
}
if(is_array($where)){ if(is_array($where)){
$where=$this->db->getSqlWhereByArray($where); $where=$this->db->getSqlWhereByArray($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