
mybatis
文章平均质量分 54
日常开发总结
yyclassmv王
书山有路勤为径,学海无涯苦作舟!
展开
-
mybatis-plus 时间范围查询
mybatis-plus 时间范围查询,适合时间搜索框原创 2022-11-08 11:10:31 · 2407 阅读 · 0 评论 -
mybatis中resultMap简单使用以及关联查询
文章目录1. resulttype和resultMap2. resultMap简单使用2.1 实体类2.2 数据库字段2.3 controller层2.4 dao层2.5 mapper层结果3. 使用resultMap进行关联查询3.1 一对一查询3.1.1 实体类3.1.2 数据库字段3.1.3 mapper 层3.1.4 查询结果3.2 一对多查询3.2.1 修改实体类3.2.2 修改mapper3.2.3 结果1. resulttype和resultMap当查询接口需要查询数据库时,通常我们会封装原创 2022-05-05 12:27:55 · 3229 阅读 · 0 评论 -
mybatis使用foreach插入map或者list对象
文章目录1. 插入mapcontroller 层dao层mapper层结果2. 插入list对象对象实体类controller层请求参数dao层mapper层结果1. 插入map为了方便就不要service层了controller 层Map<Integer,String> map=new HashMap(); map.put(5,"sb"); map.put(6,"dsb"); map.put(7,"wbd");原创 2022-04-28 14:30:04 · 4112 阅读 · 0 评论 -
springboot统一异常处理类
文章目录定义统一异常处理类定义统一异常处理类@RestControllerAdvice@Slf4jpublic class GlobalExceptionHandler{ @ExceptionHandler(ShiroException.class) public JsonResult doShiroException(ShiroException e){ JsonResult r=new JsonResult(); r.setState(0);原创 2022-03-07 14:47:58 · 452 阅读 · 0 评论