wupengfei 1 gadu atpakaļ
vecāks
revīzija
4bd76a102f

+ 6 - 4
.idea/workspace.xml

@@ -3,7 +3,9 @@
   <component name="ChangeListManager">
     <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" name="Default Changelist" comment="">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/mall/view/banner/index_search.html" beforeDir="false" afterPath="$PROJECT_DIR$/application/mall/view/banner/index_search.html" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/Expedite.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Expedite.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/common/service/UserSynth.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/common/service/UserSynth.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/mall/controller/Banner.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/mall/controller/Banner.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -342,7 +344,7 @@
       <workItem from="1686099289251" duration="14697000" />
       <workItem from="1686185290776" duration="11151000" />
       <workItem from="1686272379784" duration="7472000" />
-      <workItem from="1686291607151" duration="4626000" />
+      <workItem from="1686291607151" duration="5061000" />
     </task>
     <servers />
   </component>
@@ -472,10 +474,10 @@
       <screen x="0" y="0" width="2560" height="1400" />
     </state>
     <state x="1410" y="539" key="#com.intellij.fileTypes.FileTypeChooser/0.0.2560.1400@0.0.2560.1400" timestamp="1684374232836" />
-    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog" timestamp="1686042823663">
+    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog" timestamp="1686296612793">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>
-    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog/0.0.2560.1400@0.0.2560.1400" timestamp="1686042823663" />
+    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog/0.0.2560.1400@0.0.2560.1400" timestamp="1686296612793" />
     <state x="420" y="147" width="1942" height="1088" key="DiffContextDialog" timestamp="1686188652934">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>

+ 10 - 5
application/api/controller/Expedite.php

@@ -33,6 +33,7 @@ use app\common\model\UserMessage;
 use app\common\model\UserSearch;
 use app\common\model\VideoCommentLike;
 use app\common\model\VideoUrl;
+use app\common\service\CheckPower;
 use app\common\service\Elastic;
 use Dm\Request\V20151123 as Dm;
 use library\tools\Data;
@@ -59,18 +60,22 @@ class Expedite extends Base
      * @url /api/Expedite/getBanner
      * @method GET
      * @header name:Authorization require:1 desc:Token
-     * @param  name:place type:int  default:1 desc:展示位置1视频首页
      * @param  name:num type:int  default:5 desc:查询数量
      * @return name:cover type:srting default:-- desc:图片路径
-     * @return name:link type:srting default:-- desc:链接
+     * @return name:place type:srting default:-- desc:跳转模块【video=>视频,article=>图文,datum=>资料,activity=>活动,demand=>需求,forum=>问答,press=>新闻,supplier=>供应商商品,recruit=>招聘,mall=>商城】
+     * @return name:first_id type:int default:-- desc:详情id(视频、图文、资料为系列id)
+     * @return name:second_id type:second_id default:-- desc:系列某详情id(视频、图文、资料)
+     * @return name:is_normal type:int default:-- desc:是否是正常记录(0已删除或是已禁用1可以正常跳转详情)
      */
     public function getBanner()
     {
         $num = input('get.num',5);
-        $place = input('get.place',1);
-        $list = StoreBanner::field('id,cover,link')
-            ->where(['is_deleted'=>0,'place'=>$place])->limit(0,$num)
+        $list = StoreBanner::field('id,cover,place,first_id,second_id')
+            ->where(['is_deleted'=>0])->limit(0,$num)
             ->order('sort desc ,id desc')->select()->toArray();
+        foreach ($list as &$v){
+            $v['is_normal'] = CheckPower::checkModulesPower($v['first_id'],$v['second_id'],$v['place']);
+        }
         $this->success('ok',['list'=>$list]);
     }
 

+ 1 - 1
application/common/service/UserSynth.php

@@ -149,7 +149,7 @@ class UserSynth extends SerBase
             $v['children'] = $v['item_children'];
             unset($v['item_children']);
         });
-        $supplier_goods =  SupplierGoods::alias('g')->field('g.id,g.supplier_id,g.name title,IF(g.id,\'supplier_goods\',0) module')->where(['g.is_deleted'=>0])
+        $supplier_goods =  SupplierGoods::alias('g')->field('g.id,g.supplier_id,g.name title,IF(g.id,\'supplier\',0) module')->where(['g.is_deleted'=>0])
             ->leftJoin('Supplier s', 's.id = g.supplier_id')->select()->toArray();
         return array_merge($video,$datum,$article,$supplier_goods);
        // return compact(['video','datum','article','supplier_goods']);

+ 1 - 1
application/mall/controller/Banner.php

@@ -138,7 +138,7 @@ class Banner extends Controller
             'video'=>'视频',
             'datum'=>'资料',
             'article'=>'图文',
-            'supplier_goods'=>'供应商商品',
+            'supplier'=>'供应商商品',
         ];
         $this->module_list= UserSynth::getAllModuleTitle();
     }