Browse Source

Merge branch 'develop' of ssh://8.134.10.79:222/Leadfyy.co/hainan into develop

develop
lemon 5 years ago
parent
commit
684ea5dcae
  1. 2
      app/Console/Commands/OrderTimeout.php
  2. 4
      app/Http/Controllers/Api/OrderController.php
  3. 19
      ready.md

2
app/Console/Commands/OrderTimeout.php

@ -42,7 +42,7 @@ class OrderTimeout extends Command
public function handle()
{
//需要处理的订单状态
$status_arr = [OrderStatus::UNPAID, OrderStatus::PAY_EARNEST];
$status_arr = [OrderStatus::UNPAID, OrderStatus::PAY_EARNEST, OrderStatus::OFFLINE_UNPAID];
//记录最小ID,下次查询时按ID正序查询,只处理大于该ID的订单,避免重复扫描数据库
$min_id = Order::query()->whereIn('status', $status_arr)->min('id');

4
app/Http/Controllers/Api/OrderController.php

@ -80,7 +80,7 @@ class OrderController extends Controller
if ($v['timeout'] !== null) {
$second = strtotime($v['timeout']) - $time;
if ($second > 0 && $v['status'] == Status::UNPAID) {
if ($second > 0) {
$v['status_text'] = '请在' . ceil($second / 60) . '分钟内付款';
} else if ($second < 0 && $v['status'] == Status::PAY_EARNEST) {
$v['status_text'] = '尾款支付已超时';
@ -222,7 +222,7 @@ class OrderController extends Controller
}
if ($formData['pay_type'] == PayType::OFFLINE) { //线下支付
return $this->success('操作成功,请及时联系客服付款');
return $this->success(['id' => $order_id], '操作成功,请及时联系客服付款');
} else { //在线支付或定金支付
$config = $this->payConfig($order, $price);
if (!empty($config['paySign'])) {

19
ready.md

@ -24,8 +24,26 @@ TRUNCATE `user_channels`;
TRUNCATE `user_favs`;
TRUNCATE `user_money_logs`;
TRUNCATE `agents`;
TRUNCATE `admin_agent_role_users`;
TRUNCATE `suppliers`;
TRUNCATE `admin_supplier_role_users`;
TRUNCATE `guides`;
TRUNCATE `admin_guide_role_users`;
# 代理商管理员 lingfeng16888
INSERT INTO `agents` (`id`, `username`, `password`, `name`, `avatar`, `remember_token`, `appid`, `appsecret`, `mchid`, `mchkey`, `status`, `type`, `company_name`, `logo`, `address`, `license_pic`, `director`, `contact_phone`, `rate`, `created_at`, `updated_at`, `deleted_at`)
VALUES (1, '领峰云', '$2y$10$7liU0oe8arMoM9hs992bJeqhlSyn6krdpaeX8zGJSp1RzcHO1qKvq', '总管理员', NULL, NULL, '', '', '', '', 1, 1, '总管理员', '', '', '', '总管理员', '13988889999', 0.00, NOW(), NOW(), NULL);
INSERT INTO `admin_agent_role_users` (`role_id`, `user_id`, `created_at`, `updated_at`) VALUES (1, 1, '2021-07-20 01:44:48', '2021-07-20 01:44:48');
# 供应商管理员 lingfeng16888
INSERT INTO `suppliers` (`id`, `username`, `password`, `name`, `avatar`, `remember_token`, `status`, `company_name`, `logo`, `address`, `license_pic`, `director`, `contact_phone`, `rate`, `created_at`, `updated_at`, `deleted_at`)
VALUES (1, '领峰云', '$2y$10$7liU0oe8arMoM9hs992bJeqhlSyn6krdpaeX8zGJSp1RzcHO1qKvq', '总管理员', NULL, NULL, 1, '总管理员', '', '', '', '总管理员', '13988889999', 0.00, '2021-08-26 11:28:17', '2021-08-30 17:45:14', NULL);
INSERT INTO `admin_supplier_role_users` (`role_id`, `user_id`, `created_at`, `updated_at`) VALUES (1, 1, '2021-07-20 01:44:48', '2021-07-20 01:44:48');
# 地接管理员 lingfeng16888
INSERT INTO `guides` (`id`, `username`, `password`, `name`, `avatar`, `remember_token`, `photo`, `license_pic`, `contact_phone`, `status`, `rate`, `created_at`, `updated_at`, `deleted_at`)
VALUES (1, '领峰云', '$2y$10$7liU0oe8arMoM9hs992bJeqhlSyn6krdpaeX8zGJSp1RzcHO1qKvq', '总管理员', NULL, NULL, '', '', '13988889999', 1, 0.00, '2021-08-19 13:29:55', '2021-08-19 13:29:55', NULL);
INSERT INTO `admin_guide_role_users` (`role_id`, `user_id`, `created_at`, `updated_at`) VALUES (1, 1, '2021-07-20 01:44:48', '2021-07-20 01:44:48');
INSERT INTO `categories` (`id`, `agent_id`, `pid`, `name`, `sort`, `template`, `deleted_at`) VALUES (1, 0, 0, '酒店', 255, '', NULL);
INSERT INTO `categories` (`id`, `agent_id`, `pid`, `name`, `sort`, `template`, `deleted_at`) VALUES (2, 0, 0, '景点', 255, '', NULL);
@ -78,4 +96,5 @@ INSERT INTO `channels` (`id`, `agent_id`, `pid`, `name`, `icon`, `sort`, `delete
ALTER TABLE `products`
AUTO_INCREMENT=1000;
```
Loading…
Cancel
Save