Commit 28983176 authored by liuyuzhen's avatar liuyuzhen

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

parents 6a1b2a56 29ef3685
......@@ -1231,12 +1231,12 @@ class OrderConfirmUtil {
}
}
}
$storeGoodsList['gcPrices'] = isset($storeGcCouponPriceArray);
$storeGoodsList['gcPrices'] = isset($storeGcCouponPriceArray)?$storeGcCouponPriceArray:array();
$storeGoodsList['goodsCommonPrices'] = $storeGoodsCommonCouponPriceArray;
$storeGoodsList['storeCouponPrice'] = $storeCouponPrice;
$reliefAmount = $cartService->getOneCouponReliefAmount($coupon,$storeGoodsList);
if($reliefAmount&&$reliefAmount>\Our\ApiConst::zero){
$totalPrice = $totalPrice-$reliefAmount;
$totalPrice = ($reliefAmount > $totalPrice)? 0 : ($totalPrice-$reliefAmount);
}
return $totalPrice;
}
......
......@@ -94,7 +94,7 @@ class ImageConst{
4=>self::reportPath,
5=>self::memberAvatar
);
const ninTyPath='?x-oss-process=image/resize,m_fill,h_90,w_90';
const sizeScale = 1.5;
const goodsListImgSize = 334;
const CommentGoodsImgSize = 138;
......
......@@ -482,6 +482,7 @@ class RefundServiceModel extends \Business\AbstractModel
$refundReturnDao->db->doRollback();
return false;
}
//$this->recordSellerLog('退款处理,退款编号:'.$refund['refund_sn']); //待确认
//记录操作日志
$sellerLogDAO = \DAO\SellerLogModel::getInstance();
......@@ -512,14 +513,14 @@ class RefundServiceModel extends \Business\AbstractModel
'refundId'=>$refund['refund_id']));
$push->addOneToClient($pushData);
$push->sendTcpMessage();
return true;
}
if($refundAmount > $refund['buyer_refund_amount']){
//showDialog('退款金额不可大于本订单支付金额','','error');
$refundReturnDao->db->doRollback();
return false;
return true;
}
// if($refundAmount > $refund['buyer_refund_amount']){
// //showDialog('退款金额不可大于本订单支付金额','','error');
// $refundReturnDao->db->doRollback();
// return false;
// }
//以下为同意退款流程
if($order_info['order_state']==40){ //交易完成订单,退积分
......@@ -1258,8 +1259,9 @@ class RefundServiceModel extends \Business\AbstractModel
$refundArray['refund_shipping_type']=isset($refund['refundShippingType'])?$refund['refundShippingType']:ApiConst::zero;
$refundArrayUnLine=Common::convertUnderline($refundArray);
$state = $refundReturnDao->addRefundReturn($refundArray,$orderInfo,$orderGoods);
$updateOrderData['refund_amount']= $orderInfo['refundAmount']+ $refundArray['refund_amount'];
$updateOrderData['origin_refund_amount']= $orderInfo['origin_refund_amount']+$originRefundAmount;
$updateOrderData['refund_amount']= $orderInfo['refundAmount']+ $refundAmount;
$updateOrderData['origin_refund_amount']= $orderInfo['originRefundAmount']+$originRefundAmount;
$orderDao->deleteOrderCache($memberId,$orderInfo['orderId'],$orderInfo['storeId'],true);
$storeDao->deleteStoreCache($orderInfo['storeId'],$orderInfo['orderId']);
......
......@@ -237,9 +237,13 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
* @param $orderId
* @return bool
*/
public function orderReceive($memberId, $orderId)
public function orderReceive($memberId, $orderId,$isStore=false)
{
$storeId = $this->_getStoreByMemberId($memberId);
if($isStore){
$storeId=$memberId;
}else{
$storeId = $this->_getStoreByMemberId($memberId);
}
$where['order_id'] = $orderId;
$where['store_id'] = $storeId;
$where['order_state'] = ApiConst::orderStateWaitConfirm;
......@@ -490,10 +494,14 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
return $this->orderGoodsField . ',goods_commonid as goodsCommonid,goods_commonid as goodsCommonId,goods_spec as goodsSpec ';
}
public function getDiliveryManByStoreId($memberId)
public function getDiliveryManByStoreId($memberId,$isStoreId=false)
{
$memberDao = \DAO\MemberModel::getInstance();
$storeId = $memberDao->getInfo($memberId, 'store_id');
if($isStoreId){
$storeId=$memberId;
}else{
$storeId = $memberDao->getInfo($memberId, 'store_id');
}
if (empty($storeId)) {
ErrorModel::throwException(CodeConfigModel::emptyStoreId);
}
......@@ -505,9 +513,9 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
return $diliveryMans;
}
public function confirmReceivePayment($memberId,$orderId){
public function confirmReceivePayment($memberId,$storeId,$orderId){
$memberDao = \DAO\MemberModel::getInstance();
$storeId = $memberDao->getInfo($memberId, 'store_id');
// $storeId = $memberDao->getInfo($memberId, 'store_id');
$orderDao=\DAO\Order\OrderModel::getInstance(DbNameConst::masterDBConnectName);
$where['order_id']=$orderId;
$where['store_id']=$storeId;
......@@ -1084,10 +1092,10 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
}
public function getSellerCount($memberId)
public function getSellerCount($storeId)
{
$memberDao = \DAO\MemberModel::getInstance();
$storeId = $memberDao->getInfo($memberId, 'store_id');
// $storeId = $memberDao->getInfo($memberId, 'store_id');
$orderDao = \DAO\Order\OrderModel::getInstance(DbNameConst::salveDBConnectName);
$waitReceiveCount = $orderDao->getCountByOrderState($storeId, ApiConst::orderStateWaitConfirm);
$waitDeliveryCount = $orderDao->getCountByShippingTypeAndOrderState($storeId);
......@@ -1095,10 +1103,10 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
$orderCount=$waitReceiveCount+$waitDeliveryCount+$waitGetCount;
return array('waitReceiveCount' => $waitReceiveCount, 'waitDeliveryCount' => $waitDeliveryCount, 'waitGetCount' => $waitGetCount,'orderCount'=>$orderCount);
}
public function getSellerRefundCount($memberId)
public function getSellerRefundCount($storeId)
{
$memberDao = \DAO\MemberModel::getInstance();
$storeId = $memberDao->getInfo($memberId, 'store_id');
// $storeId = $memberDao->getInfo($memberId, 'store_id');
$refundReturnDao = \DAO\Order\RefundReturnModel::getInstance(DbNameConst::salveDBConnectName);
//待处理
$waitRefundProccessCount = $refundReturnDao->getCountByRefundState($storeId);
......@@ -1106,10 +1114,10 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
$refundCount=$waitRefundProccessCount+$waitRefundReceiveCount;
return array('waitRefundProccessCount' => $waitRefundProccessCount, 'waitRefundReceiveCount' => $waitRefundReceiveCount, 'refundCount' =>$refundCount);
}
public function getStorageAlarmCount($memberId)
public function getStorageAlarmCount($storeId)
{
$memberDao = \DAO\MemberModel::getInstance();
$storeId = $memberDao->getInfo($memberId, 'store_id');
// $storeId = $memberDao->getInfo($memberId, 'store_id');
$goodsDao=\DAO\GoodsModel::getInstance();
$alertCount=$goodsDao->getAlertCountByStoreId($storeId);
return array('alertCount'=>$alertCount);
......
......@@ -75,6 +75,7 @@ abstract class AbstractModel {
public function lists($where=array(),$order='',$field='*',$pageIndex=0,$pageSize=20,$group = null){
$this->db->from($this->_tableName);
$this->db->where($where);
$this->db->select($field);
$count=$this->db->fetchNum();
$this->db->from($this->_tableName);
$this->db->where($where);
......
......@@ -384,6 +384,7 @@ class RefundReturnModel extends \DAO\AbstractModel
if ($pics) {
foreach ($pics as $pic) {
$readFile = \Our\Common::getStaticFile($pic, ImageConst::refund);
//$readFile.=ImageConst::ninTyPath;
array_push($picsRes, $readFile);
}
}
......
......@@ -44,7 +44,7 @@ class DeliveryController extends \Our\Controller_AbstractClient {
* 获得配送员列表
*/
public function getDeliveriersAction(){
$result = $this->shopkeeperService->getDiliveryManByStoreId($this->memberId);
$result = $this->shopkeeperService->getDiliveryManByStoreId($this->storeId,true);
$result=$result?$result:[];
if($result!==false){
$this->success($result,\Our\DescribeConst::successMessage,\Our\DescribeConst::successMessage);
......
......@@ -111,7 +111,7 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
*/
public function orderReceiveAction(){
$orderId = $this->req['data']['orderId'];
$result = $this->shopkeeperService->orderReceive($this->memberId, $orderId);
$result = $this->shopkeeperService->orderReceive($this->storeId, $orderId,true);
if ($result) {
$this->success(array(), \Our\DescribeConst::successMessage, \Our\DescribeConst::successMessage);
}else{
......@@ -143,7 +143,7 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
$pageSize=$this->getPageSize();
$orderState = isset($this->req['data']['orderState'])?$this->req['data']['orderState']:'';
$keyword = isset($this->req['data']['keyword'])?$this->req['data']['keyword']:'';
$result = $this->shopkeeperService->getOrders($this->memberId,$pageIndex,$pageSize,$orderState,$keyword);
$result = $this->shopkeeperService->getOrders($this->storeId,$pageIndex,$pageSize,$orderState,$keyword,true);
$this->success($result);
// if($result){
// $this->success(array(),\Our\DescribeConst::successMessage,\Our\DescribeConst::successMessage);
......@@ -183,7 +183,7 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
* 获得订单数量
*/
public function countAction(){
$result = $this->shopkeeperService->getCount($this->memberId);
$result = $this->shopkeeperService->getCount($this->storeId);
if(!empty($result)){
$this->success($result);
}
......@@ -193,7 +193,7 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
public function receivePaymentAction(){
$shopkeeperService=\Business\Store\ShopkeeperServiceModel::getInstance();
$res=$shopkeeperService->confirmReceivePayment($this->memberId,$this->req['data']['orderId']);
$res=$shopkeeperService->confirmReceivePayment($this->memberId,$this->storeId,$this->req['data']['orderId']);
if($res){
$this->success(array(),\Our\DescribeConst::successMessage);
}else{
......
......@@ -122,7 +122,7 @@ config.url.resourcesHost = "http://local.qm.com"
config.url.userHost = ""
; oss 域名
config.url.ossHost = "http://qmoss-01.oss-cn-hangzhou.aliyuncs.com"
config.url.ossHost = "https://imgpre.shenbd.com"
;推送域名
config.url.pushHost="192.168.1.201:9503";
......
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