wupengfei 2 rokov pred
rodič
commit
1e21a1faa4

+ 2 - 2
.idea/workspace.xml

@@ -3,7 +3,7 @@
   <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/operate/view/recruit/form.html" beforeDir="false" afterPath="$PROJECT_DIR$/application/operate/view/recruit/form.html" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/Mall.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Mall.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -171,7 +171,7 @@
       <workItem from="1666746114555" duration="18673000" />
       <workItem from="1666833605829" duration="20099000" />
       <workItem from="1666919224277" duration="14611000" />
-      <workItem from="1666942232176" duration="2777000" />
+      <workItem from="1666942232176" duration="2966000" />
     </task>
     <servers />
   </component>

+ 1 - 1
application/api/controller/Mall.php

@@ -89,7 +89,7 @@ class Mall extends Base
         $field = 'a.id,name,cover,low_price,IFNULL(is_recommend,0) is_recommend ';
         $table = 'dd_store_goods';
         $order_by_two = 'id';
-        $sql = "SELECT $field FROM " .$table . " a LEFT JOIN ( SELECT id,IF(id,1,1) is_recommend FROM $table b WHERE ( $where_str )) AS c ON c.id = a.id ORDER BY is_recommend DESC , $order_by_two desc LIMIT {$this->off_set},{$this->page_num}";
+        $sql = "SELECT $field FROM " .$table . " a LEFT JOIN ( SELECT id,IF(id,1,1) is_recommend FROM $table b WHERE ( $where_str )) AS c ON c.id = a.id WHERE a.status =1 AND a.is_deleted = 0 ORDER BY is_recommend DESC , $order_by_two desc LIMIT {$this->off_set},{$this->page_num}";
         $list = Db::query($sql);
         $this->success('ok',['list'=>$list]);
     }