Commit b2ad9398 authored by liuyuzhen's avatar liuyuzhen

Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into lyz_version1

parents 87029685 c445bc63
......@@ -48,6 +48,9 @@ class IndexController extends \Our\Controller_Abstract {
if($paramsStr['type']==\Our\ApiConst::shareGoods){
$this->_view->display('index/goods.phtml');
}
if($paramsStr['type']==\Our\ApiConst::shareSaler){
$this->_view->display('index/saleShare.phtml');
}
exit;
}
......
......@@ -124,7 +124,7 @@ class OrderServiceModel extends \Business\AbstractModel
if($orderState==ApiConst::orderStateComplete){
$where['evaluation_state']=ApiConst::waitEvaluation;
$where['order_state']=array('eq',ApiConst::orderStateComplete);
}elseif($orderState==ApiConst::orderStateWaitRecieveOne){
}elseif($orderState==ApiConst::orderStateWaitRecieveOne || $orderState==ApiConst::orderStateWaitRecieve){
$where['shipping_type']=array('eq',ApiConst::bySeller);
$where['order_state'] =array('in',array(ApiConst::orderStateWaitSend,ApiConst::orderStateWaitRecieve));
}elseif($orderState==ApiConst::orderStateWaitSendOne){
......@@ -231,7 +231,6 @@ class OrderServiceModel extends \Business\AbstractModel
*/
public function getOrderDetail($orderId)
{
error_reporting(E_ALL);
$orderDao = \DAO\Order\OrderModel::getInstance(DbNameConst::salveDBConnectName);
$addressDao = \DAO\AddressModel::getInstance(DbNameConst::salveDBConnectName);
$orderCommonDao = \DAO\Order\OrderCommonModel::getInstance(DbNameConst::salveDBConnectName);
......@@ -909,6 +908,7 @@ class OrderServiceModel extends \Business\AbstractModel
$orderLogDao=\DAO\Order\OrderLogModel::getInstance(DbNameConst::masterDBConnectName);
$orderDetail=$orderDao->getByOrderId($orderId,$orderDao->getOrderDetailField());
$orderDetail=$orderDetail[ApiConst::arrBegin];
$storeDao=\DAO\StoreModel::getInstance();
if($orderDetail['storeId']!=$storeId){
ErrorModel::throwException(CodeConfigModel::orderNotExist);
}
......@@ -917,6 +917,8 @@ class OrderServiceModel extends \Business\AbstractModel
}
$data['order_amount']=$newOrderAmount;
$res=$orderDao->updateByOrderId($data,$orderId);
$orderDao->deleteOrderCache($orderDetail['memberId'], $orderId, $storeId, true);
$storeDao->deleteStoreCache($storeId,$orderId);
$orderLogDao->add($orderDetail['orderId'],ArrayConst::logMsgType[ApiConst::sellerUpdateOrderAmount],DescribeConst::sellerLog,$memberName,$orderDetail['orderState']);
return $res;
}
......
......@@ -119,10 +119,10 @@ class RefundServiceModel extends \Business\AbstractModel
$refund = $refundReturnDao->find($whereRefund);
$return_delay = $this->getMaxDay('return_delay');//发货默认5天后才能选择没收到
$delay_time = TIMESTAMP - $refund['delay_time'] - 60*60*24*$return_delay;
if (($refund['seller_state'] != '2' && $refund['platform_state'] != '1') || $refund['goods_state'] != '2') {//检查状态,防止页面刷新不及时造成数据错误
return false;
}
// if (($refund['seller_state'] != '2' && $refund['platform_state'] != '1') || $refund['goods_state'] != '2') {//检查状态,防止页面刷新不及时造成数据错误
// return false;
// }
error_reporting(E_ALL);
$refund_array = array();
if ($goodsState == '3' && $delay_time > 0) {
$refund_array['goods_state'] = 3;
......@@ -131,6 +131,7 @@ class RefundServiceModel extends \Business\AbstractModel
$refund_array['receive_message'] = '确认收货完成';
$refund_array['refund_state'] = '3';//状态:1为处理中,2为待管理员处理,3为已完成
$refund_array['goods_state'] = 4;
$refund_array['shipping_over']=1;
}
$refundReturnDao->db->doTransaction();
$state = $refundReturnDao->editRefundReturn($whereRefund, $refund_array);
......@@ -181,7 +182,9 @@ class RefundServiceModel extends \Business\AbstractModel
\Our\RedisHelper::delCachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$refundReturnDao, 'getList'), array(), array($refund['store_id']));
$refundReturnDao->deleteRefundCache($refund['buyer_id'], $refund['refund_id']);
$orderDao->deleteOrderCache($refund['buyer_id'], $refund['order_id'], $refund['store_id']);
$storeDAO->deleteStoreRefundCache($refund['store_id'],$refund['order_id']);
$refundReturnDao->db->doCommit();
return true;
}
$refundReturnDao->db->doRollback();
......@@ -412,25 +415,30 @@ class RefundServiceModel extends \Business\AbstractModel
// $where['store_id'] = $storeId;
// $where['order_lock'] = 2;
$order = array('add_time' => 'desc');
if($type==ApiConst::refundSellerVerify){
$where=$refundReturnDao->getProccessOrderBySeller($storeId);
}
if($type==ApiConst::refundSellerAgree){
$where=$refundReturnDao->getReturnWaitReceive($storeId);
$order= array('receive_time'=> 'asc');
if($type==ApiConst::zero){
$where['store_id'] = $storeId;
}else{
if($type==ApiConst::refundSellerVerify){
$where=$refundReturnDao->getProccessOrderBySeller($storeId);
}
if($type==ApiConst::refundSellerAgree){
$where=$refundReturnDao->getReturnWaitReceive($storeId);
$order= array('receive_time'=> 'asc');
}
}
//获得售后列表
$refundReturns = \Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$refundReturnDao, 'getList'), array($where, $this->storeRefundReturnField, $pageIndex, $pageSize,$order), \Our\ApiConst::oneDaySecond, array($storeId));
$refundReturns = \Our\RedisHelper::cachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$refundReturnDao, 'getList'), array($where, $this->storeRefundReturnField, $pageIndex, $pageSize,$order), \Our\ApiConst::oneDaySecond, array($storeId));
$orderGoodsId = array_column($refundReturns['list'], 'orderGoodsId');
//获得售后商品列表getOrderGoodsByRecIds
if (!empty($orderGoodsId)) {
$orderGoods = \Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$orderGoodsDao, 'getOrderGoodsByRecIds'), array($orderGoodsId, $this->refundOrderGoodsField), \Our\ApiConst::oneDaySecond, array($storeId));
$orderGoods = \Our\RedisHelper::cachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$orderGoodsDao, 'getOrderGoodsByRecIds'), array($orderGoodsId, $this->refundOrderGoodsField), \Our\ApiConst::oneDaySecond, array($storeId));
$refundMerge = Common::intergrateOneToOne($refundReturns['list'], $orderGoods, 'orderGoodsId', 'recId');
$orderIds= array_column($refundMerge, 'orderId');
$orderWhere['order_id']=array('in',$orderIds);
$orders = \Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$orderDao, 'getList'), array($orderWhere, $orderDao->getOrderDetailField(), ApiConst::zero, $pageSize), \Our\ApiConst::oneDaySecond, array($storeId));
$orders = \Our\RedisHelper::cachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$orderDao, 'getList'), array($orderWhere, $orderDao->getOrderDetailField(), ApiConst::zero, $pageSize), \Our\ApiConst::oneDaySecond, array($storeId));
$orders=$orderDao->convertOrder($orders['list'],'orderId');
$orderCommons = $orderCommonDao->getAllByOrderIds($orderIds, $orderCommonDao->orderCommonField);
$orderCommons=$orderDao->convertOrder($orderCommons,'orderId');
......@@ -759,10 +767,11 @@ class RefundServiceModel extends \Business\AbstractModel
$refundReasonDao = \DAO\Order\RefundReasonModel::getInstance(DbNameConst::masterDBConnectName);
$orderDao = \DAO\Order\OrderModel::getInstance(DbNameConst::masterDBConnectName);
$orderInfo = $orderDao->findByMemberIdAndOrderId($memberId, $refund['orderId'], $this->orderField);
$storeDao=\DAO\StoreModel::getInstance();
$whereRefund['goods_id']=$refund['goodsId'];
$whereRefund['buyer_id']=$memberId;
$whereRefund['order_id']=$orderInfo['orderId'];
$refundOne=$refundReturnDao->find($whereRefund);
$refundOne=$refundReturnDao->find($whereRefund,$refundReturnDao->refundDetailField);
if(!empty($refundOne)){
ErrorModel::throwException(CodeConfigModel::alreadyExsitRefundGoods);
}
......@@ -832,10 +841,13 @@ class RefundServiceModel extends \Business\AbstractModel
$refundArrayUnLine=Common::convertUnderline($refundArray);
$state = $refundReturnDao->addRefundReturn($refundArray,$orderInfo,$orderGoods);
$orderDao->deleteOrderCache($memberId,$orderInfo['orderId'],$orderInfo['storeId'],true);
$refundReturnDao->deleteRefundCache($memberId);
if ($state) {
$refundStateName=$refundReturnDao->getRefundTextStatus($refundArrayUnLine);
$orderGoodsDao->update(array('rec_id'=>$orderGoods['recId']),array('refund_state_name'=>$refundStateName,'refund_id'=>$state));
$refundReturnDao->deleteRefundCache($memberId);
$storeDao->deleteStoreRefundCache($refundOne['storeId']);
$orderLogDao->addRefundOrderLog($orderInfo['orderId'],$refundArray['refund_type'],DescribeConst::buyer,$orderInfo['buyerName'],$orderInfo['orderState']);
$push=\Our\Push::getInstance();
$pushData=array('storeId'=>$orderInfo['storeId'],
......@@ -853,6 +865,7 @@ class RefundServiceModel extends \Business\AbstractModel
'orderId'=>$orderInfo['orderId']));
$push->addOneToClient($pushData);
$push->sendTcpMessage();
//\Our\RedisHelper::rpush('client_push',array('storeId'=>$refund['storeId'],'type'=>ApiConst::messageRefundProccessing,'op'=>NameConst::reduce,'num'=>ApiConst::one,'params'=>array('c'=>'shopkeeper','m'=>'getRefundDetail','refundId'=>$refund['refundId'])));
if ($orderInfo['orderState'] == ApiConst::orderStateWaitRecieve) {
$orderDao->editOrderLock($orderInfo['orderId']);
......@@ -877,8 +890,8 @@ class RefundServiceModel extends \Business\AbstractModel
if (empty($refundReturn)) {
ErrorModel::throwException(CodeConfigModel::notExistRefund);
}
$orderGoods = \Our\RedisHelper::cachedFunction(\Redis\Db5\RefundReasonRedisModel::getInstance(), array(&$orderGoodsDao, 'findByRecId'), array($refundReturn['orderGoodsId'], $this->getGoodsDetailField()), \Our\ApiConst::oneDaySecond);
$this->orderCommon = \Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$orderCommonDao, 'findByOrderId'), array($refundReturn['orderId'], $orderCommonDao->orderCommonField), \Our\ApiConst::oneDaySecond);
$orderGoods = \Our\RedisHelper::cachedFunction(\Redis\Db5\RefundReasonRedisModel::getInstance(), array(&$orderGoodsDao, 'findByRecId'), array($refundReturn['orderGoodsId'], $this->getGoodsDetailField()), \Our\ApiConst::oneDaySecond,array($refundReturn['orderId']));
$this->orderCommon = \Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$orderCommonDao, 'findByOrderId'), array($refundReturn['orderId'], $orderCommonDao->orderCommonField), \Our\ApiConst::oneDaySecond,array($refundReturn['orderId']));
// $this->store=$storeDao->get($refundReturn['storeId']);
// $this->store=Common::convertUnderline($this->store[0]);
$order = \Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$orderDao, 'findByOrderId'), array($refundReturn['orderId'],$orderDao->getOrderDetailField()), \Our\ApiConst::oneDaySecond, array($refundReturn['orderId']));
......
......@@ -60,6 +60,7 @@ class DeliveryServiceModel extends \Business\AbstractModel
$orderDao->db->doRollback();
ErrorModel::throwException(CodeConfigModel::selectDeliveryFail);
}
$orderDao->deleteOrderCache(null, $data['orderId'], $data['storeId'], true);
$orderDao->db->doCommit();
return $res;
}
......
......@@ -239,6 +239,7 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
$where['store_id'] = $storeId;
$where['order_state'] = ApiConst::orderStateWaitConfirm;
$orderDao = \DAO\Order\OrderModel::getInstance(DbNameConst::masterDBConnectName);
$storeDao=\DAO\StoreModel::getInstance();
$order = $orderDao->find($where);
if (empty($order)) {
if (empty($storeId)) {
......@@ -272,6 +273,7 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
// \Our\RedisHelper::rpush('client_push',array('storeId'=>$order['storeId'],'type'=>ApiConst::messageWaitReceive,'op'=>NameConst::reduce,'num'=>ApiConst::one,'params'=>array('c'=>'shopkeeper','m'=>'orderDetail','orderId'=>$order['orderId'])));
//\Our\RedisHelper::rpush('client_push',array('storeId'=>$order['storeId'],'type'=>$type,'op'=>NameConst::add,'num'=>ApiConst::one,'params'=>array('c'=>'shopkeeper','m'=>'orderDetail','orderId'=>$order['orderId'])));
$orderDao->deleteOrderCache($order['buyer_id'], $orderId, $order['store_id'], true);
$storeDao->deleteStoreCache($order['store_id'],$orderId);
// \Our\RedisHelper::memberTotalFromStateToState($order['buyer_id'], $order['order_state'], ApiConst::orderStateWaitSend);
return $result;
}
......@@ -293,6 +295,7 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
public function getRetrunDatas($storeId, $where, $pageIndex, $pageSize,$order = array('gmt_update' => 'desc'))
{
$orderGoodsDao = \DAO\Order\OrderGoodsModel::getInstance();
$qmDeliveryManLogDao =\DAO\Order\QmDeliverymanLogModel::getInstance();
$orderDao = \DAO\Order\OrderModel::getInstance();
$goodsDao = \DAO\GoodsModel::getInstance();
$orderCommonDao = \DAO\Order\OrderCommonModel::getInstance();
......@@ -304,8 +307,12 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
$orderGoods = \Our\RedisHelper::cachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$orderGoodsDao, 'getOrderGoodsByOrderIds'), array($orderIds, $orderGoodsDao->orderGoodsField), \Our\ApiConst::oneDaySecond, array($storeId));
//$orderGoods = $orderGoodsDao->getOrderGoodsByOrderIds($orderIds, $orderGoodsDao->orderGoodsField);
$orderCommons=\Our\RedisHelper::cachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$orderCommonDao, 'getAllByOrderIds'), array($orderIds, $orderCommonDao->orderCommonField), \Our\ApiConst::oneDaySecond, array($storeId));
$qmDeliveryManLogWhere['order_id']=array('in',$orderIds);
$qmDeliveryManLogWhere['order_type']= ApiConst::orderTypeBuy;
$qmDeliveryManLogs=\Our\RedisHelper::cachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$qmDeliveryManLogDao, 'getList'), array($qmDeliveryManLogWhere, $qmDeliveryManLogDao->fieldDetail,ApiConst::zero,$pageSize), \Our\ApiConst::oneDaySecond, array($storeId));
//$orderCommons = $orderCommonDao->getAllByOrderIds($orderIds, $orderCommonDao->orderCommonField);
$ordersOrderCommons = Common::intergrateOneToOne($orders, $orderCommons, 'orderId', 'orderId');
$ordersOrderCommons = Common::intergrateOneToOne($orders, $qmDeliveryManLogs['list'], 'orderId', 'orderId');
$ordersOrderCommons=Common::intergrateOneToOne($ordersOrderCommons, $orderCommons, 'orderId', 'orderId');
$orderMerge = \Our\Common::intergrateOneToMany($ordersOrderCommons, $orderGoods, 'orderId', 'orderId', 'orderGoods');
foreach ($orderMerge as &$value) {
$value['orderStateName'] = $orderDao->getStatusText($value);
......@@ -334,12 +341,14 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
$diliverymanDao = DiliverymanModel::getInstance();
$res = \Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$diliverymanDao, 'findById'), array($value['diliverymanId']), \Our\ApiConst::oneDaySecond, array($value['diliverymanId']));
$value['deliveryman'] = $diliverymanDao->convert($res);
$value['deliveryman']['distributionFee']=$value['distributionFee'];
}
} else {
unset($value['reciverInfo']);
}
unset($value['couponId']);
unset($value['refundAmount']);
unset($value['distributionFee']);
unset($value['paymentTime']);
unset($value['finnshedTime']);
unset($value['paymentCode']);
......@@ -462,10 +471,10 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
$where['order_id']=$orderId;
$where['store_id']=$storeId;
$count=$orderDao->getCountByWhere($where);
$orderDao->deleteOrderCache($memberId,$orderId,$storeId);
if($count){
$data['is_receive_payment']=TIMESTAMP;
$updateId=$orderDao->updateByOrderId($data,$orderId);
$orderDao->deleteOrderCache($memberId,false,$storeId);
return $updateId;
}else{
ErrorModel::throwException(CodeConfigModel::notExsitOrder);
......@@ -485,6 +494,8 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
$diliverymanDao = \DAO\Order\DiliverymanModel::getInstance(DbNameConst::salveDBConnectName);
$storeDao = \DAO\StoreModel::getInstance(DbNameConst::salveDBConnectName);
$goodsDao = \DAO\GoodsModel::getInstance(DbNameConst::salveDBConnectName);
$qmDeliveryManLogDao=\DAO\Order\QmDeliverymanLogModel::getInstance();
//订单
$order = \Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$orderDao, 'findByOrderId'), array($orderId), \Our\ApiConst::oneDaySecond, array($orderId));
if ($order['store_id'] != $storeId) {
......@@ -495,7 +506,11 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
//收货人地址
//收货人信息
$this->orderCommon = \Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$orderCommonDao, 'findByOrderId'), array($orderId, $orderCommonDao->orderCommonField), \Our\ApiConst::oneDaySecond);
$this->orderCommon = \Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$orderCommonDao, 'findByOrderId'), array($orderId, $orderCommonDao->orderCommonField), \Our\ApiConst::oneDaySecond, array($orderId));
$qmDeliveryManLogWhere['order_id']=$orderId;
$qmDeliveryManLogWhere['order_type']=ApiConst::orderTypeBuy;
$qmDeliveryManLog=\Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$qmDeliveryManLogDao, 'find'), array($qmDeliveryManLogWhere,$qmDeliveryManLogDao->fieldDetail), \Our\ApiConst::oneDaySecond, array($orderId));
//$this->orderCommon = $orderCommonDao->findByOrderId($orderId, $this->orderCommonField);
$reciverInfo = $this->orderCommon['reciverInfo'];
$reciverInfo = unserialize($reciverInfo);
......@@ -531,6 +546,7 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
}
if ($returnData['diliverymanId']) {
$returnData['deliveryman'] = $diliverymanDao->convert($this->diliveryman, $diliverymanDao->getDeliveryManFields());
$returnData['deliveryman']['distributionFee']=$qmDeliveryManLog['distributionFee'];
} else {
$returnData['diliverymanId'] = ApiConst::zero;
$returnData['deliveryman'] = new \stdClass();
......
......@@ -36,9 +36,17 @@ class ShareServiceModel extends \Business\AbstractModel
$data['driverType'] = $driverType;
$data['qrCode']=$this->growQrcode($data);
if($data['type']==ApiConst::shareStore || $data['type']== ApiConst::shareSaler){
$storeDao=\DAO\StoreModel::getInstance(DbNameConst::salveDBConnectName);
$data['address']=$storeDao->getAddress($data['id']);
if(!empty($data['id'])){
$storeDao=\DAO\StoreModel::getInstance(DbNameConst::salveDBConnectName);
$store=$storeDao->getStoreInfoCache($data['id']);
$data['address']=$store['store_address'];
$data['imgUrl']=$storeDao->getStoreLabelSrc($store['store_label']);
$data['storeName']=$store['store_name'];
$data['desc']=$store['store_notice'];
}
}
// $data['qrCode']=\Our\RedisHelper::cachedFunction(\Redis\Db0\MemberRedisModel::getInstance(), array(&$this, 'growQrcode'), array($data));
return $data;
......
......@@ -855,7 +855,9 @@ class OrderModel extends \DAO\AbstractModel
}
public function deleteStoreOrderListCacheByStoreId($storeId){
return \Our\RedisHelper::delCachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$this, 'getList'), array(), array($storeId));
if(!empty($storeId)){
\Our\RedisHelper::delCachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$this, 'getList'), array(), array($storeId));
}
}
//删除订单缓存
public function deleteOrderCache($memberId, $orderId = false, $stroeId = false, $deleteGetShopKeeperCountByStoreId = false, $deleteGetFavoritesCountByStoreId = false,$diliverymanId=ApiConst::zero)
......
......@@ -52,7 +52,7 @@ class OrderLogModel extends \DAO\AbstractModel
$data['log_user']=$logUser;
$data['log_orderstate']=$logOrderState;
$data['log_time']=TIMESTAMP;
return $this->addLogToMongo($data);
return $this->addLog($data);
}
public function addLog($log){
$this->setDb($this->dbName);
......
......@@ -19,6 +19,7 @@ class QmDeliverymanLogModel extends \DAO\AbstractModel
public $fieldList = 'id,finish_time finishTime,get_time as getTime,order_id as orderId,distribution_fee as distributionFee';
public $fieldDetail = 'id,finish_time finishTime,get_time as getTime,order_id as orderId,delivery_state as deliveryState,order_type as orderType,distribution_fee as distributionFee';
/**
* 表名
*
......@@ -88,6 +89,8 @@ class QmDeliverymanLogModel extends \DAO\AbstractModel
return $list ? $list : array();
}
/**
* 更具状态获得配送订单列表
* @param $where
......
......@@ -553,6 +553,8 @@ class RefundReturnModel extends \DAO\AbstractModel {
return self::$_instance;
}
/**
* @param $storeId
* @param $orderState
......
......@@ -231,6 +231,34 @@ class StoreModel extends \DAO\AbstractModel
return $result;
}
public function deleteStoreRefundCache($storeId,$orderId=ApiConst::zero){
if(!empty($storeId)){
$refundReturnDao = \DAO\Order\RefundReturnModel::getInstance(DbNameConst::salveDBConnectName);
$orderGoodsDao = \DAO\Order\OrderGoodsModel::getInstance(DbNameConst::salveDBConnectName);
$orderDao=\DAO\Order\OrderModel::getInstance(DbNameConst::salveDBConnectName);
\Our\RedisHelper::delCachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$refundReturnDao, 'getList'), array(), array($storeId));
\Our\RedisHelper::delCachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$orderGoodsDao, 'getOrderGoodsByRecIds'), array(), array($storeId));
\Our\RedisHelper::delCachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$orderDao, 'getList'), array(), array($storeId));
}
if(!empty($orderId)){
$orderCommonDao = \DAO\Order\OrderCommonModel::getInstance(DbNameConst::salveDBConnectName);
\Our\RedisHelper::delCachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$orderGoodsDao, 'findByRecId'), array(), array($orderId));
\Our\RedisHelper::delCachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$orderCommonDao, 'findByOrderId'), array(), array($orderId));
\Our\RedisHelper::delCachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$orderDao, 'findByOrderId'), array(), array($orderId));
}
}
public function deleteStoreCache($storeId,$orderId){
if(!empty($storeId)){
\Our\RedisHelper::delCachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$this, 'getList'), array(), array($storeId));
}
if(!empty($orderId)){
$orderDao=\DAO\Order\OrderModel::getInstance(DbNameConst::salveDBConnectName);
\Our\RedisHelper::delCachedFunction(\Redis\Db6\StoreRedisModel::getInstance(), array(&$orderDao, 'findByOrderId'), array(), array($orderId));
}
}
public function getStoresByCityCode($cityCode, $field = 'store_id,store_longitude,store_latitude,max_sign_rang,max_sales_rang,store_sales_scope')
{
$storeClassCondition = " store_citycode = '" . $cityCode . "' ";
......
......@@ -29,11 +29,13 @@ class DeliveryController extends \Our\Controller_AbstractClient {
*/
public function selectDeliveryAction(){
$deliveryService=\Business\Store\DeliveryServiceModel::getInstance();
$orderDao=\DAO\Order\OrderModel::getInstance();
$data=$this->req['data'];
$data['storeId']=$this->storeId;
unset($data['key']);
$result =$deliveryService->selectDeliveryMan($data);
if($result!==false){
$this->success($result,\Our\DescribeConst::successMessage,\Our\DescribeConst::successMessage);
}
ErrorModel::throwException(CodeConfigModel::commonError);
......
<!DOCTYPE html>
<html lang="en">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no">
<title></title>
<style type="text/css">
html,body,p,span,div,img{margin:0;padding:0;}body{width:750px;}
.shareC { width:750px; padding:0; text-align:center;font-family:"黑体";color:#212121;}
.header{background:url(/data/img/headerBg.png);padding-top:100px; height:415px; }
.bgBD{width:162px; height:162px;background-color:white;border-radius:50%;-moz-border-radius:50%;-webkit-border-radius:50%;margin:0 auto;}
#headerBg{width:160px; height:160px;border-radius:50%;-moz-border-radius:50%;-webkit-border-radius:50%;margin:1px;}
#title{font-size:34px; margin-top:24px;}
.address{ font-size:28px; line-height:36px; padding:50px 110px 0 110px; height:108px;display:block; display:-webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;overflow:hidden;text-overflow:ellipsis;}
.noticePart{ width:560px;margin:16px auto 0 auto; background:url(/data/img/noticeBg.png);}
.noticePart p{height:44px; font-size:20px; line-height:22px; padding:68px 28px 32px 28px; }
#notice{ max-width:504px;display:block; display:-webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;overflow:hidden;text-overflow:ellipsis;}
.qrcode{background:url(/data/img/flower.png); margin:6px auto 0 auto;}
#qrImg {height:488px;}
#qrcodeImg img { margin: 0 auto;}
.footer{ font-size:30px; height:66px; line-height:66px; padding:0 0 55px 0;}
.footer img{vertical-align:bottom; display:inline-block;}
</style>
</head>
<body>
<div class="shareC">
<div class="header">
<div class="bgBD">
<img src="" id="headerBg" />
</div>
<p id="title"></p>
<p class="address">地址:<span id="address"></span></p>
</div>
<div class="noticePart">
<p>
<span id="notice"></span>
</p>
</div>
<div class="qrcode" id="qrcode">
<img id="qrImg" src="" />
<div id="qrcodeImg"></div>
<p id="tip"></p>
</div>
<div class="footer">
<img src="/data/img/logo.png" /> 我的身边店
</div>
</div>
<script type="text/javascript" src="/data/js/qrcode.min.js"></script>
<script type="text/javascript">
var pageObj = {
type : "<?php echo $params['shareType'];?>",//1或2是小程序码,其它是二维码
id : "<?php echo $params['id'];?>",//1是小程序码,2是二维码,
headerBg : "<?php echo $params['imgUrl'];?>",
url : "<?php echo $params['qrCode'];?>",
qrImg : "<?php echo $params['qrCode'];?>",
title : "<?php echo $params['storeName'];?>",
address : "<?php echo $params['address'];?>",
notice : "<?php echo $params['desc'];?>"
};
if(pageObj.notice==null || pageObj.notice=="")
pageObj.notice="暂无公告";
var excute = ["title","address","notice"];
excute.forEach(function(v,i){
document.getElementById(v).innerHTML = pageObj[v];
});
document.getElementById("headerBg").src = pageObj.headerBg;
document.getElementById("qrImg").src = pageObj.qrImg+"?x-oss-process=image/resize,m_fill,h_186,w_186";
// new QRCode(document.getElementById('qrcodeImg'), pageObj.url);
// if(pageObj.type<=2){
// document.getElementById("qrImg").src = pageObj.qrImg;}
// else{
// new QRCode(document.getElementById('qrcodeImg'), pageObj.url);
// }
</script>
</body>
</html>
\ No newline at end of file
......@@ -12,7 +12,8 @@ config.url.resourcesHost = "http://api.shenbd.com"
config.url.userHost = ""
;
; ; oss 域名
config.url.ossHost = "https://qmoss-01.oss-cn-hangzhou.aliyuncs.com"
config.url.ossHost = "https://img.shenbd.com"
;config.url.ossHost = "https://qmoss-01.oss-cn-hangzhou.aliyuncs.com"
;
; ;推送域名
config.url.pushHost="172.16.142.15:9503";
......@@ -36,8 +37,8 @@ config.url.resourcesHost = "http://api.shenbd.com"
; 用户中心host
config.url.userHost = ""
; oss 域名
config.url.ossHost = "https://qmoss-01.oss-cn-hangzhou.aliyuncs.com"
config.url.ossHost = "https://img.shenbd.com"
//config.url.ossHost = "https://qmoss-01.oss-cn-hangzhou.aliyuncs.com"
;推送域名
config.url.pushHost="127.0.0.1:9503";
......@@ -54,9 +55,9 @@ config.url.convert=/usr/local/bin/wkhtmltoimage
config.url.resourcesHost = "http://apitest.shenbd.com"
; 用户中心host
config.url.userHost = ""
config.url.ossHost = "https://img.shenbd.com"
; oss 域名
config.url.ossHost = "https://qmoss-01.oss-cn-hangzhou.aliyuncs.com"
;config.url.ossHost = "https://qmoss-01.oss-cn-hangzhou.aliyuncs.com"
;推送域名
config.url.pushHost="127.0.0.1:9503";
......@@ -74,9 +75,9 @@ config.url.source="/www/web/testadmin_shenbd_com/public_html/data/upload/"
config.url.resourcesHost = "http://apitest.qm.com"
; 用户中心host
config.url.userHost = ""
config.url.ossHost = "https://img.shenbd.com"
; oss 域名
config.url.ossHost = "http://qmoss-01.oss-cn-hangzhou.aliyuncs.com"
;config.url.ossHost = "http://qmoss-01.oss-cn-hangzhou.aliyuncs.com"
;推送域名
config.url.pushHost="127.0.0.1:9503";
......@@ -124,7 +125,7 @@ config.url.userHost = ""
config.url.ossHost = "http://qmoss-01.oss-cn-hangzhou.aliyuncs.com"
;推送域名
config.url.pushHost="127.0.0.1:9503";
config.url.pushHost="192.168.1.201:9503";
config.url.convert="/usr/local/bin/wkhtmltoimage";
......
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