|
@@ -360,6 +360,8 @@ class Taxi extends ApiController
|
|
|
$taxiUid = isset($row['taxi_uid'])? $row['taxi_uid'] : 0;
|
|
$taxiUid = isset($row['taxi_uid'])? $row['taxi_uid'] : 0;
|
|
|
$createTime = isset($row['created_at'])? $row['created_at'] : 0;
|
|
$createTime = isset($row['created_at'])? $row['created_at'] : 0;
|
|
|
$cancelTime = isset($config['store']['store_cancel_time'])? $config['store']['store_cancel_time'] : 0;
|
|
$cancelTime = isset($config['store']['store_cancel_time'])? $config['store']['store_cancel_time'] : 0;
|
|
|
|
|
+ $taxiUser = model('common/TaxiUser')->where(['id'=> $taxiUid])->find();
|
|
|
|
|
+ $taxiUserId = isset($taxiUser['user_id'])? $taxiUser['user_id'] : 0;
|
|
|
if ($row['status'] == 3 ) {
|
|
if ($row['status'] == 3 ) {
|
|
|
// 免费取消时间内不扣除
|
|
// 免费取消时间内不扣除
|
|
|
if($cancelTime<=0 || $createTime < (time() - $cancelTime*60)){
|
|
if($cancelTime<=0 || $createTime < (time() - $cancelTime*60)){
|
|
@@ -376,9 +378,9 @@ class Taxi extends ApiController
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
// 退款扣除金额直接给司机
|
|
// 退款扣除金额直接给司机
|
|
|
- if($taxiUid && $cost_price>0){
|
|
|
|
|
|
|
+ if($taxiUserId && $cost_price>0){
|
|
|
model('common/Users')->changeBalance(
|
|
model('common/Users')->changeBalance(
|
|
|
- $taxiUid,
|
|
|
|
|
|
|
+ $taxiUserId,
|
|
|
$cost_price,
|
|
$cost_price,
|
|
|
"取消成功,扣除用户金额到账【" . $cost_price . "】",
|
|
"取消成功,扣除用户金额到账【" . $cost_price . "】",
|
|
|
true
|
|
true
|
|
@@ -393,9 +395,9 @@ class Taxi extends ApiController
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
// 退款扣除金额直接给司机
|
|
// 退款扣除金额直接给司机
|
|
|
- if($taxiUid && $cost_price>0){
|
|
|
|
|
|
|
+ if($taxiUserId && $cost_price>0){
|
|
|
model('common/Users')->changeBalance(
|
|
model('common/Users')->changeBalance(
|
|
|
- $taxiUid,
|
|
|
|
|
|
|
+ $taxiUserId,
|
|
|
$cost_price,
|
|
$cost_price,
|
|
|
"取消成功,扣除用户金额到账【" . $cost_price . "】",
|
|
"取消成功,扣除用户金额到账【" . $cost_price . "】",
|
|
|
true
|
|
true
|
|
@@ -431,9 +433,9 @@ class Taxi extends ApiController
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
// 退款扣除金额直接给司机
|
|
// 退款扣除金额直接给司机
|
|
|
- if($taxiUid && $cost_price>0){
|
|
|
|
|
|
|
+ if($taxiUserId && $cost_price>0){
|
|
|
model('common/Users')->changeBalance(
|
|
model('common/Users')->changeBalance(
|
|
|
- $taxiUid,
|
|
|
|
|
|
|
+ $taxiUserId,
|
|
|
$cost_price,
|
|
$cost_price,
|
|
|
"取消成功,扣除用户金额到账【" . $cost_price . "】",
|
|
"取消成功,扣除用户金额到账【" . $cost_price . "】",
|
|
|
true
|
|
true
|