luo
2023-12-08 1300cd0e47d9f0890d972bafeba888d10395ed38
guns-management/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/EncyclopedicKnowledgeMapper.xml
@@ -11,4 +11,20 @@
        content_text as content
        from t_encyclopedic_knowledge where sys_data_type_id = #{typeId} order by insert_time desc
    </select>
    <select id="list" resultType="com.stylefeng.guns.modular.system.model.EncyclopedicKnowledge">
        SELECT kn.id,ty.`name` as type ,kn.title,kn.content,us.`name`,kn.insert_time as insertTime
        FROM t_encyclopedic_knowledge kn
                 LEFT JOIN t_sys_data_type ty ON kn.sys_data_type_id = ty.id
                 LEFT JOIN sys_user us ON kn.create_by = us.id
          <where>
              <if test="null != type ">
                  and kn.sys_data_type_id = #{type}
              </if>
          </where>
    </select>
</mapper>