From 11a541c8eb4feb1de7e28671d8a708359fac4253 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Fri, 8 Sep 2023 15:45:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=AE=A1=E6=A0=B8=E5=A7=94?= =?UTF-8?q?=E6=89=98=E5=BC=80=E5=A7=8B=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/community/Community.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controller/api/community/Community.php b/app/controller/api/community/Community.php index 4ac8b7c9..f0ee8dc6 100644 --- a/app/controller/api/community/Community.php +++ b/app/controller/api/community/Community.php @@ -671,7 +671,7 @@ class Community extends BaseController } // 同意 if ($status == 1) { - $res = Db::name('community')->where('community_id', $id)->where('is_del', 0)->update(['status' => $status, 'mer_status' => 1]); + $res = Db::name('community')->where('community_id', $id)->where('is_del', 0)->update(['status' => $status, 'mer_status' => 1, 'entrust_start_date' =>date('Y-m-d H:i:s')]); if (!$res) { return app('json')->fail('审核失败'); } @@ -790,7 +790,7 @@ class Community extends BaseController return app('json')->fail('当前商户无申请结束此委托商品权限'); } $entrustInfo = Db::name('entrust')->where('community_id', $id)->where('is_del', 0)->find(); - $limitTime = strtotime($entrustInfo['create_time']) + ($entrustInfo['entrust_day'] ?? 0) * 86400; + $limitTime = strtotime($entrustInfo['entrust_start_date']) + ($entrustInfo['entrust_day'] ?? 0) * 86400; if (time() < $limitTime) { return app('json')->fail('委托时间内不能申请结束委托'); } @@ -821,7 +821,7 @@ class Community extends BaseController // 同意 if ($status == 1) { $entrustInfo = Db::name('entrust')->where('community_id', $id)->where('is_del', 0)->find(); - $limitTime = strtotime($entrustInfo['create_time']) + ($entrustInfo['entrust_day'] ?? 0) * 86400; + $limitTime = strtotime($entrustInfo['entrust_start_date']) + ($entrustInfo['entrust_day'] ?? 0) * 86400; if (time() < $limitTime) { return app('json')->fail('委托时间内不能结束委托'); }