From df1de6a8ca9bf6af14d858fb51d077c00dd2dd48 Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期五, 23 七月 2021 13:08:41 +0800 Subject: [PATCH] 修改bug --- springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/EldersAuthApi.java | 50 +++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 43 insertions(+), 7 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/EldersAuthApi.java b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/EldersAuthApi.java index 4433ce4..81c0a54 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/EldersAuthApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/EldersAuthApi.java @@ -9,12 +9,12 @@ import com.panzhihua.common.model.dtos.elders.ComEldersAuthUserAddAppDTO; import com.panzhihua.common.model.vos.LoginUserInfoVO; import com.panzhihua.common.model.vos.R; -import com.panzhihua.common.model.vos.community.ComActVO; -import com.panzhihua.common.model.vos.community.ComEldersAuthUserVO; +import com.panzhihua.common.model.vos.community.*; import com.panzhihua.common.model.vos.elders.ComElderAuthUserAppVO; import com.panzhihua.common.model.vos.elders.ComElderAuthUserDetailVO; import com.panzhihua.common.model.vos.user.ComMngFamilyInfoVO; import com.panzhihua.common.service.community.CommunityService; +import com.panzhihua.common.service.user.UserService; import com.panzhihua.common.utlis.ClazzUtils; import com.panzhihua.common.utlis.StringUtils; import com.panzhihua.common.utlis.TencentUtils; @@ -26,8 +26,6 @@ import com.panzhihua.common.model.vos.IPageVO; import javax.annotation.Resource; -import com.panzhihua.common.model.vos.community.EldersAuthDetailsVO; -import com.panzhihua.common.model.vos.community.EldersAuthVO; /** * @@ -43,6 +41,8 @@ @Resource private CommunityService eldersAuthService; + @Resource + private UserService userService; /** * 分页查找 @@ -78,11 +78,11 @@ /** * 新增高龄认证 - * @param {classNameFirstLower}AddDTO 添加高龄认证传递对象 + * @param eldersAuthAddByFamilyDTO 添加高龄认证传递对象 * @return 新增结果 */ @PostMapping("/addByFamily") - @ApiOperation(value = "通过家庭成员新增高龄认证", response = R.class) + @ApiOperation(value = "新增高龄认证", response = R.class) R addByFamily(@RequestBody EldersAuthAddByFamilyDTO eldersAuthAddByFamilyDTO){ eldersAuthAddByFamilyDTO.setSumitUserId(getUserId()); eldersAuthAddByFamilyDTO.setUserId(getUserId()); @@ -114,7 +114,7 @@ return R.ok(result); }else{ log.error("查询老人信息失败,错误信息:" + isOk.getMsg()); - return R.fail("查询老人信息失败"); + return isOk; } } @@ -182,4 +182,40 @@ return eldersAuthService.editEldersByApp(authUserAddAppDTO); } + /** + * 分页查找 + * @param pageComEldersRecordsDTO 查找高龄认证记录 + * @return 查找结果 + */ + @PostMapping("/records") + @ApiOperation(value = "生存认证记录", response = EldersAuthVO.class) + R query(@Validated @RequestBody PageComEldersRecordsDTO pageComEldersRecordsDTO){ + ClazzUtils.setIfStringIsEmpty(pageComEldersRecordsDTO); + LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); + pageComEldersRecordsDTO.setOperUserId(loginUserInfoVO.getUserId()); + pageComEldersRecordsDTO.setOperUserName(loginUserInfoVO.getNickName()); + return eldersAuthService.queryEldersRecord(pageComEldersRecordsDTO); + } + + /** + * 查询高龄老人库详细信息 + * @param id 高龄老人库 id + * @return 查找结果 + */ + @GetMapping("/records/{id}") + @ApiOperation(value = "认证详情详细信息") + R<ComEldersAuthElderlyDetailsVO> detail(@PathVariable("id") Long id){ + return eldersAuthService.comEldersAuthElderlyDetails(id); + } + + @GetMapping("/no/tips") + @ApiOperation(value = "高龄认证不再显示提示") + public R noTips(){ + LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); + if(loginUserInfoVO == null){ + return R.fail("请先登录"); + } + return userService.noTips(loginUserInfoVO.getUserId()); + } + } \ No newline at end of file -- Gitblit v1.7.1