From c1a463b9f1c0a7160dbd0ac1c7490eef13861a5e Mon Sep 17 00:00:00 2001
From: huangh <hshgjzd5@163.com>
Date: Tue, 29 Oct 2024 15:02:25 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/gzdyh_test' into gzdyh_test

---
 dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtUserWebController.java |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtUserWebController.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtUserWebController.java
index 4ca98a3..2335ef9 100644
--- a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtUserWebController.java
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtUserWebController.java
@@ -427,14 +427,20 @@
     /**
      * 人工配置-统一修改单位名称
      * @url {ctx}/api/web/ctUser/updateUnitName
-     * @param id 主键编号
      * @return Object
      * @throws Exception
      */
-    @GetMapping("/getByIdupdateUnitNameRole")
+    @GetMapping("/updateUnitName")
     public Object updateUnitName() {
         try {
-
+            List<CtUser> ctUserList = service.list();
+            for (CtUser ctUser: ctUserList){
+                CtUnit ctUnit = ctUnitService.getById(ctUser.getUnitId());
+                if (ObjectUtils.isNotEmpty(ctUnit)) {
+                    ctUser.setUnitName(ctUnit.getUnitName());
+                    service.updateCtUser(ctUser);
+                }
+            }
             return ReturnSucUtils.getRepInfo();
         } catch (Exception e) {
             return ReturnFailUtils.getRepInfo();

--
Gitblit v1.8.0