| | |
| | | } |
| | | |
| | | /** |
| | | * 随手拍删除 |
| | | * |
| | | * @param id 随手拍主键 |
| | | * @param userId 登录用户 |
| | | * @return 详情内容 |
| | | */ |
| | | @PostMapping("deleteEasyPhoto") |
| | | public R deleteEasyPhoto(@RequestParam("id") Long id, @RequestParam("userId") Long userId) { |
| | | ComActEasyPhotoDO comActEasyPhotoDO = comActEasyPhotoService.getBaseMapper().selectById(id); |
| | | if(comActEasyPhotoDO==null){ |
| | | return R.fail("随手拍不存在"); |
| | | } |
| | | comActEasyPhotoDO.setDelTag(1); |
| | | int updateById = comActEasyPhotoService.getBaseMapper().updateById(comActEasyPhotoDO); |
| | | if(updateById==1){ |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | /** |
| | | * 分页查询微心愿 |
| | | * |
| | | * @param comActMicroWishVO 查询参数 |
| | |
| | | @PostMapping("/eldersauth/getMyfamilyElders/{userId}") |
| | | R<List<ComMngFamilyInfoVO>> getMyfamilyElders(@PathVariable("userId") Long userId){ |
| | | List<ComMngFamilyInfoVO> list = comMngPopulationDAO.listFamilyByUserId(userId); |
| | | |
| | | List<ComMngFamilyInfoVO> sortedList = list.stream().sorted(Comparator.comparing(ComMngFamilyInfoVO::getCreateAt).reversed()).collect(Collectors.toList()); |
| | | |
| | | |
| | | List<ComMngFamilyInfoVO> listRt = new ArrayList<>(); |
| | | sortedList.forEach(rt -> { |
| | | list.forEach(rt -> { |
| | | int age = IdCard.IdNOToAge(rt.getIdCard()); |
| | | boolean isElders = age >= 80; |
| | | if (isElders) { |