Commit b94c2001 authored by christ's avatar christ

order

parent ff5ccddd
......@@ -181,6 +181,10 @@ class NameConst {
const versionOne = '1.0.0';
const versionDefault = '1.0';
const bySeller='bySeller';
const bySelf='bySelf';
}
?>
\ No newline at end of file
......@@ -920,8 +920,8 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
$storeId = $memberDao->getInfo($memberId, 'store_id');
$orderDao = \DAO\Order\OrderModel::getInstance(DbNameConst::salveDBConnectName);
$waitReceiveCount = $orderDao->getCountByOrderState($storeId, ApiConst::orderStateWaitConfirm);
$waitDeliveryCount = $orderDao->getCountByShippingTypeAndOrderState($storeId, ApiConst::bySeller, array(ApiConst::orderStateWaitSend,ApiConst::orderStateWaitRecieve));
$waitGetCount = $orderDao->getCountByShippingTypeAndOrderState($storeId, ApiConst::bySelf, ApiConst::orderStateWaitRecieve);
$waitDeliveryCount = $orderDao->getCountByShippingTypeAndOrderState($storeId);
$waitGetCount = $orderDao->getCountByShippingTypeAndOrderState($storeId,NameConst::bySelf);
$orderCount=$waitReceiveCount+$waitDeliveryCount+$waitGetCount;
return array('waitReceiveCount' => $waitReceiveCount, 'waitDeliveryCount' => $waitDeliveryCount, 'waitGetCount' => $waitGetCount,'orderCount'=>$orderCount);
}
......
......@@ -1148,11 +1148,11 @@ class OrderModel extends \DAO\AbstractModel
$where['shipping_type']=ApiConst::bySelf;
$where['order_state']=ApiConst::orderStateWaitRecieve;
}
public function getCountByShippingTypeAndOrderState($storeId,$type='bySeller'){
if($type=='bySeller'){
public function getCountByShippingTypeAndOrderState($storeId,$type=NameConst::bySeller){
if($type==NameConst::bySeller){
$where=$this->getWaitDeliveryCondition($storeId);
}
if($type=='bySelf'){
if($type==NameConst::bySelf){
$where=$this->getByselfCondition($storeId);
}
$count=$this->getCountByWhere($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