From 3b882c3be44b2eede09999d8b65d2630ce818a81 Mon Sep 17 00:00:00 2001
From: liyj <1003249715@qq.com>
Date: Sat, 31 Aug 2024 18:12:12 +0800
Subject: [PATCH] 1、附件管理模块修改3

---
 dyh-service/dyh-sys/src/main/java/cn/huge/module/file/controller/wechat/FileInfoWechatController.java  |    2 
 dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/controller/wechat/PaUserWechatController.java |    4 
 dyh-service/dyh-disp/src/main/java/cn/huge/module/client/api/UtilsClient.java                          |    2 
 dyh-service/dyh-sys/src/main/java/cn/huge/module/client/api/UtilsClient.java                           |    2 
 dyh-service/dyh-sys/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java                   |   92 ++----------------------------
 dyh-service/dyh-sys/src/main/java/cn/huge/module/client/api/CustClient.java                            |   43 ++------------
 dyh-service/dyh-sys/src/main/java/cn/huge/module/file/utils/FtpMultipartFileWrapper.java               |    4 
 7 files changed, 20 insertions(+), 129 deletions(-)

diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/controller/wechat/PaUserWechatController.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/controller/wechat/PaUserWechatController.java
index 09b4b55..8af644b 100644
--- a/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/controller/wechat/PaUserWechatController.java
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/controller/wechat/PaUserWechatController.java
@@ -28,8 +28,8 @@
  */
 @Slf4j
 @RestController
-@RequestMapping("/api/web/paUser")
-public class PaUserWebController {
+@RequestMapping("/api/wechat/paUser")
+public class PaUserWechatController {
 
     @Autowired(required = false)
     private HttpServletRequest request;
diff --git a/dyh-service/dyh-disp/src/main/java/cn/huge/module/client/api/UtilsClient.java b/dyh-service/dyh-disp/src/main/java/cn/huge/module/client/api/UtilsClient.java
index 36547f7..51df0f7 100644
--- a/dyh-service/dyh-disp/src/main/java/cn/huge/module/client/api/UtilsClient.java
+++ b/dyh-service/dyh-disp/src/main/java/cn/huge/module/client/api/UtilsClient.java
@@ -20,6 +20,6 @@
      * @url {ctx}/api/client/dispUtils/getNewTimeId
      * @return Object
      */
-    @GetMapping("/api/client/dispUtils")
+    @GetMapping("/api/client/dispUtils/getNewTimeId")
     ReturnBO getNewTimeId();
 }
diff --git a/dyh-service/dyh-sys/src/main/java/cn/huge/module/client/api/CustClient.java b/dyh-service/dyh-sys/src/main/java/cn/huge/module/client/api/CustClient.java
index 4bc8525..ce78221 100644
--- a/dyh-service/dyh-sys/src/main/java/cn/huge/module/client/api/CustClient.java
+++ b/dyh-service/dyh-sys/src/main/java/cn/huge/module/client/api/CustClient.java
@@ -18,57 +18,28 @@
 
     /**
      * 内部用户-获取登录用户
-     * @url {ctx}/api/v1/ctUser/clientGetUser?userId=
+     * @url {ctx}/api/client/ctUser/clientGetUser?userId=
      * @param userId 登录用户编号
      * @return ReturnBO
      */
-    @GetMapping("/api/v1/ctUser/clientGetUser")
+    @GetMapping("/api/client/ctUser/clientGetUser")
     ReturnBO clientGetUser(@RequestParam("userId") String userId);
 
     /**
      * 内部用户-获取登录用户
-     * @url {ctx}/api/v1/ctUser/clientGetUserAll?userId=
+     * @url {ctx}/api/client/ctUser/clientGetUserAll?userId=
      * @param userId 登录用户编号
      * @return
      */
-    @GetMapping("/api/v1/ctUser/clientGetUserAll")
+    @GetMapping("/api/client/ctUser/clientGetUserAll")
     ReturnBO clientGetUserAll(@RequestParam("userId") String userId);
 
     /**
      * 当事人-获取登录用户
-     * @url {ctx}/api/v1/paUser/clientGetUserAll?userId=
+     * @url {ctx}/api/client/paUser/clientGetUserAll?userId=
      * @param userId 登录用户编号
      * @return ReturnBO
      */
-    @GetMapping("/api/v1/paUser/clientGetUserAll")
-    ReturnBO paclientGetUser(@RequestParam("userId") String userId);
-
-    /**
-     * 根据组织和角色查询
-     * @url {ctx}/api/v1/ctUser/listUserByUnitRole
-     * @return unitId 组织编号
-     * @return roleCode 角色代码
-     * @return ReturnBO
-     */
-    @GetMapping("/api/v1/ctUser/listUserByUnitRole")
-    ReturnBO listUserByUnitRole(@RequestParam(value = "unitId") String unitId, @RequestParam(value = "roleCode") String roleCode);
-
-    /**
-     * 根据部门和角色查询
-     * @url {ctx}/api/v1/ctUser/listUserByDeptRole
-     * @return deptId 部门编号
-     * @return roleCode 角色代码
-     * @return ReturnBO
-     */
-    @GetMapping("/api/v1/ctUser/listUserByDeptRole")
-    ReturnBO listUserByDeptRole(@RequestParam(value = "deptId") String deptId, @RequestParam(value = "roleCode") String roleCode);
-
-    /**
-     * 查询客户下的法院
-     * @url {ctx}/api/v1/ctUnit/listCourt1
-     * @param userId 用户编号
-     * @return ReturnBO
-     */
-    @GetMapping("/api/v1/ctUnit/listCourt1")
-    ReturnBO listCourt1(@RequestParam(value = "userId") String userId);
+    @GetMapping("/api/client/paUser/clientGetUserAll")
+    ReturnBO paClientGetUserAll(@RequestParam("userId") String userId);
 }
diff --git a/dyh-service/dyh-sys/src/main/java/cn/huge/module/client/api/UtilsClient.java b/dyh-service/dyh-sys/src/main/java/cn/huge/module/client/api/UtilsClient.java
index 6f14e63..d77d867 100644
--- a/dyh-service/dyh-sys/src/main/java/cn/huge/module/client/api/UtilsClient.java
+++ b/dyh-service/dyh-sys/src/main/java/cn/huge/module/client/api/UtilsClient.java
@@ -20,6 +20,6 @@
      * @url {ctx}/api/client/sysUtils/getNewTimeId
      * @return Object
      */
-    @GetMapping("/api/client/sysUtils")
+    @GetMapping("/api/client/sysUtils/getNewTimeId")
     ReturnBO getNewTimeId();
 }
diff --git a/dyh-service/dyh-sys/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java b/dyh-service/dyh-sys/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java
index cf056ca..ef6dff2 100644
--- a/dyh-service/dyh-sys/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java
+++ b/dyh-service/dyh-sys/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java
@@ -90,99 +90,19 @@
      * @param userId 用户编号
      * @return
      */
-    public PaUserDTO paclientGetUser(String userId){
+    public PaUserDTO paClientGetUserAll(String userId){
         try{
-            ReturnBO returnBo = custClient.paclientGetUser(userId);
+            ReturnBO returnBo = custClient.paClientGetUserAll(userId);
             if (ReturnConsts.OK == returnBo.getCode()){
                 PaUserDTO loginUser = objectMapper.convertValue(returnBo.getData(), PaUserDTO.class);
                 return loginUser;
             }else{
-                log.error("Client外服务接口[CustClientImpl.paclientGetUser]请求异常:" + returnBo.getMsg(), returnBo.getMsg());
-                throw new ClientException("CustClientImpl.paclientGetUser", returnBo.getMsg());
+                log.error("Client外服务接口[CustClientImpl.paClientGetUserAll]请求异常:" + returnBo.getMsg(), returnBo.getMsg());
+                throw new ClientException("CustClientImpl.paClientGetUserAll", returnBo.getMsg());
             }
         }catch (Exception e){
-            log.error("service方法[CustClientImpl.paclientGetUser]调用异常:"+e, e);
-            throw new ServiceException("CustClientImpl.paclientGetUser", e);
-        }
-    }
-
-    /**
-     * 根据组织和角色查询
-     * @return unitId 组织编号
-     * @return roleCode 角色代码
-     * @return Object
-     */
-    public List<CtUserDTO> listUserByUnitRole(@RequestParam(value = "unitId") String unitId, @RequestParam(value = "roleCode") String roleCode) {
-        List<CtUserDTO> ctUserDTOList = new ArrayList<>();
-        try{
-            ReturnBO returnBo = custClient.listUserByUnitRole(unitId, roleCode);
-            if (ReturnConsts.OK == returnBo.getCode()){
-                List<LinkedHashMap> list = (List<LinkedHashMap>) returnBo.getData();
-                for (LinkedHashMap map : list) {
-                    CtUserDTO ctUserDTO = JSON.parseObject(JSON.toJSONString(map), CtUserDTO.class);
-                    ctUserDTOList.add(ctUserDTO);
-                }
-                return ctUserDTOList;
-            }else{
-                log.error("Client外服务接口[CustClientImpl.listUserByUnitRole]请求异常:" + returnBo.getMsg(), returnBo.getMsg());
-                throw new ClientException("CustClientImpl.listUserByUnitRole", returnBo.getMsg());
-            }
-        }catch (Exception e){
-            log.error("service方法[CustClientImpl.listUserByUnitRole]调用异常:"+e, e);
-            throw new ServiceException("CustClientImpl.listUserByUnitRole", e);
-        }
-    }
-
-    /**
-     * 根据部门和角色查询
-     * @return deptId 部门编号
-     * @return roleCode 角色代码
-     * @return Object
-     */
-    public List<CtUserDTO> listUserByDeptRole(@RequestParam(value = "deptId") String deptId, @RequestParam(value = "roleCode") String roleCode) {
-        List<CtUserDTO> ctUserDTOList = new ArrayList<>();
-        try{
-            ReturnBO returnBo = custClient.listUserByDeptRole(deptId, roleCode);
-            if (ReturnConsts.OK == returnBo.getCode()){
-                List<LinkedHashMap> list = (List<LinkedHashMap>) returnBo.getData();
-                for (LinkedHashMap map : list) {
-                    CtUserDTO ctUserDTO = JSON.parseObject(JSON.toJSONString(map), CtUserDTO.class);
-                    ctUserDTOList.add(ctUserDTO);
-                }
-                return ctUserDTOList;
-            }else{
-                log.error("Client外服务接口[CustClientImpl.listUserByDeptRole]请求异常:" + returnBo.getMsg(), returnBo.getMsg());
-                throw new ClientException("CustClientImpl.listUserByDeptRole", returnBo.getMsg());
-            }
-        }catch (Exception e){
-            log.error("service方法[CustClientImpl.listUserByDeptRole]调用异常:"+e, e);
-            throw new ServiceException("CustClientImpl.listUserByDeptRole", e);
-        }
-    }
-
-    /**
-     * 查询客户下的法院
-     * @param userId
-     * @return
-     */
-    public List<SelectTermDTO> listCourt1(String userId){
-        List<SelectTermDTO> selectTermDTOList = new ArrayList<>();
-        try{
-            ReturnBO returnBo = custClient.listCourt1(userId);
-            if (ReturnConsts.OK == returnBo.getCode()){
-                List<LinkedHashMap> list = (List<LinkedHashMap>) returnBo.getData();
-                for (LinkedHashMap map : list) {
-                    SelectTermDTO selectTermDTO = JSON.parseObject(JSON.toJSONString(map), SelectTermDTO.class);
-                    selectTermDTOList.add(selectTermDTO);
-                }
-                return selectTermDTOList;
-            }else{
-                log.error("Client外服务接口[CustClientImpl.listCourt1]请求异常:" + returnBo.getMsg(), returnBo.getMsg());
-                throw new ClientException("CustClientImpl.listCourt1", returnBo.getMsg());
-            }
-        }catch (Exception e){
-            log.error("service方法[CustClientImpl.listCourt1]调用异常:"+e, e);
-            throw new ServiceException("CustClientImpl.listCourt1", e);
+            log.error("service方法[CustClientImpl.paClientGetUserAll]调用异常:"+e, e);
+            throw new ServiceException("CustClientImpl.paClientGetUserAll", e);
         }
     }
 }
diff --git a/dyh-service/dyh-sys/src/main/java/cn/huge/module/file/controller/wechat/FileInfoWechatController.java b/dyh-service/dyh-sys/src/main/java/cn/huge/module/file/controller/wechat/FileInfoWechatController.java
index 963a377..2713775 100644
--- a/dyh-service/dyh-sys/src/main/java/cn/huge/module/file/controller/wechat/FileInfoWechatController.java
+++ b/dyh-service/dyh-sys/src/main/java/cn/huge/module/file/controller/wechat/FileInfoWechatController.java
@@ -74,7 +74,7 @@
                          @PathVariable(value = "ownerType") String ownerType,
                          @CurrentUser String userId, MultipartHttpServletRequest request) {
         try{
-            PaUserDTO loginUser = custClient.paclientGetUser(userId);
+            PaUserDTO loginUser = custClient.paClientGetUserAll(userId);
             UploaderDTO uploaderDTO = new UploaderDTO();
             uploaderDTO.setUploaderId(loginUser.getId());
             uploaderDTO.setUploaderName(loginUser.getTrueName());
diff --git a/dyh-service/dyh-sys/src/main/java/cn/huge/module/file/utils/FtpMultipartFileWrapper.java b/dyh-service/dyh-sys/src/main/java/cn/huge/module/file/utils/FtpMultipartFileWrapper.java
index b405487..d80ac8d 100644
--- a/dyh-service/dyh-sys/src/main/java/cn/huge/module/file/utils/FtpMultipartFileWrapper.java
+++ b/dyh-service/dyh-sys/src/main/java/cn/huge/module/file/utils/FtpMultipartFileWrapper.java
@@ -72,7 +72,7 @@
         Date nowDate = DateUtils.getNowDate();
         fileInfo.setCreateTime(nowDate);
         fileInfo.setUpdateTime(nowDate);
-        fileInfo.setDeleteStatus(BaseConsts.DELETE_STATUS_1);
+        fileInfo.setDeleteStatus(BaseConsts.DELETE_STATUS_0);
         return fileInfo;
     }
 
@@ -101,7 +101,7 @@
         Date nowDate = DateUtils.getNowDate();
         fileInfo.setCreateTime(nowDate);
         fileInfo.setUpdateTime(nowDate);
-        fileInfo.setDeleteStatus(BaseConsts.DELETE_STATUS_1);
+        fileInfo.setDeleteStatus(BaseConsts.DELETE_STATUS_0);
         return fileInfo;
     }
 

--
Gitblit v1.8.0