随笔分类 -  Java / Java实践相关

项目实践中不断累计的经验
摘要:效果: 接口返回数据: vue2前端代码: getTree() { this.listLoading = true getAcademyTree().then(response => { console.log(response.data) this.classData = response.dat 阅读全文
posted @ 2022-10-14 09:58 joyfulest 阅读(289) 评论(0) 推荐(0) 编辑
摘要:Vue: 导出组件: <v-toolbar ref="toolbar" :top-line="true" :column-flag="false"> <template slot="left"> <el-button type="success" plain icon="el-icon-downlo 阅读全文
posted @ 2022-06-13 09:03 joyfulest 阅读(29) 评论(0) 推荐(0) 编辑
摘要:根据业务需要根据 List 元素的某个字段进行大小排序,用 List 的流里的sort 方法: List<ReiFmsProjectVO> newList = voList.stream(). sorted(Comparator.comparing(ReiFmsProjectVO::getPerce 阅读全文
posted @ 2022-06-02 10:17 joyfulest 阅读(6598) 评论(0) 推荐(1) 编辑
摘要:方法一:Impl内(最普通的方法,强转)Long result = Long.valueOf((long) ((((Double.valueOf(r.getInitalQuota())) - (Double.valueOf(r.getProBalance()))) / (Double.valueOf 阅读全文
posted @ 2022-05-31 09:53 joyfulest 阅读(4392) 评论(0) 推荐(0) 编辑
摘要://去重List<BudgetSchemeInfo> templates = this.list().stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparato 阅读全文
posted @ 2022-04-07 09:44 joyfulest 阅读(26) 评论(0) 推荐(0) 编辑
摘要:注:内容来源于网络,用于学习借鉴 一、直接把list怼进Mysql 使用mybatis的批量导入操作: @Transactional(rollbackFor = Exception.class) public int addFreshStudentsNew2(List<FreshStudentAnd 阅读全文
posted @ 2022-04-01 10:37 joyfulest 阅读(904) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-03-31 11:00 joyfulest 阅读(660) 评论(0) 推荐(0) 编辑
摘要:描述:根据部门ID查询数据库,没有则增加//部门ListList<BudgetSchemeInfo> budgetSchemeInfoList=Lists.newArrayListWithExpectedSize(vo.getDept().size()); //循环部门IDfor (String i 阅读全文
posted @ 2022-03-29 17:21 joyfulest 阅读(49) 评论(0) 推荐(0) 编辑
摘要:前提:由于我当前页面显示的数据 是在其他两个表中 只有ID可以使用 1、分别对两个表进行操作,将List转为Map对象 //查询项目表List<BudgetProjectInfo> budgetProjectInfoList = budgetProjectInfoService.list();Map 阅读全文
posted @ 2022-03-21 19:00 joyfulest 阅读(1451) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示