Commit f9195d69 authored by christ's avatar christ

bug2644

parent ce4c1b75
...@@ -1031,6 +1031,8 @@ class RefundServiceModel extends \Business\AbstractModel ...@@ -1031,6 +1031,8 @@ class RefundServiceModel extends \Business\AbstractModel
// if($orderInfo['shippingType']==ApiConst::bySelf){ // if($orderInfo['shippingType']==ApiConst::bySelf){
$returnData['needShippingFee']=ApiConst::zero; $returnData['needShippingFee']=ApiConst::zero;
// } // }
//修改后的优惠金额
$discountAmount=$orderInfo['originAmount']- $orderInfo['orderAmount'];
if ($orderInfo['paymentTime']) { if ($orderInfo['paymentTime']) {
$orderConfirmUtil = \Order\OrderConfirmUtil::getInstance(); $orderConfirmUtil = \Order\OrderConfirmUtil::getInstance();
...@@ -1044,10 +1046,10 @@ class RefundServiceModel extends \Business\AbstractModel ...@@ -1044,10 +1046,10 @@ class RefundServiceModel extends \Business\AbstractModel
$refundAmount = $orderInfo['orderAmount'] - $orderInfo['shippingFee'] - ApiConst::zero;; $refundAmount = $orderInfo['orderAmount'] - $orderInfo['shippingFee'] - ApiConst::zero;;
} }
} }
$refundAmount=$refundAmount-$discountAmount;
} else { } else {
$refundAmount = $orderGoods['goodsPrice']*$orderGoods['goodsNum'];
//$refundAmount = $orderGoods['goodsPrice']*$orderGoods['goodsNum']; $refundAmount =$refundAmount-$discountAmount;
$refundAmount =$orderInfo['orderAmount'];
} }
$returnData['refundAmount'] = $refundAmount - $orderInfo['refundAmount'] - $returnData['needShippingFee'] + $shippingFee; $returnData['refundAmount'] = $refundAmount - $orderInfo['refundAmount'] - $returnData['needShippingFee'] + $shippingFee;
if((int)$returnData['refundAmount'] <ApiConst::zero){ if((int)$returnData['refundAmount'] <ApiConst::zero){
......
...@@ -45,7 +45,7 @@ class OrderModel extends \DAO\AbstractModel ...@@ -45,7 +45,7 @@ class OrderModel extends \DAO\AbstractModel
public function getOrderDetailField() 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,send_time as sendTime'; return 'order_id as orderId,coupon_id as couponId,refund_amount as refundAmount,origin_amount as originAmount,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() 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