正在显示
5 个修改的文件
包含
33 行增加
和
3 行删除
@@ -2,6 +2,8 @@ | @@ -2,6 +2,8 @@ | ||
2 | 2 | ||
3 | namespace app\admin\controller; | 3 | namespace app\admin\controller; |
4 | 4 | ||
5 | +use app\admin\model\User; | ||
6 | +use app\api\controller\v1\WxxcxPush; | ||
5 | use app\common\controller\Backend; | 7 | use app\common\controller\Backend; |
6 | use think\Db; | 8 | use think\Db; |
7 | use think\exception\DbException; | 9 | use think\exception\DbException; |
@@ -62,7 +64,7 @@ class Order extends Backend | @@ -62,7 +64,7 @@ class Order extends Backend | ||
62 | $res=$this->model->where("id",">",0)->update(["is_check"=>1]); | 64 | $res=$this->model->where("id",">",0)->update(["is_check"=>1]); |
63 | 65 | ||
64 | foreach ($list as $row) { | 66 | foreach ($list as $row) { |
65 | - $row->visible(['id', 'order_no','phone', 'type','intended_driver_id', 'pay_type', 'price', 'is_pay', 'user_name', 'driver_name', 'pay_time', 'refund_time', 'create_time']); | 67 | + $row->visible(['id', 'order_no','phone', 'type','intended_driver_id', 'pay_type', 'price', 'is_pay', 'user_name', 'driver_name', 'pay_time', 'refund_time','reservation_time', 'create_time']); |
66 | $row->visible(['driver']); | 68 | $row->visible(['driver']); |
67 | $row->getRelation('driver')->visible(['name']); | 69 | $row->getRelation('driver')->visible(['name']); |
68 | $row->visible(['car']); | 70 | $row->visible(['car']); |
@@ -80,6 +82,8 @@ class Order extends Backend | @@ -80,6 +82,8 @@ class Order extends Backend | ||
80 | 82 | ||
81 | public function refund($id) | 83 | public function refund($id) |
82 | { | 84 | { |
85 | + $res=$this->refundSendMessage($id); | ||
86 | + print_r($res);return; | ||
83 | //查询订单 | 87 | //查询订单 |
84 | $order = Db::name("order")->where("id", $id)->find(); | 88 | $order = Db::name("order")->where("id", $id)->find(); |
85 | if ($order['is_pay'] != 1) { | 89 | if ($order['is_pay'] != 1) { |
@@ -242,5 +246,21 @@ class Order extends Backend | @@ -242,5 +246,21 @@ class Order extends Backend | ||
242 | $newadditionorder= \app\admin\model\Order::where("driver_id",null)->count(); | 246 | $newadditionorder= \app\admin\model\Order::where("driver_id",null)->count(); |
243 | return $newadditionorder; | 247 | return $newadditionorder; |
244 | } | 248 | } |
245 | - | 249 | + /** |
250 | + * 发送模板消息 | ||
251 | + * @return void | ||
252 | + * @throws \think\db\exception\DataNotFoundException | ||
253 | + * @throws \think\db\exception\ModelNotFoundException | ||
254 | + * @throws \think\exception\DbException | ||
255 | + */ | ||
256 | + function refundSendMessage($order_id){ | ||
257 | + $order=\think\Db::name("order")->find($order_id); | ||
258 | + $wxxcxpush=new WxxcxPush(); | ||
259 | + $user=new User(); | ||
260 | + $user=$user->find($order['user_id']); | ||
261 | + $res=$wxxcxpush->refundMessage($user['wx_xcx_openid'],$order_id); | ||
262 | + if ($res !== false) { | ||
263 | + return $res; | ||
264 | + } | ||
265 | + } | ||
246 | } | 266 | } |
@@ -28,6 +28,7 @@ return [ | @@ -28,6 +28,7 @@ return [ | ||
28 | 'route_name' => '线路名称', | 28 | 'route_name' => '线路名称', |
29 | 'Pay_time' => '支付时间', | 29 | 'Pay_time' => '支付时间', |
30 | 'Refund_time' => '退款时间', | 30 | 'Refund_time' => '退款时间', |
31 | + 'Reservation_time' => '预约时间', | ||
31 | 'Create_time' => '创建时间', | 32 | 'Create_time' => '创建时间', |
32 | 'Driver.name' => '司机名称', | 33 | 'Driver.name' => '司机名称', |
33 | 'Car.license_plate' => '车牌号', | 34 | 'Car.license_plate' => '车牌号', |
@@ -176,6 +176,7 @@ if (!function_exists('getOrderSn')) { | @@ -176,6 +176,7 @@ if (!function_exists('getOrderSn')) { | ||
176 | * @throws \think\exception\DbException | 176 | * @throws \think\exception\DbException |
177 | */ | 177 | */ |
178 | function refundSendMessage($order_id){ | 178 | function refundSendMessage($order_id){ |
179 | + print_r($$order_id);return; | ||
179 | $order=\think\Db::name("order")->find($order_id); | 180 | $order=\think\Db::name("order")->find($order_id); |
180 | $wxxcxpush=new WxxcxPush(); | 181 | $wxxcxpush=new WxxcxPush(); |
181 | $user=new User(); | 182 | $user=new User(); |
@@ -46,7 +46,7 @@ return array ( | @@ -46,7 +46,7 @@ return array ( | ||
46 | 'wxxcx_AppSecret' => 'baf744d21875280a5e98611f66adaf91', | 46 | 'wxxcx_AppSecret' => 'baf744d21875280a5e98611f66adaf91', |
47 | 'content' => '111111111111111111111222222222', | 47 | 'content' => '111111111111111111111222222222', |
48 | 'alarm_phone' => '13528348347', | 48 | 'alarm_phone' => '13528348347', |
49 | - 'riding_instructions' => '<p>乘车须知乘车须知乘车须知乘车须知乘车须知乘车须知<br></p>', | 49 | + 'riding_instructions' => '<p><span style="font-size: 10.5pt; letter-spacing: 0pt; font-family: 微软雅黑; color: rgb(0, 0, 0);">暴力恐怖犯罪线索举报办法:</span><span style="font-size: 10.5pt; letter-spacing: 0pt; font-family: 微软雅黑; color: rgb(0, 0, 0);"><br></span><span style="font-size: 10.5pt; letter-spacing: 0pt; font-family: 微软雅黑; color: rgb(0, 0, 0);">1、拨打“110”或公安机关公开的其他报警电话;</span><span style="font-size: 10.5pt; letter-spacing: 0pt; font-family: 微软雅黑; color: rgb(0, 0, 0);"><br></span><span style="font-size: 10.5pt; letter-spacing: 0pt; font-family: 微软雅黑; color: rgb(0, 0, 0);">2、手机用户发送短信至“12110”举报;</span><span style="font-size: 10.5pt; letter-spacing: 0pt; font-family: 微软雅黑; color: rgb(0, 0, 0);"><br></span><span style="font-size: 10.5pt; letter-spacing: 0pt; font-family: 微软雅黑; color: rgb(0, 0, 0);">3、通过信件向公安机关举报;</span><span style="font-size: 10.5pt; letter-spacing: 0pt; font-family: 微软雅黑; color: rgb(0, 0, 0);"><br></span><span style="font-size: 10.5pt; letter-spacing: 0pt; font-family: 微软雅黑; color: rgb(0, 0, 0);">4、到公安机关或向执勤民警当面举报;</span><span style="font-size: 10.5pt; letter-spacing: 0pt; font-family: 微软雅黑; color: rgb(0, 0, 0);"><br></span><span style="font-size: 10.5pt; letter-spacing: 0pt; font-family: 微软雅黑; color: rgb(0, 0, 0);">5、通过其他有效方式举报。</span><br></p>', |
50 | 'notice' => '<p><span style="background-color: rgb(249, 249, 249);">通知公告</span><span style="background-color: rgb(249, 249, 249);">通知公告</span><span style="background-color: rgb(249, 249, 249);">通知公告</span><span style="background-color: rgb(249, 249, 249);">通知公告</span><span style="background-color: rgb(249, 249, 249);">通知公告</span><span style="background-color: rgb(249, 249, 249);">通知公告</span><br></p>', | 50 | 'notice' => '<p><span style="background-color: rgb(249, 249, 249);">通知公告</span><span style="background-color: rgb(249, 249, 249);">通知公告</span><span style="background-color: rgb(249, 249, 249);">通知公告</span><span style="background-color: rgb(249, 249, 249);">通知公告</span><span style="background-color: rgb(249, 249, 249);">通知公告</span><span style="background-color: rgb(249, 249, 249);">通知公告</span><br></p>', |
51 | 'driver_authentication' => '<p>司机认证司机认证司机认证司机认证司机认证司机认证<br></p>', | 51 | 'driver_authentication' => '<p>司机认证司机认证司机认证司机认证司机认证司机认证<br></p>', |
52 | 'aboutwe' => '<p><span style="background-color: rgb(249, 249, 249);">关于我们</span><span style="background-color: rgb(249, 249, 249);">关于我们</span><span style="background-color: rgb(249, 249, 249);">关于我们</span><span style="background-color: rgb(249, 249, 249);">关于我们</span><br></p>', | 52 | 'aboutwe' => '<p><span style="background-color: rgb(249, 249, 249);">关于我们</span><span style="background-color: rgb(249, 249, 249);">关于我们</span><span style="background-color: rgb(249, 249, 249);">关于我们</span><span style="background-color: rgb(249, 249, 249);">关于我们</span><br></p>', |
@@ -84,6 +84,14 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template'], function | @@ -84,6 +84,14 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template'], function | ||
84 | autocomplete: false, | 84 | autocomplete: false, |
85 | formatter: Table.api.formatter.datetime | 85 | formatter: Table.api.formatter.datetime |
86 | }, | 86 | }, |
87 | + { | ||
88 | + field: 'reservation_time', | ||
89 | + title: __('Reservation_time'), | ||
90 | + operate: 'RANGE', | ||
91 | + addclass: 'datetimerange', | ||
92 | + autocomplete: false, | ||
93 | + formatter: Table.api.formatter.datetime | ||
94 | + }, | ||
87 | {field: 'user.username', title: __('User.username'), operate: 'LIKE'}, | 95 | {field: 'user.username', title: __('User.username'), operate: 'LIKE'}, |
88 | {field: 'phone', title: __('Phone'), operate: 'LIKE'}, | 96 | {field: 'phone', title: __('Phone'), operate: 'LIKE'}, |
89 | { | 97 | { |
-
请 注册 或 登录 后发表评论