Commit 8ceb068c authored by wwccw0591's avatar wwccw0591

pc

parent 55446b7b
...@@ -61,6 +61,7 @@ class ShopkeeperServiceModel extends \Business\AbstractModel ...@@ -61,6 +61,7 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
//获取店铺数据统计 //获取店铺数据统计
//$storeStats = $storeStatisticsDao->find($condition); //$storeStats = $storeStatisticsDao->find($condition);
//获取店铺今日销售额和订单量 //获取店铺今日销售额和订单量
$storeStats=$orderDao->getShopKeeperCountByStoreId($storeId);
$storeStats = $orderDao->getShopKeeperCountByStoreIdCache($storeId); $storeStats = $orderDao->getShopKeeperCountByStoreIdCache($storeId);
$storeFavariteCount=$favoritesStoreDao->getFavoritesCountByStoreIdCache($storeId); $storeFavariteCount=$favoritesStoreDao->getFavoritesCountByStoreIdCache($storeId);
$data['storeId'] = $store['store_id']; $data['storeId'] = $store['store_id'];
......
...@@ -386,7 +386,8 @@ class OrderModel extends \DAO\AbstractModel ...@@ -386,7 +386,8 @@ class OrderModel extends \DAO\AbstractModel
$where['store_id']=array('in',$storeIds); $where['store_id']=array('in',$storeIds);
$where['member_ids']=array('in',$memberIds); $where['member_ids']=array('in',$memberIds);
$where['order_state']=array('notin','-1,0'); $where['order_state']=array('notin','-1,0');
$res=$this->db->from($this->_tableName)->select(" buyer_id as buyerId,store_id as storeId,sum(order_amount) as orderTotal")->group('buyer_id')->group('store_id')->fetchAll(); $where=getSqlWhereByArray($where);
$res=$this->db->from($this->_tableName)->where($where)->select(" buyer_id as buyerId,store_id as storeId,(SUM(order_amount)-SUM(refund_amount)) AS orderTotal")->group('buyer_id')->group('store_id')->fetchAll();
return $res; return $res;
} }
......
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