部分判断优化

Signed-off-by: 勤快的小晴同学 <941403820@qq.com>
This commit is contained in:
勤快的小晴同学
2024-03-11 01:50:13 +00:00
committed by Gitee
parent bb0ec5a25a
commit 0d3bae0001
6 changed files with 17 additions and 47 deletions

View File

@@ -1,10 +1,5 @@
package api
/**
* @Description
* @Author 熊猫
* @Date 2022/7/14 17:55
**/
import (
"pandax/apps/system/entity"
"pandax/apps/system/services"
@@ -70,8 +65,5 @@ func (p *SysTenantsApi) DeleteSysTenants(rc *restfulx.ReqCtx) {
// IsTenantAdmin 是否为主租户
func IsTenantAdmin(tenantId int64) bool {
if tenantId == 1 {
return true
}
return false
return tenantId == 1
}

View File

@@ -344,10 +344,7 @@ func (u *UserApi) ExportUser(rc *restfulx.ReqCtx) {
// Build 构建前端路由
func Build(menus []entity.SysMenu) []vo.RouterVo {
equals := func(a string, b string) bool {
if a == b {
return true
}
return false
return a == b
}
rvs := make([]vo.RouterVo, 0)
for _, ms := range menus {