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 | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 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 e6f18f7..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 @@ -423,4 +423,27 @@ return ReturnFailUtils.getRepInfo(); } } + + /** + * 人工配置-统一修改单位名称 + * @url {ctx}/api/web/ctUser/updateUnitName + * @return Object + * @throws Exception + */ + @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