huanghongfa
2021-05-28 54ad966d0b142c97fc659263b51d1ea5d7b5c7c6
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java
@@ -465,6 +465,26 @@
    }
    /**
     * 随手拍删除
     *
     * @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 查询参数
@@ -1541,11 +1561,9 @@
    @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) {