|
@@ -0,0 +1,18 @@
|
|
|
+package com.liangjian11.wx.mp.mapper;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
|
+import com.liangjian11.wx.mp.modle.Material;
|
|
|
+import org.apache.ibatis.annotations.Param;
|
|
|
+import org.apache.ibatis.annotations.Select;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+
|
|
|
+public interface MaterialMapper extends BaseMapper<Material> {
|
|
|
+
|
|
|
+ @Select("select count(1) from material ${sqlStr}")
|
|
|
+ Integer getMaterialCount(@Param("sqlStr")String sqlStr);
|
|
|
+
|
|
|
+ @Select("SELECT m.* from material m ${sqlStr} ORDER BY m.create_time DESC offset #{index} rows fetch next #{size} rows only")
|
|
|
+ List<Material> getMaterialPageList(@Param("sqlStr")String sqlStr, @Param("index")Integer index, @Param("size")Integer size);
|
|
|
+
|
|
|
+}
|