mybatis
冰淇淋@
这个作者很懒,什么都没留下…
展开
-
MyBatis-Plus-LambdaQueryWrapper用法
【代码】MyBatis-Plus-LambdaQueryWrapper用法。原创 2024-07-23 17:42:01 · 136 阅读 · 0 评论 -
MyBatis-Plus-QueryWrapper用法
【代码】MyBatis-Plus-QueryWrapper用法。原创 2024-07-23 17:43:57 · 117 阅读 · 0 评论 -
MyBatis-Plus 关联查询
【代码】MyBatis-Plus 关联查询。原创 2024-07-12 13:26:54 · 376 阅读 · 0 评论 -
mybatis批量修改(使用case when构建批量更新)
【代码】mybatis批量修改(使用case when构建批量更新)原创 2023-08-04 18:35:27 · 420 阅读 · 0 评论 -
mybatis查询时间段和数据库中的时间是否有重合
【代码】mybatis查询时间段和数据库中的时间是否有重合。原创 2023-06-12 15:39:17 · 822 阅读 · 0 评论 -
当前时间和结束时间相距多少秒
#两个时间段相距多少TIMESTAMPDIFF(unit,beginTime,endTime);#unit的值SECOND 秒 MINUTE 分钟 HOUR 小时DAY 天 WEEK 周 MONTH 月份 YEAR 年份#例子:当前时间和结束时间相距多少秒TIMESTAMPDIFF(second,now(),endTime);...原创 2022-03-09 11:18:35 · 125 阅读 · 0 评论 -
mybatis用in查询有多个参数
List<Map<String, Object>> getList(@Param("userId")String userId,@Param("list")List<String> ids);<select id="getList" resultType="map"> SELECT * FROM tb_test WHERE userId = #{userId} and id in <foreach close=")" colle.原创 2021-05-25 13:57:09 · 1778 阅读 · 0 评论 -
mybatis中大于小于号转义字符
< < > >原创 2020-12-24 11:23:48 · 2364 阅读 · 0 评论 -
mybatis批量新增和批量修改
批量新增<insert id="saveChapterBatch"> INSERT INTO jnhn_chapter(chapterId,parentId,coursesId,chapterNumber,chapterName,resources,timeLen,contentType,insertTime) VALUES <foreach collection="list" item="item" separator=",">原创 2021-08-26 15:42:24 · 185 阅读 · 0 评论 -
sql时间格式化
DATE_FORMAT(date,format);例子:select id, DATE_FORMAT(time, '%Y-%m-%d %H:%i:%s') as time from tb_test;原创 2021-07-11 10:10:42 · 255 阅读 · 0 评论 -
sql时间格式化
SELECT DATE_FORMAT(buyTime, '%Y-%m-%d %H:%i:%s' ) as buyTime FROM tb_test原创 2021-06-17 11:33:37 · 421 阅读 · 0 评论 -
sql 手机号中间四位用*号隐藏
select insert(phone,4,4, '****') as phone from tb_test原创 2021-06-11 14:32:13 · 722 阅读 · 0 评论 -
which is not functionally dependent on columns in GROUP BY clause; sql_mode=only_full_group_by
这个wSELECT any_value(content) AS content,teacherId FROM yhzx_dynamic GROUP BY teacherId;原创 2021-05-31 11:10:51 · 278 阅读 · 0 评论 -
mybatis防止字段为空时不显示
SELECT IFNULL(xh,'') AS xh FROM tb_test原创 2021-05-26 10:12:38 · 260 阅读 · 0 评论