wanghousheng 10 months ago
parent cdc3f533f8
commit c83342af68
  1. 12
      app/api/controller/Shop.php
  2. 9
      app/timer/service/Order.php

@ -55,11 +55,8 @@ class Shop extends Controller
return $this->renderError('缺少必要参数');
}
$detail = ShopModel::detail($shopId);
// var_dump($detail['shop_hours']);
// exit;
if (!empty($detail['shop_hours'])) {
$shop_hours = explode(' ', $detail['shop_hours']);
$shop_hours = explode('-', $shop_hours[1] ?? "00:00");
$shop_hours = explode('-', $detail['shop_hours'] ?? "00:00");
if (count($shop_hours) == 2) {
$array = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
for ($i = 0; $i < 3; $i++) {
@ -104,7 +101,8 @@ class Shop extends Controller
return $this->renderSuccess('ok');
}
public function getShopInfo(){
public function getShopInfo()
{
$banner_imgs = [];
$share_imgs = [];
$activity_imgs = [];
@ -117,8 +115,4 @@ class Shop extends Controller
}
}

@ -12,13 +12,13 @@ declare (strict_types=1);
namespace app\timer\service;
use app\timer\model\Order as OrderModel;
use app\common\enum\order\OrderStatus as OrderStatusEnum;
use app\common\library\helper;
use app\common\service\BaseService;
use app\common\service\Order as OrderService;
use app\common\service\order\Complete as OrderCompleteService;
use app\common\enum\order\OrderStatus as OrderStatusEnum;
use app\common\library\helper;
use app\timer\library\Tools;
use app\timer\model\Order as OrderModel;
/**
* 服务类:订单模块
@ -38,7 +38,8 @@ class Order extends BaseService
public function closeEvent(int $storeId, int $closeHours)
{
// 截止时间
$deadlineTime = time() - ((int)$closeHours * 60 * 60);
//$deadlineTime = time() - ((int)$closeHours * 60 * 60);//按小时计算
$deadlineTime = time() - ($closeHours * 60);//按分钟计算
// 查询截止时间未支付的订单
$model = new OrderModel;
$list = $model->getListByClose($storeId, $deadlineTime);

Loading…
Cancel
Save