From 1a6eb2ac656de3b35c64db8b9006db2ed9248872 Mon Sep 17 00:00:00 2001
From: yanghui <2536613402@qq.com>
Date: 星期五, 04 十一月 2022 17:43:13 +0800
Subject: [PATCH] Merge branch 'huacheng_test' into haucheng_panzhihua

---
 springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComPropertyRepairApi.java |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComPropertyRepairApi.java b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComPropertyRepairApi.java
index fb1d46e..dfebb26 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComPropertyRepairApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComPropertyRepairApi.java
@@ -1,11 +1,14 @@
 package com.panzhihua.applets.api;
 
 import cn.hutool.core.date.DateUtil;
+import com.panzhihua.applets.model.dtos.IDTO;
+import com.panzhihua.common.constants.Constants;
 import com.panzhihua.common.controller.BaseController;
 import com.panzhihua.common.model.dtos.property.CommonPage;
 import com.panzhihua.common.model.vos.R;
 import com.panzhihua.common.model.vos.property.ComPropertyRepairVO;
 import com.panzhihua.common.service.property.PropertyService;
+import com.panzhihua.common.utlis.RSAUtils;
 import com.panzhihua.common.utlis.StringUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiModelProperty;
@@ -46,6 +49,13 @@
         comPropertyRepairVO.setCreateTime(DateUtil.date());
         comPropertyRepairVO.setCreateBy(this.getUserId());
         comPropertyRepairVO.setRepairStatus(ComPropertyRepairVO.status.dcl);
+        try {
+            comPropertyRepairVO.setRepairName(RSAUtils.decrypt(comPropertyRepairVO.getRepairName(), Constants.PRIVATE_KEY));
+            comPropertyRepairVO.setRepairPhone(RSAUtils.decrypt(comPropertyRepairVO.getRepairPhone(), Constants.PRIVATE_KEY));
+        } catch (Exception e) {
+            e.printStackTrace();
+            return R.fail("密文解密失败");
+        }
         return this.propertyService.comPropertyRepairInsert(comPropertyRepairVO);
     }
 
@@ -77,6 +87,18 @@
      * @return 单条数据
      */
     @ApiOperation("详情接口")
+    @PostMapping("/detail")
+    public R selectDetail(@RequestBody IDTO idto) {
+        return this.propertyService.comPropertyRepairSelectOne(idto.getId());
+    }
+
+    /**
+     * 通过主键查询单条数据
+     *
+     * @param id 主键
+     * @return 单条数据
+     */
+    @ApiOperation("详情接口")
     @GetMapping("/{id}")
     public R selectOne(@PathVariable("id") Long id) {
         return this.propertyService.comPropertyRepairSelectOne(id);

--
Gitblit v1.7.1