springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -3652,6 +3652,7 @@ * @author txb * @date 2021/9/10 16:03 */ @PutMapping("/elders/pensionAuthRecords/authType/{type}") R setPensionAuthType(@RequestParam("communityId") Long communityId, @RequestParam("type") Integer type); /** @@ -5576,4 +5577,21 @@ */ @GetMapping("/reserve/list") R reserveListApplets(@RequestParam("communityId") Long communityId); /** * 查询社区高龄认证方式(1.视频认证 2.人脸核验) * @param eldersAuthTypeQueryDTO 请求参数 * @return 社区高龄认证方式(1.视频认证 2.人脸核验) */ @PostMapping("/elders/authtype") R communityEldersAuthType(@RequestBody EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO); /** * 设置当前社区高龄认证方式:核验类型(1.视频认证 2.人脸核验) * @param communityId 社区id * @param type 检验类型 * @return R 设置结果 */ @PutMapping("/elders/authType/{type}") R setEldersAuthType(@RequestParam("communityId") Long communityId, @RequestParam("type") Integer type); } springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/EldersAuthApi.java
@@ -731,6 +731,24 @@ return communityService.setPensionAuthType(this.getCommunityId(), type); } @ApiOperation(value = "查询社区高龄认证方式", response = R.class) @GetMapping("/authtype") public R communityAuthType() { Long communityId = this.getCommunityId(); EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO = new EldersAuthTypeQueryDTO(); eldersAuthTypeQueryDTO.setCommunityId(communityId); return communityService.communityPensionAuthType(eldersAuthTypeQueryDTO); } @PutMapping("/authType/{type}") @ApiOperation(value = "设置当前社区高龄认证方式:核验类型(1.视频认证 2.人脸核验)", response = R.class) public R setAuthType(@PathVariable("type") Integer type) { if (type != 1 && type != 2) { return R.fail("参数错误"); } return communityService.setPensionAuthType(this.getCommunityId(), type); } private List<List<String>> headDataFilling() { List<List<String>> list = new ArrayList<List<String>>(); List<String> head0 = new ArrayList<String>(); springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/EldersAuthApi.java
@@ -426,5 +426,30 @@ return comPensionAuthRecordService.timedTaskPensionAuthStatisticsJobHandler(); } /** * 设置当前社区养老认证方式:核验类型(1.视频认证 2.人脸核验) * @param communityId 社区id * @param type 检验类型 * @return R 设置结果 * @author txb * @date 2021/9/10 16:03 */ @PutMapping("/authType/{type}") public R setAuthType(@RequestParam("communityId") Long communityId, @RequestParam("type") Integer type) { return eldersAuthService.setAuthType(communityId, type); } /** * 查询养老认证社区认证方式 setPensionAuthType 查询养老认证社区认证方式 * @param eldersAuthTypeQueryDTO 查询参数 * @return R 查询结果 * @author txb * @date 2021/9/10 16:03 */ @PostMapping("/authtype") public R communityAuthType(@RequestBody EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO) { return eldersAuthService.getAuthType(eldersAuthTypeQueryDTO); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/EldersAuthService.java
@@ -177,4 +177,19 @@ */ R timedTaskEldersRecordAuthJobHandler(); /** * 设置当前社区养老认证方式:核验类型(1.视频认证 2.人脸核验) setPensionAuthType 设置当前社区养老认证方式:核验类型(1.视频认证 2.人脸核验) * @param communityId 社区id * @param type 检验类型 * @return R 设置结果 */ R setAuthType(Long communityId, Integer type); /** * 查询养老认证社区认证方式 setPensionAuthType 查询养老认证社区认证方式 * @param eldersAuthTypeQueryDTO 查询参数 * @return R 查询结果 */ R getAuthType(EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComPensionAuthRecordServiceImpl.java
@@ -258,7 +258,7 @@ public R setPensionAuthType(Long communityId, Integer type) { List<SysConfDO> authConf = sysConfDao.selectList(new LambdaQueryWrapper<SysConfDO>().eq(SysConfDO::getCommunityId, communityId) .eq(SysConfDO::getCode, "PENSION_AUTH_TYPE").orderByDesc(SysConfDO::getCreateAt)); .eq(SysConfDO::getCode, "PENSION_AUTH_TYPE_" + communityId).orderByDesc(SysConfDO::getCreateAt)); if (authConf != null && authConf.size() > 0) { SysConfDO first = authConf.get(0); first.setValue(type + ""); @@ -274,10 +274,10 @@ public R communityPensionAuthType(EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO) { Long communityId = eldersAuthTypeQueryDTO.getCommunityId(); List<SysConfDO> confDOList = sysConfDao.selectList(new LambdaQueryWrapper<SysConfDO>() .eq(SysConfDO::getCommunityId, communityId).eq(SysConfDO::getCode,"PENSION_AUTH_TYPE").orderByDesc(SysConfDO::getCreateAt)); .eq(SysConfDO::getCommunityId, communityId).eq(SysConfDO::getCode,"PENSION_AUTH_TYPE_" + communityId).orderByDesc(SysConfDO::getCreateAt)); if (confDOList == null || confDOList.size() == 0) { SysConfDO sysConfDO = new SysConfDO(); sysConfDO.setCode("PENSION_AUTH_TYPE"); sysConfDO.setCode("PENSION_AUTH_TYPE_" + communityId); sysConfDO.setName("养老认证类型"); sysConfDO.setValue(2 + "");// 核验类型(1.视频认证 2.人脸核验) sysConfDO.setDescription("养老认证默认添加的核验类型"); springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/EldersAuthServiceImpl.java
@@ -595,4 +595,50 @@ }); return R.ok(); } @Override public R setAuthType(Long communityId, Integer type){ List<SysConfDO> authConf = sysConfDao.selectList(new LambdaQueryWrapper<SysConfDO>().eq(SysConfDO::getCommunityId, communityId) .eq(SysConfDO::getCode, "ELDER_AUTH_TYPE_" + communityId).orderByDesc(SysConfDO::getCreateAt)); if (authConf != null && authConf.size() > 0) { SysConfDO first = authConf.get(0); first.setValue(type + ""); int updated = sysConfDao.updateById(first); if (updated == 1) { return R.ok(); } } return R.fail(); } @Override public R getAuthType(EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO){ Long communityId = eldersAuthTypeQueryDTO.getCommunityId(); List<SysConfDO> confDOList = sysConfDao.selectList(new LambdaQueryWrapper<SysConfDO>() .eq(SysConfDO::getCommunityId, communityId).eq(SysConfDO::getCode,"ELDER_AUTH_TYPE_" + communityId).orderByDesc(SysConfDO::getCreateAt)); if (confDOList == null || confDOList.size() == 0) { SysConfDO sysConfDO = new SysConfDO(); sysConfDO.setCode("ELDER_AUTH_TYPE_" + communityId); sysConfDO.setName("高龄认证类型"); sysConfDO.setValue(2 + "");// 核验类型(1.视频认证 2.人脸核验) sysConfDO.setDescription("高龄认证默认添加的核验类型"); sysConfDO.setCommunityId(communityId); sysConfDO.setCreateBy(eldersAuthTypeQueryDTO.getUserId()); int inserted = sysConfDao.insert(sysConfDO); if (inserted != 1) { throw new ServiceException("添加高龄认证默认添加的核验类型失败"); } confDOList = sysConfDao.selectList(new LambdaQueryWrapper<SysConfDO>() .eq(SysConfDO::getCommunityId, communityId) .orderByDesc(SysConfDO::getCreateAt)); } if (confDOList != null && confDOList.size() > 0) { SysConfDO latest = confDOList.get(0); SysConfVO sysConfVO = new SysConfVO(); BeanUtils.copyProperties(latest, sysConfVO); return R.ok(sysConfVO.getValue()); } return R.ok(); } }