登陆界面,优化成输入租户名
parent
0cb4823b5b
commit
535d3c9c01
@ -0,0 +1,29 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.system.controller.tenant;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
@Api(tags = "租户")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/system/tenant")
|
||||||
|
public class SysTenantController {
|
||||||
|
|
||||||
|
@GetMapping("/get-id-by-name")
|
||||||
|
@ApiOperation(value = "使用租户名,获得租户编号", notes = "登录界面,根据用户的租户名,获得租户编号")
|
||||||
|
@ApiImplicitParam(name = "name", value = "租户名", required = true, example = "芋道源码", dataTypeClass = Long.class)
|
||||||
|
public CommonResult<Long> getTenantIdByName(@RequestParam("name") String name) {
|
||||||
|
if (Objects.equals("芋道源码", name)) {
|
||||||
|
return CommonResult.success(0L);
|
||||||
|
}
|
||||||
|
return CommonResult.success(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 使用租户名,获得租户编号
|
||||||
|
export function getTenantIdByName(name) {
|
||||||
|
return request({
|
||||||
|
url: '/system/tenant/get-id-by-name',
|
||||||
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
name
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue