- 博客(7)
- 资源 (1)
- 收藏
- 关注
原创 list转page实现分页
Page<CoProductModel> page = new Page<>(vo.getCurrent(), vo.getSize());//y页数,每页长度ArrayList<CoProductModel> list = new ArrayList<>();int startIndex = Math.toIntExact(Math.min((vo.getCurrent() - 1) * vo.getSize(), list.size()));int en
2022-07-05 09:56:11
948
原创 json合并代码,并且相同value相加,不同合并
String fieldJson1 = coProductModel.getFieldJson();JSONObject json = JSON.parseObject(fieldJson);//相同的名称的jsonJSONObject json1 = JSON.parseObject(fieldJson1);//已经保存的,解析出来相加// 覆盖目标JSON为空,直接返回覆盖源if (json1 == null) { for (String key : json.keySet()) {
2022-07-05 09:52:44
632
原创 JAVA代码中上传文件
@PostMapping("/upload")public ResultVo upload( @RequestParam("file") MultipartFile file,Map paramMap) throws IOException { ResultVo resultVo = new ResultVo(); System.out.println("准备上传"); if (file.isEmpty()) { throw new RuntimeExceptio.
2021-09-10 19:18:44
153
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人