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