Parcourir la source

上传文件至 'mpwechatApp/src/main/java/com/liangjian11/wx/mp/mapper'

liaoyongfei il y a 4 ans
Parent
commit
d96b26580d

+ 18 - 0
mpwechatApp/src/main/java/com/liangjian11/wx/mp/mapper/MaterialMapper.java

@@ -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);
+
+}