摘要: 分页工具类 import cn.hutool.core.lang.Assert; import com.github.pagehelper.PageInfo; import com.google.common.collect.Lists; import org.springframework.uti 阅读全文
posted @ 2023-06-12 20:52 张释文 阅读(227) 评论(1) 推荐(0) 编辑
摘要: 代码示例: 注意Service中的返回值必须要和mapper中的返回值类型的 @Override public PageInfo<UserDO> test(ReqQueryDTO req) { PageHelper.startPage(req.getPageNumber(), req.getPage 阅读全文
posted @ 2023-06-12 20:31 张释文 阅读(4) 评论(0) 推荐(0) 编辑
摘要: postgresql中根据条件创建一个虚拟字段。 条件是:如果id = 786168753672753152 就将marked字段设置为true否则设置为false,最后按照marked进行排序。 select name, id, case when id = 786168753672753152 阅读全文
posted @ 2023-06-12 17:30 张释文 阅读(53) 评论(0) 推荐(0) 编辑
摘要: 代码示例如下: @InterceptorIgnore(tenantLine = "1")public interface UserMapper extends BaseMapper<User> { @Select("SELECT * FROM user ${ew.customSqlSegment}" 阅读全文
posted @ 2023-06-12 15:05 张释文 阅读(160) 评论(0) 推荐(0) 编辑