<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.oroqen.mapper.OroqenCultureContentMapper">

    <!-- 查询推荐文化内容 -->
    <select id="selectRecommended" resultType="org.jeecg.modules.oroqen.entity.OroqenCultureContent">
        SELECT * FROM oroqen_culture_content 
        WHERE is_recommended = 1 
        AND status = 1 
        ORDER BY sort_order ASC, create_time DESC 
        LIMIT 10
    </select>

    <!-- 根据分类ID查询文化内容 -->
    <select id="selectByCategoryId" resultType="org.jeecg.modules.oroqen.entity.OroqenCultureContent">
        SELECT * FROM oroqen_culture_content 
        WHERE category_id = #{categoryId} 
        AND status = 1 
        ORDER BY sort_order ASC, create_time DESC
    </select>

</mapper>