Commit 2e0c00bf authored by christ's avatar christ

order_sort

parent fdfd3958
...@@ -260,6 +260,24 @@ class OrderGoodsModel extends \DAO\AbstractModel { ...@@ -260,6 +260,24 @@ class OrderGoodsModel extends \DAO\AbstractModel {
$res=$this->db->from($this->_tableName)->select($this->sumGoodsNum)->where($where)->group("buyer_id")->group("store_id")->fetchAll(); $res=$this->db->from($this->_tableName)->select($this->sumGoodsNum)->where($where)->group("buyer_id")->group("store_id")->fetchAll();
return $res; return $res;
}
public function getMemberStoreOrderGoodsCountBak($storeIds,$memberIds){
$this->setDb($this->dbName);
$orderDao=\DAO\Order\OrderModel::getInstance(DbNameConst::salveDBConnectName);
$whereOrder['store_id']=array('in',$storeIds);
$whereOrder['buyer_id']=array('in',$memberIds);
$whereOrder['order_state']=array('in',ArrayConst::orderCloseAndCancel);
$orderIds=$orderDao->getFieldByWhere($whereOrder,'order_id');
$where['store_id']=array('in',$storeIds);
$where['buyer_id']=array('in',$memberIds);
$where['is_refund']=array('neq',ApiConst::refundSuccess);
if($orderIds){
$where['order_id']=array('notin',$orderIds);
}
$where=$this->db->getSqlWhereByArray($where);
$res=$this->db->from($this->_tableName)->select($this->sumGoodsNum)->where($where)->group("buyer_id")->group("store_id")->fetchAll();
return $res;
} }
public function convertRefundOrderGoods($orderGoods,$orderGoodsId){ public function convertRefundOrderGoods($orderGoods,$orderGoodsId){
$newOrderGoods=Array(); $newOrderGoods=Array();
......
...@@ -84,8 +84,21 @@ class cliOrderClose extends basecli ...@@ -84,8 +84,21 @@ class cliOrderClose extends basecli
$stores=$goodsCommonService->getGoodsCount($storesIds); $stores=$goodsCommonService->getGoodsCount($storesIds);
if(!empty($stores)){ if(!empty($stores)){
foreach($stores as $store){ foreach($stores as $store){
$addData=array('storeId'=>$store['storeId'],'type'=>\Our\ApiConst::messageGoodsAlert,'op'=>\Our\NameConst::set,'alertCount'=>$store['count'],'params'=>array()); $push=\Our\Push::getInstance();
$push->addOneToClient($addData); $pushData=array('storeId'=>$store['storeId'],
'type'=>\Our\ApiConst::messageGoodsAlert,
'waitReceiveCount'=>ApiConst::zero,
'waitDeliveryCount'=>0,
'waitGetCount'=>0,
'orderCount'=>ApiConst::zero,
'waitRefundProccessCount'=>ApiConst::zero,
'waitRefundReceiveCount'=>ApiConst::zero,
'refundCount'=>ApiConst::zero,
'alertCount'=>$store['count'],
'params'=>array('c'=>'shopkeeper',
'm'=>'orderDetail',
'orderId'=>$store['orderId']));
$push->addOneToClient($pushData);
} }
} }
......
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