|
|
|
@ -6,6 +6,7 @@ import cn.dev33.satoken.stp.StpUtil; |
|
|
|
import cn.hutool.core.codec.Base64; |
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
import com.zdxt.enforcementcode.common.util.DataFilterUtil; |
|
|
|
import jakarta.servlet.http.HttpServletRequest; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
@ -34,7 +35,9 @@ import org.dromara.common.sse.utils.SseMessageUtils; |
|
|
|
import org.dromara.common.tenant.helper.TenantHelper; |
|
|
|
import org.dromara.system.domain.bo.SysTenantBo; |
|
|
|
import org.dromara.system.domain.vo.SysClientVo; |
|
|
|
import org.dromara.system.domain.vo.SysDeptVo; |
|
|
|
import org.dromara.system.domain.vo.SysTenantVo; |
|
|
|
import org.dromara.system.mapper.SysDeptMapper; |
|
|
|
import org.dromara.system.service.ISysClientService; |
|
|
|
import org.dromara.system.service.ISysConfigService; |
|
|
|
import org.dromara.system.service.ISysSocialService; |
|
|
|
@ -45,6 +48,7 @@ import org.dromara.web.domain.vo.TenantListVo; |
|
|
|
import org.dromara.web.service.IAuthStrategy; |
|
|
|
import org.dromara.web.service.SysLoginService; |
|
|
|
import org.dromara.web.service.SysRegisterService; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.validation.annotation.Validated; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
@ -79,6 +83,8 @@ public class AuthController { |
|
|
|
private final ScheduledExecutorService scheduledExecutorService; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
private SysDeptMapper deptMapper; |
|
|
|
/** |
|
|
|
* 登录方法 |
|
|
|
* |
|
|
|
@ -124,6 +130,14 @@ public class AuthController { |
|
|
|
String plainJson = JsonUtils.toJsonString(credentialMap); |
|
|
|
loginVo.setV1SystemCredential(EncryptUtils.encryptByAes(plainJson, aesKey)); |
|
|
|
|
|
|
|
SysDeptVo bureauDept = DataFilterUtil.getUserBureauDept(loginUser.getUserId()); |
|
|
|
if(bureauDept != null){ |
|
|
|
SysDeptVo bureauDeptDetail = deptMapper.selectVoById(bureauDept.getDeptId()); |
|
|
|
if(bureauDeptDetail != null){ |
|
|
|
String areacode = bureauDeptDetail.getAreaNode(); |
|
|
|
loginVo.setAreacode(areacode); |
|
|
|
} |
|
|
|
} |
|
|
|
System.out.println(JsonUtils.toJsonString(loginUser)); |
|
|
|
return R.ok(loginVo); |
|
|
|
} |
|
|
|
|