Commit dbfb3838 authored by liuyuzhen's avatar liuyuzhen

购物车结算问题

parent 7a0294db
...@@ -312,10 +312,11 @@ class OrderConfirmUtil { ...@@ -312,10 +312,11 @@ class OrderConfirmUtil {
\Error\ErrorModel::throwException(\Error\CodeConfigModel::wrongPaywayForStoreForOrder); \Error\ErrorModel::throwException(\Error\CodeConfigModel::wrongPaywayForStoreForOrder);
} }
$reliefAmount = isset($tempStore['reliefAmount'])?$tempStore['reliefAmount']:\Our\ApiConst::zero; $reliefAmount = isset($tempStore['reliefAmount'])?$tempStore['reliefAmount']:\Our\ApiConst::zero;
$orderAmount = $tempStore['storeTotalPrice'] - $reliefAmount + $deliveryFee; $orderGoodsAmount = $tempStore['storeTotalPrice'] - $reliefAmount;
if($orderAmount<=\Our\ApiConst::zero){ if($orderGoodsAmount<=\Our\ApiConst::zero){
$orderAmount = \Our\ApiConst::zero; $orderGoodsAmount = \Our\ApiConst::zero;
} }
$orderAmount = $orderGoodsAmount + $deliveryFee ;
if($orderAmount!=$requestData['totalFee']){ if($orderAmount!=$requestData['totalFee']){
\Error\ErrorModel::throwException(\Error\CodeConfigModel::wrongTotalFeeForOrder); \Error\ErrorModel::throwException(\Error\CodeConfigModel::wrongTotalFeeForOrder);
} }
...@@ -397,11 +398,11 @@ class OrderConfirmUtil { ...@@ -397,11 +398,11 @@ class OrderConfirmUtil {
\Error\ErrorModel::throwException(\Error\CodeConfigModel::wrongPaywayForStoreForOrder); \Error\ErrorModel::throwException(\Error\CodeConfigModel::wrongPaywayForStoreForOrder);
} }
$reliefAmount = isset($tempStore['reliefAmount'])?$tempStore['reliefAmount']:\Our\ApiConst::zero; $reliefAmount = isset($tempStore['reliefAmount'])?$tempStore['reliefAmount']:\Our\ApiConst::zero;
$orderAmount = $tempStore['storeTotalPrice'] - $reliefAmount + $deliveryFee; $orderGoodsAmount = $tempStore['storeTotalPrice'] - $reliefAmount;
if($orderAmount<=\Our\ApiConst::zero){ if($orderGoodsAmount<=\Our\ApiConst::zero){
$orderAmount = \Our\ApiConst::zero; $orderGoodsAmount = \Our\ApiConst::zero;
} }
\Our\Log::getInstance()->write($orderAmount,'/data/log/apptest'); $orderAmount = $orderGoodsAmount + $deliveryFee;
if($orderAmount!=$requestData['totalFee']){ if($orderAmount!=$requestData['totalFee']){
\Error\ErrorModel::throwException(\Error\CodeConfigModel::wrongTotalFeeForOrder); \Error\ErrorModel::throwException(\Error\CodeConfigModel::wrongTotalFeeForOrder);
} }
...@@ -982,10 +983,10 @@ class OrderConfirmUtil { ...@@ -982,10 +983,10 @@ class OrderConfirmUtil {
$newCouponList = array(); $newCouponList = array();
$giftCouponIds = array(); $giftCouponIds = array();
foreach($couponList as $temp){ foreach($couponList as $temp){
$storeCouponList[$temp['store_id']][] = $temp;
$temp['order_amount'] = $temp['order_amount']*\Our\ApiConst::hundred; $temp['order_amount'] = $temp['order_amount']*\Our\ApiConst::hundred;
$temp['cash_money'] = $temp['cash_money']*\Our\ApiConst::hundred; $temp['cash_money'] = $temp['cash_money']*\Our\ApiConst::hundred;
$newCouponList[$temp['couponId']] = $temp; $newCouponList[$temp['couponId']] = $temp;
$storeCouponList[$temp['store_id']][] = $temp;
if($temp['coupon_type']==\Our\ApiConst::fullForCouponCouponType&&$temp['gift_coupon_id']>\Our\ApiConst::zero){ if($temp['coupon_type']==\Our\ApiConst::fullForCouponCouponType&&$temp['gift_coupon_id']>\Our\ApiConst::zero){
$giftCouponIds[$temp['couponId']] = $temp['gift_coupon_id']; $giftCouponIds[$temp['couponId']] = $temp['gift_coupon_id'];
} }
......
...@@ -106,10 +106,10 @@ elastic.master.scheme="http"; ...@@ -106,10 +106,10 @@ elastic.master.scheme="http";
password.key='~!@#$`1234qwertasdfgzxcvb'; password.key='~!@#$`1234qwertasdfgzxcvb';
; 生 产环境配置 ; 生 产环境配置
[pre : common] [lyztest : common]
; 数据库配置 ; 数据库配置
resources.database.params.driver = "pdo_mysql" resources.database.params.driver = "pdo_mysql"
resources.database.params.hostname = "127.0.0.1" resources.database.params.hostname = "106.14.14.233"
resources.database.params.port = 3306 resources.database.params.port = 3306
resources.database.params.database = "qmcs" resources.database.params.database = "qmcs"
resources.database.params.username = "root" resources.database.params.username = "root"
...@@ -120,7 +120,7 @@ resources.database.params.driver_options.1002 = "SET NAMES utf8" ...@@ -120,7 +120,7 @@ resources.database.params.driver_options.1002 = "SET NAMES utf8"
; 从库配置 ; 从库配置
resources.database.slave.params.driver = "pdo_mysql" resources.database.slave.params.driver = "pdo_mysql"
resources.database.slave.params.hostname = "127.0.0.1" resources.database.slave.params.hostname = "106.14.14.233"
resources.database.slave.params.port = 3306 resources.database.slave.params.port = 3306
resources.database.slave.params.database = "qmcs" resources.database.slave.params.database = "qmcs"
resources.database.slave.params.username = "root" resources.database.slave.params.username = "root"
...@@ -399,7 +399,7 @@ elastic.master.host="192.168.1.201" ...@@ -399,7 +399,7 @@ elastic.master.host="192.168.1.201"
elastic.master.port="9200" elastic.master.port="9200"
elastic.master.scheme="http"; elastic.master.scheme="http";
[lyztest : common] [lyztest1 : common]
; 数据库配置 ; 数据库配置
resources.database.params.driver = "pdo_mysql" resources.database.params.driver = "pdo_mysql"
resources.database.params.hostname = "127.0.0.1" resources.database.params.hostname = "127.0.0.1"
......
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