Compare commits

...

2 Commits

Author SHA1 Message Date
曾文豪
217d044940 publish 2.0.24
All checks were successful
/ local-deploy (push) Successful in 19s
2025-04-07 15:45:21 +08:00
曾文豪
9ecf58d75e feat(role): 添加公开服务功能 2025-04-07 15:44:45 +08:00
14 changed files with 57 additions and 20 deletions

18
pom.xml
View File

@@ -6,7 +6,7 @@
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>2.0.23</version>
<version>2.0.24</version>
<packaging>pom</packaging>
<name>springboot-parent</name>
<description>杭州铁晟科技有限公司基础依赖</description>
@@ -58,49 +58,49 @@
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-database</artifactId>
<version>2.0.23</version>
<version>2.0.24</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-login</artifactId>
<version>2.0.23</version>
<version>2.0.24</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-web</artifactId>
<version>2.0.23</version>
<version>2.0.24</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-util</artifactId>
<version>2.0.23</version>
<version>2.0.24</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-platform</artifactId>
<version>2.0.23</version>
<version>2.0.24</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-message</artifactId>
<version>2.0.23</version>
<version>2.0.24</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-role</artifactId>
<version>2.0.23</version>
<version>2.0.24</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-annotation</artifactId>
<version>2.0.23</version>
<version>2.0.24</version>
</dependency>
<dependency>

View File

@@ -6,11 +6,11 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>2.0.23</version>
<version>2.0.24</version>
</parent>
<artifactId>springboot-ademo</artifactId>
<version>2.0.23</version>
<version>2.0.24</version>
<properties>
<maven.compiler.source>8</maven.compiler.source>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>2.0.23</version>
<version>2.0.24</version>
</parent>
<artifactId>springboot-annotation</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>2.0.23</version>
<version>2.0.24</version>
</parent>
<artifactId>springboot-database</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>2.0.23</version>
<version>2.0.24</version>
</parent>
<artifactId>springboot-login</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>2.0.23</version>
<version>2.0.24</version>
</parent>
<artifactId>springboot-message</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>2.0.23</version>
<version>2.0.24</version>
</parent>
<artifactId>springboot-platform</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>2.0.23</version>
<version>2.0.24</version>
</parent>
<artifactId>springboot-role</artifactId>

View File

@@ -13,6 +13,7 @@ import com.tiesheng.role.pojos.vo.GroupTypeDTO;
import com.tiesheng.role.pojos.vo.ServiceMenuVO;
import com.tiesheng.role.service.CoreRoleService;
import com.tiesheng.util.pojos.ApiResp;
import com.tiesheng.util.pojos.DaoBase;
import com.tiesheng.util.pojos.TokenBean;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -43,6 +44,14 @@ public class CommRoleController {
List<CoreRoleAuthority> allOwnerMenus = coreRoleService.getOwnerAuthorityLeafList(tokenBean.getId(), tokenBean.getRoleId());
List<String> list = allOwnerMenus.stream().map(CoreRoleAuthority::getService).collect(Collectors.toList());
// 添加公开服务
list.addAll(coreRoleService.getServerMapper().selectList(new QueryWrapper<CoreRoleServer>()
.eq("is_public", 1).eq("is_deleted", 0).eq("is_open", 1)
).stream().map(DaoBase::getId).collect(Collectors.toList()));
// 去除重复
list = CollUtil.distinct(list);
List<CoreRoleServer> roleServerList = new ArrayList<>();
if (CollUtil.isNotEmpty(list)) {
roleServerList = coreRoleService.getServerMapper().selectList(new QueryWrapper<CoreRoleServer>()

View File

@@ -66,6 +66,12 @@ public class CoreRoleServer extends DaoBase {
@TableField(value = "ext3")
private String ext3;
/**
* 是否公开
*/
@TableField(value = "is_public")
private Integer isPublic;
/**
* 获取名称
*
@@ -227,4 +233,22 @@ public class CoreRoleServer extends DaoBase {
public void setExt3(String ext3) {
this.ext3 = ext3;
}
/**
* 获取是否公开
*
* @return is_public - 是否公开
*/
public Integer getIsPublic() {
return isPublic;
}
/**
* 设置是否公开
*
* @param isPublic 是否公开
*/
public void setIsPublic(Integer isPublic) {
this.isPublic = isPublic;
}
}

View File

@@ -0,0 +1,3 @@
alter table core_role_server
add is_public int default 0 null comment '是否公开';

View File

@@ -17,10 +17,11 @@
<result column="ext1" jdbcType="VARCHAR" property="ext1" />
<result column="ext2" jdbcType="VARCHAR" property="ext2" />
<result column="ext3" jdbcType="VARCHAR" property="ext3" />
<result column="is_public" jdbcType="INTEGER" property="isPublic" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, create_time, update_time, is_deleted, `name`, remark, logo, sort, is_open, link,
ext1, ext2, ext3
ext1, ext2, ext3, is_public
</sql>
</mapper>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>2.0.23</version>
<version>2.0.24</version>
</parent>
<artifactId>springboot-util</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>2.0.23</version>
<version>2.0.24</version>
</parent>
<artifactId>springboot-web</artifactId>