Browse Source

去除机场筛选同业务平台一致

tags/v2.5.0^2^2
xiaoying 1 year ago
parent
commit
9b3e5087de
15 changed files with 120 additions and 51 deletions
  1. +6
    -6
      tuoheng_oidc_admin/src/main/java/com/tuoheng/controller/PlatformController.java
  2. +5
    -5
      tuoheng_oidc_admin/src/main/java/com/tuoheng/model/param/CreateClientTenantDto.java
  3. +2
    -2
      tuoheng_oidc_admin/src/main/java/com/tuoheng/service/PlatformService.java
  4. +19
    -19
      tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/PlatformServiceImpl.java
  5. +5
    -5
      tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/TenantServiceImpl.java
  6. +1
    -1
      tuoheng_oidc_admin/target/classes/WEB-INF/classes/application-dev.yml
  7. +1
    -1
      tuoheng_oidc_admin/target/classes/application-dev.yml
  8. +1
    -1
      tuoheng_oidc_server/target/classes/WEB-INF/classes/application.yml
  9. +9
    -4
      tuoheng_oidc_server/target/classes/WEB-INF/classes/mapper/UserMapper.xml
  10. +35
    -3
      tuoheng_oidc_server/target/classes/WEB-INF/classes/templates/login.html
  11. +1
    -1
      tuoheng_oidc_server/target/classes/application.yml
  12. BIN
      tuoheng_oidc_server/target/classes/com/tuoheng/config/AuthorizationServerConfig.class
  13. BIN
      tuoheng_oidc_server/target/classes/com/tuoheng/service/impl/OidcUserInfoServiceImpl.class
  14. BIN
      tuoheng_oidc_server/target/classes/com/tuoheng/until/RegisteredClientUtil.class
  15. +35
    -3
      tuoheng_oidc_server/target/classes/templates/login.html

+ 6
- 6
tuoheng_oidc_admin/src/main/java/com/tuoheng/controller/PlatformController.java View File

@@ -24,12 +24,12 @@ public class PlatformController {
* @return
*/
@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);
//}

}

+ 5
- 5
tuoheng_oidc_admin/src/main/java/com/tuoheng/model/param/CreateClientTenantDto.java View File

@@ -79,9 +79,9 @@ public class CreateClientTenantDto {
*/
private Integer status;

/**
*是否包含机场平台
*/
private Boolean isAirport;
///**
// *是否包含机场平台
// */
//
//private Boolean isAirport;
}

+ 2
- 2
tuoheng_oidc_admin/src/main/java/com/tuoheng/service/PlatformService.java View File

@@ -14,7 +14,7 @@ public interface PlatformService extends IService<Platform> {
* 查询各平台名称
* @return
*/
//JsonResult findAll();
JsonResult findAllWithAirportOption(boolean includeAirport);
JsonResult findAll();
//JsonResult findAllWithAirportOption(boolean includeAirport);

}

+ 19
- 19
tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/PlatformServiceImpl.java View File

@@ -29,29 +29,29 @@ public class PlatformServiceImpl extends ServiceImpl<PlatformMapper, Platform>
*
* @return
*/
// @Override
// public JsonResult findAll() {
//
// List<Platform> platforms = platformMapper.selectList(Wrappers.<Platform>lambdaQuery()
// .eq(Platform::getMark, 1));
//
// 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);
public JsonResult findAll() {

List<Platform> platforms = platformMapper.selectList(Wrappers.<Platform>lambdaQuery()
.eq(Platform::getMark, 1));

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);
//}

}



+ 5
- 5
tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/TenantServiceImpl.java View File

@@ -417,7 +417,7 @@ public class TenantServiceImpl implements TenantService {
CreateClientTenantDto dto = new CreateClientTenantDto();
dto.setId(query.getId());
//默认是否包含机场为false
Boolean isAirport = false;
//Boolean isAirport = false;
//查询出租户的相关信息
Long tenantId = query.getId();
//项目相关信息
@@ -436,9 +436,9 @@ public class TenantServiceImpl implements TenantService {
List<ClientUserRolePo> clientUserRolePos = clientUserRoleMapper.selectListByUserId(tenantPo.getUserId());
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();
//此处 暂时格式都为 tuoheng-hhz-web 等格式 如后续维护需要变更形式则此处代码需要更改
clientRoleDto.setRoleId(clientUserRolePo.getRoleId());
@@ -453,7 +453,7 @@ public class TenantServiceImpl implements TenantService {
list.add(clientRoleDto);
}
dto.setClientRoleDtoList(list.stream().distinct().collect(Collectors.toList()));
dto.setIsAirport(isAirport);
//dto.setIsAirport(isAirport);
return JsonResult.success(dto);
}


+ 1
- 1
tuoheng_oidc_admin/target/classes/WEB-INF/classes/application-dev.yml View File

@@ -84,7 +84,7 @@ xxl:
addresses: http://192.168.11.11:8110/xxl-job-admin
accessToken: tuoheng
executor:
appname: xxl-job-executor-odic
appname: xxl-job-executor-oidc
address:
ip:
# 多个后台,端口号不能相同

+ 1
- 1
tuoheng_oidc_admin/target/classes/application-dev.yml View File

@@ -84,7 +84,7 @@ xxl:
addresses: http://192.168.11.11:8110/xxl-job-admin
accessToken: tuoheng
executor:
appname: xxl-job-executor-odic
appname: xxl-job-executor-oidc
address:
ip:
# 多个后台,端口号不能相同

+ 1
- 1
tuoheng_oidc_server/target/classes/WEB-INF/classes/application.yml View File

@@ -3,7 +3,7 @@ server:

spring:
profiles:
active: dev
active: test
web:
resources:
static-locations: classpath:/

+ 9
- 4
tuoheng_oidc_server/target/classes/WEB-INF/classes/mapper/UserMapper.xml View File

@@ -6,9 +6,10 @@
<id column="userId" jdbcType="INTEGER" property="userId"/>
<result column="userName" jdbcType="VARCHAR" property="userName"/>
<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="status" jdbcType="INTEGER"/>
</collection>
<collection property="clientRoleDtoList" ofType="com.tuoheng.model.dto.ClientRoleDto" javaType="java.util.List">
<result column="clientId" jdbcType="VARCHAR" property="clientId"/>
@@ -27,7 +28,9 @@
a.password,
b.authority,
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
left join authorities b on a.id = b.user_id
left join t_client_user_role c on a.id = c.user_id
@@ -40,7 +43,9 @@
a.password,
b.authority,
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
left join authorities b on a.id = b.user_id
left join t_client_user_role c on a.id = c.user_id

+ 35
- 3
tuoheng_oidc_server/target/classes/WEB-INF/classes/templates/login.html View File

@@ -54,6 +54,7 @@
display: flex;
flex-direction: column;
background: transparent;
position: relative;
}
form input{
height: 40px;
@@ -101,16 +102,32 @@
.form__tips.is--error{
color: red
}

/* 密码框显示隐藏图表 */
#close_eyes, #open_eyes{
width: 18px;
height: 18px;
position: absolute;
right: 50px;
top: 72px;
}
#open_eyes {
display: none;
}
</style>
</head>
<body>
<div class="login__back">
<div class="login__form">
<h2>拓恒统一登录平台</h2>
<p>TUOHENG LOGIN PLATFORM</p>
<h2>统一登录平台</h2>
<p>LOGIN PLATFORM</p>
<form th:action="@{/login}" method="post">
<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">
<input name="validateCode" placeholder="请输入验证码" />
<input id="codekey" name="codekey" type="hidden"/>
@@ -150,6 +167,21 @@
})
}

// 密码显示隐藏
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() {
$.ajax({
url : "/vercode",//后台请求的数据

+ 1
- 1
tuoheng_oidc_server/target/classes/application.yml View File

@@ -3,7 +3,7 @@ server:

spring:
profiles:
active: dev
active: test
web:
resources:
static-locations: classpath:/

BIN
tuoheng_oidc_server/target/classes/com/tuoheng/config/AuthorizationServerConfig.class View File


BIN
tuoheng_oidc_server/target/classes/com/tuoheng/service/impl/OidcUserInfoServiceImpl.class View File


BIN
tuoheng_oidc_server/target/classes/com/tuoheng/until/RegisteredClientUtil.class View File


+ 35
- 3
tuoheng_oidc_server/target/classes/templates/login.html View File

@@ -54,6 +54,7 @@
display: flex;
flex-direction: column;
background: transparent;
position: relative;
}
form input{
height: 40px;
@@ -101,16 +102,32 @@
.form__tips.is--error{
color: red
}

/* 密码框显示隐藏图表 */
#close_eyes, #open_eyes{
width: 18px;
height: 18px;
position: absolute;
right: 50px;
top: 72px;
}
#open_eyes {
display: none;
}
</style>
</head>
<body>
<div class="login__back">
<div class="login__form">
<h2>拓恒统一登录平台</h2>
<p>TUOHENG LOGIN PLATFORM</p>
<h2>统一登录平台</h2>
<p>LOGIN PLATFORM</p>
<form th:action="@{/login}" method="post">
<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">
<input name="validateCode" placeholder="请输入验证码" />
<input id="codekey" name="codekey" type="hidden"/>
@@ -150,6 +167,21 @@
})
}

// 密码显示隐藏
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() {
$.ajax({
url : "/vercode",//后台请求的数据

Loading…
Cancel
Save