|
|
@@ -1,8 +1,12 @@
|
|
|
package com.nb.web.service.bus.mapper;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.nb.web.api.entity.AppArticleEntity;
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
|
+import org.apache.ibatis.annotations.Param;
|
|
|
+import org.apache.ibatis.annotations.Select;
|
|
|
|
|
|
/**
|
|
|
* @author lifang
|
|
|
@@ -14,4 +18,11 @@ import org.apache.ibatis.annotations.Mapper;
|
|
|
@Mapper
|
|
|
public interface AppArticleMapper extends BaseMapper<AppArticleEntity> {
|
|
|
|
|
|
+ @Select("select id,title,type,back_links,\n" +
|
|
|
+ "left(content , 150) as content,\n" +
|
|
|
+ "url,\n" +
|
|
|
+ "create_time,create_by,update_time,update_by\n" +
|
|
|
+ "from app_article\n" +
|
|
|
+ "where type=#{type} order by create_time;")
|
|
|
+ IPage<AppArticleEntity> listPage(Page page, @Param("type") int type);
|
|
|
}
|