Commit 0f08c597 authored by christ's avatar christ

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

parents f1439d38 c72352ff
......@@ -186,6 +186,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
$where[] = 'goods_commonid in('.trim($ids,',').')';
}
}
$order[] = ['goodsCommonid','DESC'];
$saleSort ? $ttl = \Our\ApiConst::oneHour : \Our\ApiConst::oneDaySecond;
if($activities){
$activities = array_keys($activities);
......@@ -316,7 +317,6 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
$order[] = ['eval_score','DESC'];
break;
}
$order[] = ['goods_commonid','DESC'];
return array($where,$order,$attrStr,$saleSort);
}
......@@ -486,7 +486,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
$keyword !== '' && $where[] = "goods_name like '%{$keyword}%'";
list($_where,$order,$attrStr,$saleSort) = $this->getParam($attrValue,$minPrice,$maxPrice,$goodsSort);
$where = array_merge($where,$_where);
$order[] = ['goodsCommonId','DESC'];
$commonDAO = \DAO\GoodsCommonModel::getInstance();
$saleSort ? $ttl = \Our\ApiConst::oneHour : \Our\ApiConst::oneDaySecond;
if(!$activities){
......
......@@ -445,7 +445,7 @@ class MessageServiceModel extends \Business\AbstractModel
}
}
public function addMessageCenterToDb()
public function addMessageCenterToDb($pushPushCenter=true)
{
$conf = \Yaf\Registry::get('config')->get('redis.database.params');
$this->baseRedis = new \Redis();
......@@ -454,7 +454,9 @@ class MessageServiceModel extends \Business\AbstractModel
$this->baseRedis->auth($conf['password']);
}
while ($center = $this->baseRedis->lPop('message_center')) {
$this->baseRedis->rPush('push_center', $center);
if($pushPushCenter){
$this->baseRedis->rPush('push_center', $center);
}
$addData = unserialize($center);
$addData['message'] = unserialize($addData['message']);
$this->addMessage($addData['fromId'], $addData['fromUserId'], $addData['fromUserName'], $addData['fromType'], $addData['message'], $addData['toId'], $addData['toUserId'], $addData['toUserName'], $addData['toType'], $addData['id']);
......
......@@ -36,7 +36,7 @@ class RefundServiceModel extends \Business\AbstractModel
//获得退款详情字段
private $refundReturnField = 'refund_id as refundId,order_id as orderId,order_sn as orderSn,refund_sn as refundSn,store_id as storeId,store_name as storeName,seller_state as sellerState,goods_id as goodsId,order_goods_id as orderGoodsId,goods_name as goodsName,goods_num as goodsNum,refund_amount as refundAmount,goods_image as goodsImage,refund_type as refundType,refund_state as refundState,return_type as returnType,add_time as addTime,seller_time as sellerTime,admin_time as adminTime,reason_info as reasonInfo,pic_info as picInfo,buyer_message as buyerMessage,seller_message as sellerMessage,admin_message adminMessage,express_id as expressId,invoice_no as invoiceNo,ship_time as shipTime,delay_time as delayTime,receive_time as receiveTime,shipping_over as shippingOver,shipping_sign as shippingSign,shipping_html as shippingHtml,is_suc_refund as isSucRefund,refund_shipping_type as refundShippingType,address_id as addressId,diliveryman_id as diliverymanId,is_platform_in as isPlatformIn,platform_in_reason as platformInReason,platform_state as platformState,seller_state as sellerState,return_type as returnType,refund_shipping_type as refundShippingType,buyer_refund_amount as buyerRefundAmount,reason_id as reasonId,receive_message as receiveMessage,goods_state as goodsState';
private $storeRefundReturnField = 'refund_id as refundId,order_id as orderId,order_sn as orderSn,refund_sn as refundSn,store_id as storeId,store_name as storeName,seller_state as sellerState,goods_id as goodsId,order_goods_id as orderGoodsId,goods_name as goodsName,goods_num as goodsNum,refund_amount as refundAmount,buyer_refund_amount as buyerRefundAmount,goods_image as goodsImage,refund_type as refundType,refund_state as refundState,return_type as returnType,add_time as addTime,seller_time as sellerTime,admin_time as adminTime,reason_id as reasonId,reason_info as reasonInfo,pic_info as picInfo,buyer_message as buyerMessage,seller_message as sellerMessage,admin_message adminMessage,express_id as expressId,invoice_no as invoiceNo,ship_time as shipTime,delay_time as delayTime,receive_time as receiveTime,receive_message as receiveMessage,shipping_over as shippingOver,shipping_sign as shippingSign,shipping_html as shippingHtml,is_suc_refund as isSucRefund,refund_shipping_type as refundShippingType,address_id as addressId,diliveryman_id as diliverymanId,is_platform_in as isPlatformIn,platform_in_reason as platformInReason,platform_state as platformState,return_type as returnType,refund_shipping_type as refundShippingType,goods_state as goodsState';
private $storeRefundReturnField = 'refund_id as refundId,order_id as orderId,order_sn as orderSn,refund_sn as refundSn,store_id as storeId,store_name as storeName,seller_state as sellerState,goods_id as goodsId,order_goods_id as orderGoodsId,goods_name as goodsName,goods_num as goodsNum,refund_amount as refundAmount,buyer_refund_amount as buyerRefundAmount,goods_image as goodsImage,refund_type as refundType,refund_state as refundState,return_type as returnType,add_time as addTime,seller_time as sellerTime,admin_time as adminTime,reason_id as reasonId,reason_info as reasonInfo,pic_info as picInfo,buyer_message as buyerMessage,seller_message as sellerMessage,admin_message adminMessage,express_id as expressId,invoice_no as invoiceNo,ship_time as shipTime,delay_time as delayTime,receive_time as receiveTime,receive_message as receiveMessage,shipping_over as shippingOver,shipping_sign as shippingSign,shipping_html as shippingHtml,is_suc_refund as isSucRefund,refund_shipping_type as refundShippingType,address_id as addressId,diliveryman_id as diliverymanId,is_platform_in as isPlatformIn,platform_in_reason as platformInReason,platform_state as platformState,return_type as returnType,refund_shipping_type as refundShippingType,goods_state as goodsState,buyer_name as buyerName';
private $order;
......@@ -742,6 +742,7 @@ class RefundServiceModel extends \Business\AbstractModel
$value['deliveryTimeEnd'] = $value['deliveryTime'] + ApiConst::arriveTimeRadius;
$value['goodsImage'] = ImageUtil::getGoodsImgUrl($value['goodsImage'], ApiConst::goodsSmallSize);
$value['goodsAttr']=$goodsDao->getFormatGoodsAttr($value['goodsSpec']);
$value['finnshedTime']=$orders[$value['orderId']]['finnshedTime'];
$extent=$orderDao->getClienOrderCommon($orders[$value['orderId']]);
$value=array_merge($value,$extent);
$goodGroup=unserialize($value['goodsGroup']);
......
......@@ -61,6 +61,7 @@ class DeliveryServiceModel extends \Business\AbstractModel
$orderRes= $refundReturnDao->update($returnWhere,$orderData);
}else{
$orderData['order_state']=ApiConst::orderStateWaitRecieve;
$orderData['send_time']=TIMESTAMP;
$orderRes = $orderDao->updateByOrderId($orderData, $data['orderId']);
}
......
......@@ -276,6 +276,8 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
'orderId'=>$order['order_id']));
$push->addOneToClient($pushData);
$push->sendTcpMessage();
$messageService=\Business\Message\MessageServiceModel::getInstance();
$messageService->addMessageCenterToDb();
// $push->addOneToClient();
// \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'])));
......
......@@ -45,7 +45,7 @@ class OrderModel extends \DAO\AbstractModel
public function getOrderDetailField()
{
return 'order_id as orderId,coupon_id as couponId,refund_amount as refundAmount,order_sn as orderSn,pay_sn as paySn,store_name as storeName,add_time as addTime,store_id as storeId,goods_amount as goodsAmount,shipping_fee as shippingFee,order_amount as orderAmount,shipping_type as shippingType,payment_type as paymentType,order_state as orderState,shipping_fee as shippingFee,refund_state as refundState,order_type as orderType,is_receive_payment as isReceivePayment,payment_time as paymentTime,finnshed_time as finnshedTime,need_shipping_fee as needShippingFee,payment_code as paymentCode,buyer_id as buyerId,buyer_name as buyerName,refund_condition as refundCondition,delay_time as delayTime,gmt_update as gmtUpdate,diliveryman_id as diliverymanId,shipping_arrival_time as shippingArrivalTime,delivery_time as deliveryTime,order_note as orderNote';
return 'order_id as orderId,coupon_id as couponId,refund_amount as refundAmount,order_sn as orderSn,pay_sn as paySn,store_name as storeName,add_time as addTime,store_id as storeId,goods_amount as goodsAmount,shipping_fee as shippingFee,order_amount as orderAmount,shipping_type as shippingType,payment_type as paymentType,order_state as orderState,shipping_fee as shippingFee,refund_state as refundState,order_type as orderType,is_receive_payment as isReceivePayment,payment_time as paymentTime,finnshed_time as finnshedTime,need_shipping_fee as needShippingFee,payment_code as paymentCode,buyer_id as buyerId,buyer_name as buyerName,refund_condition as refundCondition,delay_time as delayTime,gmt_update as gmtUpdate,diliveryman_id as diliverymanId,shipping_arrival_time as shippingArrivalTime,delivery_time as deliveryTime,order_note as orderNote,send_time as sendTime';
}
public function getOrderShippingField()
......
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