From 54ad966d0b142c97fc659263b51d1ea5d7b5c7c6 Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期五, 28 五月 2021 16:17:08 +0800
Subject: [PATCH] 修改bug

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java |   26 ++++++++++++++++++++++----
 1 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java
index 1c4f11c..112cc5f 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java
+++ b/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) {

--
Gitblit v1.7.1