<?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="com.wzj.soopin.content.mapper.ArticleMapper">



    <select id="selectVoById" resultType="com.wzj.soopin.content.domain.vo.ArticleVO">
        select a.* ,b.name as category_name from cont_article a left join cont_article_category b on a.category_id=b.id
        WHERE id = #{id}
        ORDER BY create_time DESC

    </select>

    <select id="selectVoList" resultType="com.wzj.soopin.content.domain.vo.ArticleVO">
        select a.*,b.name as category_name from (select *  from cont_article
        ${ew.customSqlSegment} ) a
        left join cont_article_category b on a.category_id=b.id
        order by a.create_time desc
    </select>

</mapper>

