WIN-2308041133\Administrator 2 недель назад
Родитель
Сommit
f40c9b8dff
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      app/api/controller/User.php

+ 5 - 0
app/api/controller/User.php

@@ -581,6 +581,11 @@ class User extends BaseController
             return app('json')->fail("您已购买过当前模板");
         }
         //验证
+        $orderCount = (new ShowTemplateOrder)->where("uid", $request->user['uid'])->where("show_template_id", $id)->where("time", '>', time() - 60)->count();
+        if ($orderCount > 0) {
+            return app('json')->fail("您已下单该模板,请勿重复下单");
+        }
+        //验证
         $orderCount = (new ShowTemplateOrder)->where("uid", $request->user['uid'])->where("show_template_id", $id)->where("status", 1)->count();
         if ($orderCount > 0) {
             return app('json')->fail("您已下单该模板,请勿重复下单");