limeng hai 5 meses
pai
achega
79b90c5e40

+ 1 - 0
zhjq-business/src/main/java/com/zhjq/domain/ZhjqArticle.java

@@ -19,6 +19,7 @@ import java.util.List;
  */
 @Data
 public class ZhjqArticle extends BaseEntity {
+
     private static final long serialVersionUID = 1L;
 
     /**

+ 7 - 7
zhjq-system/src/main/resources/mapper/system/SysNoticeMapper.xml

@@ -116,12 +116,12 @@
     </delete>
 
     <select id="selectNoticeListApp" parameterType="SysNotice" resultMap="SysNoticeResult">
-        <include refid="selectNoticeVo"/>
-        where status = 0
-        ORDER BY
-        is_top desc,release_time desc
-        <if test="limit != null and limit != ''">
-            limit #{limit}
-        </if>
+        SELECT r1.*
+        FROM sys_notice r1
+                 INNER JOIN (
+            SELECT is_top, MAX(create_time) as latest
+            FROM sys_notice
+            GROUP BY is_top
+        ) r2 ON r1.is_top = r2.is_top AND r1.create_time = r2.latest;
     </select>
 </mapper>