作者 Cool

新社区订单管理修改

@@ -105,6 +105,8 @@ class StoreOrder extends Backend @@ -105,6 +105,8 @@ class StoreOrder extends Backend
105 $this->error('该订单已支付'); 105 $this->error('该订单已支付');
106 } 106 }
107 $row->status = 2; 107 $row->status = 2;
  108 + $row->is_admin = 1;
  109 + $row->pay_time = time();
108 Db::startTrans(); 110 Db::startTrans();
109 try { 111 try {
110 $result = $row->save(); 112 $result = $row->save();
@@ -129,7 +131,7 @@ class StoreOrder extends Backend @@ -129,7 +131,7 @@ class StoreOrder extends Backend
129 } else { 131 } else {
130 $house_update['end_time'] = $time + config('site.house_valid') * 86400; 132 $house_update['end_time'] = $time + config('site.house_valid') * 86400;
131 } 133 }
132 - $result_store_house = Db::name('store_house')->update(['id' => $store_house['id'], '']); 134 + $result_store_house = Db::name('store_house')->update($house_update);
133 } else { 135 } else {
134 $insert = [ 136 $insert = [
135 'user_id' => $info['user_id'], 137 'user_id' => $info['user_id'],
@@ -13,6 +13,9 @@ return [ @@ -13,6 +13,9 @@ return [
13 'Money' => '支付金额', 13 'Money' => '支付金额',
14 'Pay_time' => '支付时间', 14 'Pay_time' => '支付时间',
15 'Transaction_id' => '微信支付ID', 15 'Transaction_id' => '微信支付ID',
  16 + 'Is_admin' => '是否为后台修改支付状态',
  17 + 'Is_admin 0' => '否',
  18 + 'Is_admin 1' => '是',
16 'End_time' => '过期时间', 19 'End_time' => '过期时间',
17 'Createtime' => '生成时间', 20 'Createtime' => '生成时间',
18 'Updatetime' => '更新时间', 21 'Updatetime' => '更新时间',
@@ -198,7 +198,7 @@ class Ajax extends Frontend @@ -198,7 +198,7 @@ class Ajax extends Frontend
198 } else { 198 } else {
199 $house_update['end_time'] = $time + config('site.house_valid') * 86400; 199 $house_update['end_time'] = $time + config('site.house_valid') * 86400;
200 } 200 }
201 - $result_store_house = Db::name('store_house')->update(['id' => $store_house['id'], '']); 201 + $result_store_house = Db::name('store_house')->update($house_update);
202 } else { 202 } else {
203 $insert = [ 203 $insert = [
204 'user_id' => $info['user_id'], 204 'user_id' => $info['user_id'],
@@ -33,6 +33,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin @@ -33,6 +33,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
33 {field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2'),"3":__('Status 3')}, formatter: Table.api.formatter.status}, 33 {field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2'),"3":__('Status 3')}, formatter: Table.api.formatter.status},
34 {field: 'money', title: __('Money'), operate:'BETWEEN'}, 34 {field: 'money', title: __('Money'), operate:'BETWEEN'},
35 {field: 'pay_time', title: __('Pay_time'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime}, 35 {field: 'pay_time', title: __('Pay_time'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
  36 + {field: 'is_admin', title: __('Is_admin'), searchList: {"0":__('Is_admin 0'),"1":__('Is_admin 1')}, formatter: Table.api.formatter.status},
36 // {field: 'transaction_id', title: __('Transaction_id')}, 37 // {field: 'transaction_id', title: __('Transaction_id')},
37 // {field: 'end_time', title: __('End_time'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime}, 38 // {field: 'end_time', title: __('End_time'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
38 // {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime}, 39 // {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},