TODO: 1.ruoyi 整体命名调整
代码获取: Integer tenantId = SecurityUtils.getTenantId(); 例:
/**
* 通过租户ID获取配置
*/
@GetMapping("/getTenantConfig")
public ApiResult<SysConfigTenantVo> getTenantConfig() {
Integer tenantId = SecurityUtils.getTenantId();
SysConfigTenantVo config = sysTenantService.getSysConfig(tenantId);
return ApiResult.success(config);
}
登录获取Token
curl --location --request POST 'http://usky-cloud-web:9150/auth/login' \
--header 'Content-Type: application/json' \
--data-raw '{
"username": "admin",
"password": "admin123",
"code": "7",
"uuid": "de8b904e5d81474e83f33f61c6cb0854"
}'
{
"code": 200,
"msg": null,
"data": {
"access_token": "eyJhbGciOiJIUzUxMiJ9.eyJ0ZW5hbnRfaWQiOjEwMDEsInVzZXJfaWQiOjEsInVzZXJfa2V5IjoiNjFkOGQzYjgtOTk2Mi00YzA5LWEwMWYtYzNlMDc2MTIwYjY2IiwidXNlcm5hbWUiOiJhZG1pbiJ9.-2uBvkfY7FYxejPcPvZ-jUw4FiLoNiHDVbm9NDX66jSMZpH8MZJEK17JgNhErVH_mfP5QSmp91cNksBEW26Jaw",
"tenantId": 1001,
"expires_in": 7200
}
}