| | |
| | | c.title categoryName, |
| | | b.goods_name targetName |
| | | FROM mall_news_info a |
| | | inner join mall_news_category c on a.category_id=c.id |
| | | <if test="record.code != null and record.code != ''"> |
| | | and c.code=#{record.code} |
| | | </if> |
| | | left join mall_goods b on a.target_id = b.id |
| | | left join mall_news_category c on a.category_id=c.id |
| | | group by a.id |
| | | order by a.CREATED_TIME desc |
| | | </select> |
| | | |
| | | <select id="selectNewsVoInPage" resultType="cc.mrbird.febs.mall.vo.NewsListVo"> |
| | | select * from mall_news_info |
| | | select * from mall_news_info newsInfo |
| | | inner join mall_news_category category on newsInfo.category_id=category.id |
| | | <where> |
| | | 1=1 |
| | | <if test="record.categoryId != null"> |
| | | and category_id=#{record.categoryId} |
| | | and newsInfo.category_id=#{record.categoryId} |
| | | </if> |
| | | <if test="record.code != null and record.code != ''"> |
| | | and category.code=#{record.code} |
| | | </if> |
| | | <if test="record.isTop != null"> |
| | | and is_top=#{record.isTop} |
| | | and newsInfo.is_top=#{record.isTop} |
| | | </if> |
| | | </where> |
| | | order by CREATED_TIME desc |
| | | order by newsInfo.CREATED_TIME desc |
| | | </select> |
| | | </mapper> |