From adddb6522e95c08bef6bc6b00338ff27d82aa55d Mon Sep 17 00:00:00 2001
From: xusd <hugeinfo123>
Date: Thu, 17 Oct 2024 14:42:24 +0800
Subject: [PATCH] fix:网格平台登录对接调整
---
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUnitService.java | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUnitService.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUnitService.java
index 1595bb1..36af820 100644
--- a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUnitService.java
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUnitService.java
@@ -23,6 +23,7 @@
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
+import org.apache.ibatis.annotations.Param;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -655,9 +656,11 @@
*/
public CtUnitDTO getParentZzzx(String unitId){
try{
- CtUnit loginCtUnit = mapper.selectById(unitId);
// 查询当前单位的上级综治中心
QueryWrapper<CtUnit> ctUnitQueryWrapper = new QueryWrapper<>();
+ ctUnitQueryWrapper.eq("id", unitId).select("parent_id");
+ CtUnit loginCtUnit = mapper.selectOne(ctUnitQueryWrapper);
+ ctUnitQueryWrapper.clear();
ctUnitQueryWrapper.eq("id", loginCtUnit.getParentId()).eq("unit_type", UserBaseConsts.UNIT_TYPE_1);
CtUnit zzzxCtUnit = mapper.selectOne(ctUnitQueryWrapper);
CtUnitDTO ctUnitDTO = new CtUnitDTO();
@@ -694,4 +697,8 @@
throw new ServiceException("CtUnitService.getParentZzzx", e);
}
}
+
+ public CtUnit selectUnitByGridId(String gridUnitId){
+ return mapper.selectUnitByGridId(gridUnitId);
+ }
}
--
Gitblit v1.8.0