* @return | * @return | ||||
*/ | */ | ||||
@GetMapping("/list") | @GetMapping("/list") | ||||
// public JsonResult list(){ | |||||
// return platformService.findAll(); | |||||
// } | |||||
public JsonResult listWithAirportOption(@RequestParam boolean includeAirport) { | |||||
return platformService.findAllWithAirportOption(includeAirport); | |||||
public JsonResult list(){ | |||||
return platformService.findAll(); | |||||
} | } | ||||
//public JsonResult listWithAirportOption(@RequestParam boolean includeAirport) { | |||||
// return platformService.findAllWithAirportOption(includeAirport); | |||||
//} | |||||
} | } |
*/ | */ | ||||
private Integer status; | private Integer status; | ||||
/** | |||||
*是否包含机场平台 | |||||
*/ | |||||
private Boolean isAirport; | |||||
///** | |||||
// *是否包含机场平台 | |||||
// */ | |||||
// | |||||
//private Boolean isAirport; | |||||
} | } |
* 查询各平台名称 | * 查询各平台名称 | ||||
* @return | * @return | ||||
*/ | */ | ||||
//JsonResult findAll(); | |||||
JsonResult findAllWithAirportOption(boolean includeAirport); | |||||
JsonResult findAll(); | |||||
//JsonResult findAllWithAirportOption(boolean includeAirport); | |||||
} | } |
* | * | ||||
* @return | * @return | ||||
*/ | */ | ||||
// @Override | |||||
// public JsonResult findAll() { | |||||
// | |||||
// List<Platform> platforms = platformMapper.selectList(Wrappers.<Platform>lambdaQuery() | |||||
// .eq(Platform::getMark, 1)); | |||||
// | |||||
// return JsonResult.success(platforms); | |||||
// } | |||||
//通过机场条件进行查询 | |||||
@Override | @Override | ||||
public JsonResult findAllWithAirportOption(boolean includeAirport) { | |||||
LambdaQueryWrapper<Platform> queryWrapper = Wrappers.<Platform>lambdaQuery() | |||||
.eq(Platform::getMark, 1); | |||||
// 筛选是否含机场平台 | |||||
if (!includeAirport) { | |||||
queryWrapper.eq(Platform::getIsAirport, false); // 只筛选非机场平台 | |||||
} | |||||
List<Platform> platforms = platformMapper.selectList(queryWrapper); | |||||
public JsonResult findAll() { | |||||
List<Platform> platforms = platformMapper.selectList(Wrappers.<Platform>lambdaQuery() | |||||
.eq(Platform::getMark, 1)); | |||||
return JsonResult.success(platforms); | return JsonResult.success(platforms); | ||||
} | } | ||||
////通过机场条件进行查询 | |||||
//@Override | |||||
//public JsonResult findAllWithAirportOption(boolean includeAirport) { | |||||
// LambdaQueryWrapper<Platform> queryWrapper = Wrappers.<Platform>lambdaQuery() | |||||
// .eq(Platform::getMark, 1); | |||||
// // 筛选是否含机场平台 | |||||
// if (!includeAirport) { | |||||
// queryWrapper.eq(Platform::getIsAirport, false); // 只筛选非机场平台 | |||||
// } | |||||
// | |||||
// List<Platform> platforms = platformMapper.selectList(queryWrapper); | |||||
// return JsonResult.success(platforms); | |||||
//} | |||||
} | } | ||||
CreateClientTenantDto dto = new CreateClientTenantDto(); | CreateClientTenantDto dto = new CreateClientTenantDto(); | ||||
dto.setId(query.getId()); | dto.setId(query.getId()); | ||||
//默认是否包含机场为false | //默认是否包含机场为false | ||||
Boolean isAirport = false; | |||||
//Boolean isAirport = false; | |||||
//查询出租户的相关信息 | //查询出租户的相关信息 | ||||
Long tenantId = query.getId(); | Long tenantId = query.getId(); | ||||
//项目相关信息 | //项目相关信息 | ||||
List<ClientUserRolePo> clientUserRolePos = clientUserRoleMapper.selectListByUserId(tenantPo.getUserId()); | List<ClientUserRolePo> clientUserRolePos = clientUserRoleMapper.selectListByUserId(tenantPo.getUserId()); | ||||
for (ClientUserRolePo clientUserRolePo : clientUserRolePos) { | for (ClientUserRolePo clientUserRolePo : clientUserRolePos) { | ||||
//判断是否包含机场 | //判断是否包含机场 | ||||
if ("tuoheng-airport-admin".equals(clientUserRolePo.getClientId())) { | |||||
isAirport = true; | |||||
} | |||||
//if ("tuoheng-airport-admin".equals(clientUserRolePo.getClientId())) { | |||||
// isAirport = true; | |||||
//} | |||||
ClientRoleDto clientRoleDto = new ClientRoleDto(); | ClientRoleDto clientRoleDto = new ClientRoleDto(); | ||||
//此处 暂时格式都为 tuoheng-hhz-web 等格式 如后续维护需要变更形式则此处代码需要更改 | //此处 暂时格式都为 tuoheng-hhz-web 等格式 如后续维护需要变更形式则此处代码需要更改 | ||||
clientRoleDto.setRoleId(clientUserRolePo.getRoleId()); | clientRoleDto.setRoleId(clientUserRolePo.getRoleId()); | ||||
list.add(clientRoleDto); | list.add(clientRoleDto); | ||||
} | } | ||||
dto.setClientRoleDtoList(list.stream().distinct().collect(Collectors.toList())); | dto.setClientRoleDtoList(list.stream().distinct().collect(Collectors.toList())); | ||||
dto.setIsAirport(isAirport); | |||||
//dto.setIsAirport(isAirport); | |||||
return JsonResult.success(dto); | return JsonResult.success(dto); | ||||
} | } | ||||
url = url + dictData.getValue(); | url = url + dictData.getValue(); | ||||
HttpEntity httpEntity = new HttpEntity(dto, resultRequestHeader); | HttpEntity httpEntity = new HttpEntity(dto, resultRequestHeader); | ||||
log.info("请求url:{}", url); | log.info("请求url:{}", url); | ||||
log.info("请求参数:{}", dto.toString()); | |||||
ResponseEntity<JsonResult> response; | ResponseEntity<JsonResult> response; | ||||
try { | try { | ||||
response = restTemplate.exchange(url, HttpMethod.POST, httpEntity, JsonResult.class); | response = restTemplate.exchange(url, HttpMethod.POST, httpEntity, JsonResult.class); |
addresses: http://192.168.11.11:8110/xxl-job-admin | addresses: http://192.168.11.11:8110/xxl-job-admin | ||||
accessToken: tuoheng | accessToken: tuoheng | ||||
executor: | executor: | ||||
appname: xxl-job-executor-odic | |||||
appname: xxl-job-executor-oidc | |||||
address: | address: | ||||
ip: | ip: | ||||
# 多个后台,端口号不能相同 | # 多个后台,端口号不能相同 |
addresses: http://192.168.11.11:8110/xxl-job-admin | addresses: http://192.168.11.11:8110/xxl-job-admin | ||||
accessToken: tuoheng | accessToken: tuoheng | ||||
executor: | executor: | ||||
appname: xxl-job-executor-odic | |||||
appname: xxl-job-executor-oidc | |||||
address: | address: | ||||
ip: | ip: | ||||
# 多个后台,端口号不能相同 | # 多个后台,端口号不能相同 |
spring: | spring: | ||||
profiles: | profiles: | ||||
active: dev | |||||
active: test | |||||
web: | web: | ||||
resources: | resources: | ||||
static-locations: classpath:/ | static-locations: classpath:/ |
<id column="userId" jdbcType="INTEGER" property="userId"/> | <id column="userId" jdbcType="INTEGER" property="userId"/> | ||||
<result column="userName" jdbcType="VARCHAR" property="userName"/> | <result column="userName" jdbcType="VARCHAR" property="userName"/> | ||||
<result column="password" jdbcType="VARCHAR" property="password"/> | <result column="password" jdbcType="VARCHAR" property="password"/> | ||||
<collection property="authorityList" ofType="com.tuoheng.model.dto.AuthoritiesDto" javaType="java.util.List"> | |||||
<result column="isAble" jdbcType="INTEGER" property="isAble"/> | |||||
<result column="isExpire" jdbcType="INTEGER" property="isExpire"/> | |||||
<collection property="authorityList" ofType="java.lang.String" javaType="java.util.List"> | |||||
<result column="authority" jdbcType="VARCHAR"/> | <result column="authority" jdbcType="VARCHAR"/> | ||||
<result column="status" jdbcType="INTEGER"/> | |||||
</collection> | </collection> | ||||
<collection property="clientRoleDtoList" ofType="com.tuoheng.model.dto.ClientRoleDto" javaType="java.util.List"> | <collection property="clientRoleDtoList" ofType="com.tuoheng.model.dto.ClientRoleDto" javaType="java.util.List"> | ||||
<result column="clientId" jdbcType="VARCHAR" property="clientId"/> | <result column="clientId" jdbcType="VARCHAR" property="clientId"/> | ||||
a.password, | a.password, | ||||
b.authority, | b.authority, | ||||
c.client_id as clientId, | c.client_id as clientId, | ||||
c.role_id as roleId | |||||
c.role_id as roleId, | |||||
a.is_able as isAble, | |||||
a.is_expire as isExpire | |||||
from users a | from users a | ||||
left join authorities b on a.id = b.user_id | left join authorities b on a.id = b.user_id | ||||
left join t_client_user_role c on a.id = c.user_id | left join t_client_user_role c on a.id = c.user_id | ||||
a.password, | a.password, | ||||
b.authority, | b.authority, | ||||
c.client_id as clientId, | c.client_id as clientId, | ||||
c.role_id as roleId | |||||
c.role_id as roleId, | |||||
a.is_able as isAble, | |||||
a.is_expire as isExpire | |||||
from users a | from users a | ||||
left join authorities b on a.id = b.user_id | left join authorities b on a.id = b.user_id | ||||
left join t_client_user_role c on a.id = c.user_id | left join t_client_user_role c on a.id = c.user_id |
display: flex; | display: flex; | ||||
flex-direction: column; | flex-direction: column; | ||||
background: transparent; | background: transparent; | ||||
position: relative; | |||||
} | } | ||||
form input{ | form input{ | ||||
height: 40px; | height: 40px; | ||||
.form__tips.is--error{ | .form__tips.is--error{ | ||||
color: red | color: red | ||||
} | } | ||||
/* 密码框显示隐藏图表 */ | |||||
#close_eyes, #open_eyes{ | |||||
width: 18px; | |||||
height: 18px; | |||||
position: absolute; | |||||
right: 50px; | |||||
top: 72px; | |||||
} | |||||
#open_eyes { | |||||
display: none; | |||||
} | |||||
</style> | </style> | ||||
</head> | </head> | ||||
<body> | <body> | ||||
<div class="login__back"> | <div class="login__back"> | ||||
<div class="login__form"> | <div class="login__form"> | ||||
<h2>拓恒统一登录平台</h2> | |||||
<p>TUOHENG LOGIN PLATFORM</p> | |||||
<h2>统一登录平台</h2> | |||||
<p>LOGIN PLATFORM</p> | |||||
<form th:action="@{/login}" method="post"> | <form th:action="@{/login}" method="post"> | ||||
<input name="username" placeholder="请输入用户名" type="text"/> | <input name="username" placeholder="请输入用户名" type="text"/> | ||||
<input name="password" placeholder="请输入密码" type="password"/> | |||||
<input id="password" name="password" placeholder="请输入密码" type="password"/> | |||||
<!-- 密码显示隐藏 --> | |||||
<img src="../static/close.png" alt="" id="close_eyes"> | |||||
<img src="../static/open.png" alt="" id="open_eyes"> | |||||
<div class="form__code"> | <div class="form__code"> | ||||
<input name="validateCode" placeholder="请输入验证码" /> | <input name="validateCode" placeholder="请输入验证码" /> | ||||
<input id="codekey" name="codekey" type="hidden"/> | <input id="codekey" name="codekey" type="hidden"/> | ||||
}) | }) | ||||
} | } | ||||
// 密码显示隐藏 | |||||
const passwordDom = document.getElementById('password') | |||||
const openIcon = document.getElementById('open_eyes') | |||||
const closeIcon = document.getElementById('close_eyes') | |||||
closeIcon.onclick = function() { | |||||
passwordDom.type = 'text' | |||||
openIcon.style.display = 'block' | |||||
closeIcon.style.display = 'none' | |||||
} | |||||
openIcon.onclick = function() { | |||||
passwordDom.type = 'password' | |||||
openIcon.style.display = 'none' | |||||
closeIcon.style.display = 'block' | |||||
} | |||||
$(document).ready(function() { | $(document).ready(function() { | ||||
$.ajax({ | $.ajax({ | ||||
url : "/vercode",//后台请求的数据 | url : "/vercode",//后台请求的数据 |
spring: | spring: | ||||
profiles: | profiles: | ||||
active: dev | |||||
active: test | |||||
web: | web: | ||||
resources: | resources: | ||||
static-locations: classpath:/ | static-locations: classpath:/ |
display: flex; | display: flex; | ||||
flex-direction: column; | flex-direction: column; | ||||
background: transparent; | background: transparent; | ||||
position: relative; | |||||
} | } | ||||
form input{ | form input{ | ||||
height: 40px; | height: 40px; | ||||
.form__tips.is--error{ | .form__tips.is--error{ | ||||
color: red | color: red | ||||
} | } | ||||
/* 密码框显示隐藏图表 */ | |||||
#close_eyes, #open_eyes{ | |||||
width: 18px; | |||||
height: 18px; | |||||
position: absolute; | |||||
right: 50px; | |||||
top: 72px; | |||||
} | |||||
#open_eyes { | |||||
display: none; | |||||
} | |||||
</style> | </style> | ||||
</head> | </head> | ||||
<body> | <body> | ||||
<div class="login__back"> | <div class="login__back"> | ||||
<div class="login__form"> | <div class="login__form"> | ||||
<h2>拓恒统一登录平台</h2> | |||||
<p>TUOHENG LOGIN PLATFORM</p> | |||||
<h2>统一登录平台</h2> | |||||
<p>LOGIN PLATFORM</p> | |||||
<form th:action="@{/login}" method="post"> | <form th:action="@{/login}" method="post"> | ||||
<input name="username" placeholder="请输入用户名" type="text"/> | <input name="username" placeholder="请输入用户名" type="text"/> | ||||
<input name="password" placeholder="请输入密码" type="password"/> | |||||
<input id="password" name="password" placeholder="请输入密码" type="password"/> | |||||
<!-- 密码显示隐藏 --> | |||||
<img src="../static/close.png" alt="" id="close_eyes"> | |||||
<img src="../static/open.png" alt="" id="open_eyes"> | |||||
<div class="form__code"> | <div class="form__code"> | ||||
<input name="validateCode" placeholder="请输入验证码" /> | <input name="validateCode" placeholder="请输入验证码" /> | ||||
<input id="codekey" name="codekey" type="hidden"/> | <input id="codekey" name="codekey" type="hidden"/> | ||||
}) | }) | ||||
} | } | ||||
// 密码显示隐藏 | |||||
const passwordDom = document.getElementById('password') | |||||
const openIcon = document.getElementById('open_eyes') | |||||
const closeIcon = document.getElementById('close_eyes') | |||||
closeIcon.onclick = function() { | |||||
passwordDom.type = 'text' | |||||
openIcon.style.display = 'block' | |||||
closeIcon.style.display = 'none' | |||||
} | |||||
openIcon.onclick = function() { | |||||
passwordDom.type = 'password' | |||||
openIcon.style.display = 'none' | |||||
closeIcon.style.display = 'block' | |||||
} | |||||
$(document).ready(function() { | $(document).ready(function() { | ||||
$.ajax({ | $.ajax({ | ||||
url : "/vercode",//后台请求的数据 | url : "/vercode",//后台请求的数据 |