@@ -35,4 +35,6 @@ public interface SysNewsInformationDao extends BaseDAO<Long, SysNewsInformation>
List<SysNewsInformation> queryNeedUpdateStatusList();
SysNewsInformationDto queryById(Long id);
+
+ List<SysNewsInformation> queryBySubType(@Param("subType") Integer subType, @Param("memo") String memo);
}
@@ -305,4 +305,15 @@
left join sys_news_type snts on sni.sub_type_ = snts.id_
where sni.id_ = #{id}
</select>
+ <select id="queryBySubType" resultMap="SysNewsInformation">
+ SELECT * FROM sys_news_information
+ WHERE del_flag_=0
+ AND status_=1
+ <if test="subType != null">
+ AND sub_type_ = #{subType}
+ </if>
+ <if test="memo != null and memo !=''">
+ AND memo_ = #{memo}
+ </select>
</mapper>