From 2e66028de235eeda548e40721f080997623e64e6 Mon Sep 17 00:00:00 2001
From: lccsw <1127794702@qq.com>
Date: Fri, 26 Nov 2021 11:34:00 +0800
Subject: [PATCH] edit-upda-order_time
---
admin/views/auto/cars/get.php | 4 ++--
admin/views/auto/cars/lists.php | 2 +-
common/services/apporder/Payment_service.php | 13 +++++++------
sql/auto.sql | 1 +
4 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/admin/views/auto/cars/get.php b/admin/views/auto/cars/get.php
index 1b48f579..d64b0c05 100644
--- a/admin/views/auto/cars/get.php
+++ b/admin/views/auto/cars/get.php
@@ -35,9 +35,9 @@
diff --git a/admin/views/auto/cars/lists.php b/admin/views/auto/cars/lists.php
index d20aa07b..2604e7c5 100644
--- a/admin/views/auto/cars/lists.php
+++ b/admin/views/auto/cars/lists.php
@@ -54,7 +54,7 @@
定金 |
保险报价 |
精品报价 |
- 精品最低价 |
+ 精品底价 |
金融报价 |
公司加价 |
一级分销佣金 |
diff --git a/common/services/apporder/Payment_service.php b/common/services/apporder/Payment_service.php
index 385f6d51..56cf326f 100644
--- a/common/services/apporder/Payment_service.php
+++ b/common/services/apporder/Payment_service.php
@@ -160,7 +160,11 @@ class Payment_service extends HD_Service{
$this->load->model('receiver/order/receiver_order_loans_model', 'next_model');
}
$next_row = $this->next_model->get(['o_id'=>$row['id']]);
- $this->orders_model->update(['status' => $status,'order_time' => date('Y-m-d H:i:s')], ['id' => $row['id']]);
+ $order_update = [
+ 'status' => $status,
+ ];
+ $row['order_time'] == '0000-00-00 00:00:00' && $order_update['order_time'] = date('Y-m-d H:i:s');
+ $this->orders_model->update($order_update, ['id' => $row['id']]);
if(!$next_row){
$add_data = [
'o_id' => $row['id'],
@@ -214,11 +218,8 @@ class Payment_service extends HD_Service{
$pay_price && $upd['pay_price'] = $pay_price;
$res = $this->app_liche_orders_model->update($upd,array('id'=>$order['id']));
if($res) {
- //更新订单状态
- $row = $this->orders_model->get(['id' => $order['o_id']]);
- if($order['total_price']==$row['deposit']){ //意向金等于定金 更新订单下定时间
- $this->orders_model->update(['order_time' => date('Y-m-d H:i:s')], ['id' => $row['id']]);
- }
+ //更新订单下定时间
+ $this->orders_model->update(['order_time' => date('Y-m-d H:i:s')], ['id' => $order['o_id']]);
return array('code'=>1,'msg'=>'操作成功');
}else{
return array('code'=>0,'msg'=>'更新失败');
diff --git a/sql/auto.sql b/sql/auto.sql
index 4d37013d..b72d66ad 100644
--- a/sql/auto.sql
+++ b/sql/auto.sql
@@ -84,6 +84,7 @@ alter table lc_auto_cars
alter table lc_auto_cars modify attrs char(30) not null default '' comment '属性组合:{type0id}_{type1id}_{type2id}';
alter table lc_auto_cars drop index attrs;
alter table lc_auto_cars add price_floor double(10,2) not null default '0.00' comment '车辆底价' after price_car;
+alter table lc_auto_cars add price_fine_floor double(10,2) not null default '0.00' comment '精品底价' after price_fine;
-- ----------------------------