java
Heart_B
这个作者很懒,什么都没留下…
展开
-
intValue()和ValueOf()是数据类型转化的两个方法。
intValue()和ValueOf()是数据类型转化的两个方法。intValue()du 如Integer类型,就会有intValue()方法,zhi意思是说,把daoInteger类型转化为Int类型。valueOf() 如String就有valueOf()方法,意思是说,要把参数中给的值,转化为String类型,Integer的valueOf()就是把参数给的值,转化为Integer类型。...原创 2020-08-09 15:04:14 · 486 阅读 · 0 评论 -
BeanUtils.copyProperties()用法
Spring BeanUtils类提供属性字段复制方法1.public static void copyProperties(Object source, Object target)内部都是调用下面的私有方法2.public static void copyProperties(Object source, Object target, String… ignoreProperties)内部都是调用下面的私有方法,ignoreProperties可以是一组需要忽略复制的字符串3.public s原创 2020-07-31 21:11:29 · 844 阅读 · 0 评论 -
解决 javaweb后端传json值给前端date丢失问题
在属性的get方法上加上注解对时间进行格式化(@JsonFormat(pattern = “yyyy-MM-dd HH:mm:ss”, timezone = “GMT+8”))@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") private Date createTime;原创 2020-07-24 08:43:23 · 383 阅读 · 0 评论 -
父级、子集下拉树递归列表
获取部门下拉树列表Controller @GetMapping("/treeSelectAll") public AjaxResult treeSelectAll(SysDept sysDept){ LoginUser loginUser = SecurityUtils.getLoginUser();//获取用户信息 Long userId = loginUser.getUserId(); List<SysDept> depts = d原创 2020-07-23 11:19:09 · 289 阅读 · 0 评论 -
查询父节点、子节点集合
查询父节点集合@GetMapping("/selectDeptParentList") public AjaxResult selectDeptParentList(@RequestParam Long parentId){ List<SysDept> list = deptService.selectDeptParentList(parentId); if(list.size()>0 && list != null){原创 2020-07-23 10:06:30 · 280 阅读 · 0 评论 -
查询部门列表(排除子节点)
查询部门列表(排除子节点)@GetMapping("/list/excludeChild/{deptId}")public AjaxResult excludeChild(@PathVariable(value = "deptId",required = false) Long deptId){ List<SysDept> depts = deptService.selectDeptList(new SysDept()); Iterator<SysDept> it = dep原创 2020-07-23 09:27:54 · 487 阅读 · 0 评论