mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2026-01-03 20:35:29 +08:00
新增token校验、客户端便捷工具类、修复登录缺乏租户信息、强退功能失效
This commit is contained in:
@ -749,4 +749,6 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
@PostMapping("/sys/api/updateUserDepart")
|
||||
void updateUserDepart(@RequestParam("username") String username,@RequestParam("orgCode") String orgCode,@RequestParam("loginTenantId") Integer loginTenantId);
|
||||
|
||||
@GetMapping("/sys/api/setLoginTenant")
|
||||
JSONObject setLoginTenant(@RequestParam("username") String username);
|
||||
}
|
||||
|
||||
@ -452,4 +452,9 @@ public class SysBaseAPIFallback implements ISysBaseAPI {
|
||||
public LoginUser getUserByPhone(String phone) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject setLoginTenant(String username) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -917,4 +917,9 @@ public class SystemApiController {
|
||||
sysBaseApi.updateUserDepart(username, orgCode, loginTenantId);
|
||||
}
|
||||
|
||||
@GetMapping("/sys/api/setLoginTenant")
|
||||
public JSONObject setLoginTenant(@RequestParam("username") String username) {
|
||||
return sysBaseApi.setLoginTenant(username);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -20,6 +20,7 @@ import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.jeecg.common.api.dto.DataLogDTO;
|
||||
import org.jeecg.common.api.dto.OnlineAuthDTO;
|
||||
import org.jeecg.common.api.dto.message.*;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.aspect.UrlMatchEnum;
|
||||
import org.jeecg.common.config.TenantContext;
|
||||
import org.jeecg.common.constant.*;
|
||||
@ -1780,4 +1781,11 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject setLoginTenant(String username) {
|
||||
JSONObject obj = new JSONObject(new LinkedHashMap<>());
|
||||
SysUser sysUser = sysUserService.getUserByName(username);
|
||||
sysUserService.setLoginTenant(sysUser, obj, username, null);
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user