Browse Source

Merge branch 'web_sannong_fr'

15313670163 1 month ago
parent
commit
1245111a0c

+ 17 - 22
app/JsonRpc/WebsiteService.php

@@ -466,8 +466,7 @@ class WebsiteService implements WebsiteServiceInterface
     public function getWebsiteCategory(array $data): array
     {
         $where = [
-            'website_id' => $data['website_id'],
-            'pid' => 0,
+            'website_id'=>$data['website_id']
         ];
         $result = WebsiteCategory::where($where)->orderBy('sort', 'asc')->get();
         if (empty($result)) {
@@ -487,29 +486,25 @@ class WebsiteService implements WebsiteServiceInterface
         $where = [
             'website_id' => $data['website_id'],
             'ad_place.status' => 1,
-            'ad.status' => 1,
+            // 'ad.status' => 1,
         ];
         if (isset($data['ad_tag']) && !empty($data['ad_tag'])) {
             $now = Carbon::now()->format('Y-m-d H:i:s'); // 获取当前时间
-            $where[] = ['ad_tag', 'like', '%' . $data['ad_tag'] . '%'];
-            $result = AdPlace::where($where)
-                ->leftJoin("ad", "ad.pid", "ad_place.id")
-                ->select("ad_place.*", "ad.*", 'ad.name as ad_name', 'ad.id as ad_id')
-                ->where('ad.fromtime', '<=', $now)
-                ->where('ad.totime', '>=', $now)
-            // ->whereBetween('ad.fromtime', [$now, 'ad.totime'])
-                ->get()->all();
-            if (empty($result)) {
-                $result = AdPlace::where('website_id', $data['website_id'])
-                    ->where('status', 1)
-                    ->where('ad_tag', 'like', '%' . $data['ad_tag'] . '%')
-                    ->get()->all();
-            }
-            if (empty($result)) {
-                return Result::error("此广告位不存在!", 0);
-            }
-        } else {
-            return Result::error("请选择广告位!", 0);
+            $where[] = ['ad_place.ad_tag','like','%'.$data['ad_tag'].'%'];
+            $result =  AdPlace::where($where)
+            ->leftJoin("ad", function ($join) use ($now) {
+                $join->on("ad.pid", "=", "ad_place.id")
+                     ->where('ad.status', 1)
+                     ->where('ad.fromtime', '<=', $now)
+                     ->where('ad.totime', '>=', $now);
+            })
+            ->select("ad_place.*",'ad.*',"ad_place.id as ad_place_id","ad.name as ad_name")
+            ->get()->all();
+            if(empty($result)){
+                return Result::error("此广告位不存在!",0);
+            } 
+        }else{
+            return Result::error("请选择广告位!",0);
         }
         return Result::success($result);
 

File diff suppressed because it is too large
+ 0 - 0
runtime/container/scan.cache


+ 1 - 1
runtime/hyperf.pid

@@ -1 +1 @@
-93393
+19776

+ 4 - 0
vendor/composer/autoload_classmap.php

@@ -34,6 +34,8 @@ return array(
     'App\\Controller\\IndexController' => $baseDir . '/app/Controller/IndexController.php',
     'App\\Exception\\Handler\\AppExceptionHandler' => $baseDir . '/app/Exception/Handler/AppExceptionHandler.php',
     'App\\Exception\\Handler\\JsonRpcExceptionHandler' => $baseDir . '/app/Exception/Handler/JsonRpcExceptionHandler.php',
+    'App\\JsonRpc\\FooterService' => $baseDir . '/app/JsonRpc/FooterService.php',
+    'App\\JsonRpc\\FooterServiceInterface' => $baseDir . '/app/JsonRpc/FooterServiceInterface.php',
     'App\\JsonRpc\\LinkService' => $baseDir . '/app/JsonRpc/LinkService.php',
     'App\\JsonRpc\\LinkServiceInterface' => $baseDir . '/app/JsonRpc/LinkServiceInterface.php',
     'App\\JsonRpc\\PublicRpcService' => $baseDir . '/app/JsonRpc/PublicRpcService.php',
@@ -62,9 +64,11 @@ return array(
     'App\\Model\\Website' => $baseDir . '/app/Model/Website.php',
     'App\\Model\\WebsiteCategory' => $baseDir . '/app/Model/WebsiteCategory.php',
     'App\\Model\\WebsiteColumn' => $baseDir . '/app/Model/WebsiteColumn.php',
+    'App\\Model\\WebsiteGroup' => $baseDir . '/app/Model/WebsiteGroup.php',
     'App\\Model\\WebsiteRole' => $baseDir . '/app/Model/WebsiteRole.php',
     'App\\Model\\WebsiteRoleUser' => $baseDir . '/app/Model/WebsiteRoleUser.php',
     'App\\Model\\WebsiteTemplateInfo' => $baseDir . '/app/Model/WebsiteTemplateInfo.php',
+    'App\\Service\\MinioService' => $baseDir . '/app/Service/MinioService.php',
     'App\\Tools\\Result' => $baseDir . '/app/Tools/Result.php',
     'Attribute' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
     'Aws\\ACMPCA\\ACMPCAClient' => $vendorDir . '/aws/aws-sdk-php/src/ACMPCA/ACMPCAClient.php',

+ 8 - 4
vendor/composer/autoload_static.php

@@ -4,7 +4,7 @@
 
 namespace Composer\Autoload;
 
-class ComposerStaticInit88f2a4d4a4e81dc7d415bcdf39930654
+class ComposerStaticInita4fab8fe7069cf132d8088fb346f5c2a
 {
     public static $files = array (
         '9c7a683baffd24f5595c1dc5f5273030' => __DIR__ . '/..' . '/hyperf/engine/src/Functions.php',
@@ -735,6 +735,8 @@ class ComposerStaticInit88f2a4d4a4e81dc7d415bcdf39930654
         'App\\Controller\\IndexController' => __DIR__ . '/../..' . '/app/Controller/IndexController.php',
         'App\\Exception\\Handler\\AppExceptionHandler' => __DIR__ . '/../..' . '/app/Exception/Handler/AppExceptionHandler.php',
         'App\\Exception\\Handler\\JsonRpcExceptionHandler' => __DIR__ . '/../..' . '/app/Exception/Handler/JsonRpcExceptionHandler.php',
+        'App\\JsonRpc\\FooterService' => __DIR__ . '/../..' . '/app/JsonRpc/FooterService.php',
+        'App\\JsonRpc\\FooterServiceInterface' => __DIR__ . '/../..' . '/app/JsonRpc/FooterServiceInterface.php',
         'App\\JsonRpc\\LinkService' => __DIR__ . '/../..' . '/app/JsonRpc/LinkService.php',
         'App\\JsonRpc\\LinkServiceInterface' => __DIR__ . '/../..' . '/app/JsonRpc/LinkServiceInterface.php',
         'App\\JsonRpc\\PublicRpcService' => __DIR__ . '/../..' . '/app/JsonRpc/PublicRpcService.php',
@@ -763,9 +765,11 @@ class ComposerStaticInit88f2a4d4a4e81dc7d415bcdf39930654
         'App\\Model\\Website' => __DIR__ . '/../..' . '/app/Model/Website.php',
         'App\\Model\\WebsiteCategory' => __DIR__ . '/../..' . '/app/Model/WebsiteCategory.php',
         'App\\Model\\WebsiteColumn' => __DIR__ . '/../..' . '/app/Model/WebsiteColumn.php',
+        'App\\Model\\WebsiteGroup' => __DIR__ . '/../..' . '/app/Model/WebsiteGroup.php',
         'App\\Model\\WebsiteRole' => __DIR__ . '/../..' . '/app/Model/WebsiteRole.php',
         'App\\Model\\WebsiteRoleUser' => __DIR__ . '/../..' . '/app/Model/WebsiteRoleUser.php',
         'App\\Model\\WebsiteTemplateInfo' => __DIR__ . '/../..' . '/app/Model/WebsiteTemplateInfo.php',
+        'App\\Service\\MinioService' => __DIR__ . '/../..' . '/app/Service/MinioService.php',
         'App\\Tools\\Result' => __DIR__ . '/../..' . '/app/Tools/Result.php',
         'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
         'Aws\\ACMPCA\\ACMPCAClient' => __DIR__ . '/..' . '/aws/aws-sdk-php/src/ACMPCA/ACMPCAClient.php',
@@ -6392,9 +6396,9 @@ class ComposerStaticInit88f2a4d4a4e81dc7d415bcdf39930654
     public static function getInitializer(ClassLoader $loader)
     {
         return \Closure::bind(function () use ($loader) {
-            $loader->prefixLengthsPsr4 = ComposerStaticInit88f2a4d4a4e81dc7d415bcdf39930654::$prefixLengthsPsr4;
-            $loader->prefixDirsPsr4 = ComposerStaticInit88f2a4d4a4e81dc7d415bcdf39930654::$prefixDirsPsr4;
-            $loader->classMap = ComposerStaticInit88f2a4d4a4e81dc7d415bcdf39930654::$classMap;
+            $loader->prefixLengthsPsr4 = ComposerStaticInita4fab8fe7069cf132d8088fb346f5c2a::$prefixLengthsPsr4;
+            $loader->prefixDirsPsr4 = ComposerStaticInita4fab8fe7069cf132d8088fb346f5c2a::$prefixDirsPsr4;
+            $loader->classMap = ComposerStaticInita4fab8fe7069cf132d8088fb346f5c2a::$classMap;
 
         }, null, ClassLoader::class);
     }

Some files were not shown because too many files changed in this diff