From d99a56e37cf9109b46ee68d34a06594ef5615ed3 Mon Sep 17 00:00:00 2001 From: 张天森 <1292933220@qq.com> Date: 星期四, 10 十一月 2022 16:06:05 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/huacheng_test' into huacheng_test --- springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/api/ComPropertyRepairApi.java | 31 +++++++++++++++++++++++++++++-- 1 files changed, 29 insertions(+), 2 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/api/ComPropertyRepairApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/api/ComPropertyRepairApi.java index edd36a1..a28e9c6 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/api/ComPropertyRepairApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/api/ComPropertyRepairApi.java @@ -38,6 +38,17 @@ } /** + * 分页查询所有数据 脱敏 + * @return 所有数据 + */ + @PostMapping("queryAllDesensitize") + public R selectAllDesensitize(@RequestBody CommonPage commonPage) { + return this.comPropertyRepairService.pageListDesensitize(commonPage); + } + + + + /** * 通过主键查询单条数据 * * @param id 主键 @@ -47,6 +58,19 @@ public R selectOne(@PathVariable("id") Long id) { return this.comPropertyRepairService.selectDetail(id); } + + + /** + * 通过主键查询单条数据 脱敏 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("desensitize/{id}") + public R selectOneDesensitize(@PathVariable("id") Long id) { + return this.comPropertyRepairService.selectDetailDesensitize(id); + } + /** * 新增数据 @@ -60,11 +84,14 @@ if(comPropertyRepairVO!=null){ BeanUtils.copyProperties(comPropertyRepairVO,comPropertyRepair); } + ComPropertyRepairVO vo=comPropertyRepairVO; try { - comPropertyRepairVO.setRepairName(RSAUtils.decrypt(comPropertyRepairVO.getRepairName(), Constants.PRIVATE_KEY)); - comPropertyRepairVO.setRepairPhone(RSAUtils.decrypt(comPropertyRepairVO.getRepairPhone(), Constants.PRIVATE_KEY)); + comPropertyRepair.setRepairName(RSAUtils.decrypt(comPropertyRepairVO.getRepairName(), Constants.PRIVATE_KEY)); + comPropertyRepair.setRepairPhone(RSAUtils.decrypt(comPropertyRepairVO.getRepairPhone(), Constants.PRIVATE_KEY)); } catch (Exception e) { e.printStackTrace(); + comPropertyRepair.setRepairName(comPropertyRepairVO.getRepairName()); + comPropertyRepair.setRepairPhone(comPropertyRepairVO.getRepairPhone()); } return R.ok(this.comPropertyRepairService.save(comPropertyRepair)); } -- Gitblit v1.7.1