Commit 3a93a200 authored by wwccw0591's avatar wwccw0591

pc

parent 34adc603
......@@ -31,9 +31,6 @@ class ShopkeeperController extends \Our\Controller_AbstractApi {
public function indexAction() {
$result = $this->shopkeeperService->getShopkeeper($this->memberId);
$this->success($result);
if($result){
$this->success(array(),\Our\DescribeConst::successMessage,\Our\DescribeConst::successMessage);
}
}
/**
......
......@@ -45,7 +45,6 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
public function getStatistics($memberId)
{
$storeId = $this->_getStoreByMemberId($memberId);
$storeStatisticsDayDao = \DAO\Store\StoreStatisticsDayModel::getInstance();
$storeStatisticsDao = \DAO\StoreStatisticsModel::getInstance();
$condition['store_id'] = $storeId;
......@@ -54,7 +53,8 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
//获取店铺数据统计
$storeStats = $storeStatisticsDao->find($condition);
//获取店铺今日销售额和订单量
$storeTodayStats = $storeStatisticsDayDao->getById($storeId);
$today=date('Y-m-d',TIMESTAMP);
$storeTodayStats = $storeStatisticsDayDao->getByStoreIdAndGmtCreate($storeId,$today);
$data['storeId'] = $store['store_id'];
$data['storeName'] = $store['store_name'];
$data['storeLabel'] = $store['store_label'];
......@@ -96,7 +96,7 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
public function getShopkeeper($memberId)
{
$data = $this->getStatistics($memberId);
$data['storeClassStats'] = $this->getSalaList($data['storeId']);
// $data['storeClassStats'] = $this->getSalaList($data['storeId']);
return $data;
}
......
......@@ -44,6 +44,12 @@ class StoreStatisticsDayModel extends \DAO\AbstractModel {
return $data;
}
public function getByStoreIdAndGmtCreate($storeId,$gmtCreate){
$where['store_id']=$storeId;
$where['gmt_create']=$gmtCreate;
$res=$this->find($where);
return $res;
}
public function getById($id){
$where['id']=$id;
......@@ -160,6 +166,7 @@ class StoreStatisticsDayModel extends \DAO\AbstractModel {
return self::$_instance;
}
/**
* 获取字段
* @return array
......
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