Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-parent
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 86d3f186
authored
Jun 14, 2022
by
levphon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新e盾maven父级
0 parents
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
508 additions
and
0 deletions
ne-shield-common/pom.xml
ne-shield-common/src/main/java/cn/com/glsx/admin/common/constant/Constants.java
ne-shield-common/src/main/java/cn/com/glsx/admin/common/constant/RedisConstants.java
ne-shield-common/src/main/java/cn/com/glsx/admin/common/constant/UserConstants.java
ne-shield-common/src/main/java/cn/com/glsx/admin/common/enums/MenuType.java
ne-shield-common/src/main/java/cn/com/glsx/admin/common/enums/UserGlobalType.java
ne-shield-common/src/main/java/cn/com/glsx/admin/common/util/RegexUtil.java
pom.xml
ne-shield-common/pom.xml
0 → 100644
View file @
86d3f18
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<groupId>
com.glsx
</groupId>
<artifactId>
ne-shield-parent
</artifactId>
<version>
1.2.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<packaging>
jar
</packaging>
<artifactId>
ne-shield-common
</artifactId>
<dependencies>
<!-- 运行环境上下文 -->
<dependency>
<groupId>
com.glsx
</groupId>
<artifactId>
rest-admin-context
</artifactId>
</dependency>
<dependency>
<groupId>
com.glsx
</groupId>
<artifactId>
rest-admin-core
</artifactId>
</dependency>
<dependency>
<groupId>
com.glsx
</groupId>
<artifactId>
rest-admin-common
</artifactId>
</dependency>
</dependencies>
</project>
ne-shield-common/src/main/java/cn/com/glsx/admin/common/constant/Constants.java
0 → 100644
View file @
86d3f18
package
cn
.
com
.
glsx
.
admin
.
common
.
constant
;
import
com.glsx.plat.core.constant.BasicConstants
;
/**
* 〈一句话功能简述〉<br>
* 公共常量类
*
* @author liuyf
* @since 1.0.0
*/
public
final
class
Constants
extends
BasicConstants
{
public
final
static
String
SERVER_NAME
=
"glsx_ne_shield"
;
public
final
static
int
IS_ROOT_DEPARTMENT
=
1
;
public
final
static
int
IS_NOT_ROOT_DEPARTMENT
=
0
;
}
ne-shield-common/src/main/java/cn/com/glsx/admin/common/constant/RedisConstants.java
0 → 100644
View file @
86d3f18
package
cn
.
com
.
glsx
.
admin
.
common
.
constant
;
/**
* @author: taoyr
**/
public
interface
RedisConstants
{
String
MENU_NO_LOCK
=
"menu_no_lock"
;
Integer
FIVE_SECONDS
=
5
;
}
ne-shield-common/src/main/java/cn/com/glsx/admin/common/constant/UserConstants.java
0 → 100644
View file @
86d3f18
package
cn
.
com
.
glsx
.
admin
.
common
.
constant
;
import
com.glsx.plat.core.enums.SysConstants
;
/**
* @author: taoyr
**/
public
interface
UserConstants
extends
SysConstants
{
Long
adminRoleId
=
1L
;
/**
* 角色权限传播类型
*/
enum
RolePermitCastType
implements
SysConstants
{
oneself
{
@Override
public
Integer
getCode
()
{
return
0
;
}
@Override
public
String
getValue
()
{
return
"本人"
;
}
@Override
public
String
getBeanName
()
{
return
"oneselfStrategy"
;
}
},
subordinate
{
@Override
public
Integer
getCode
()
{
return
1
;
}
@Override
public
String
getValue
()
{
return
"本人及下属"
;
}
@Override
public
String
getBeanName
()
{
return
"subOrdinateStrategy"
;
}
},
selfDepartment
{
@Override
public
Integer
getCode
()
{
return
2
;
}
@Override
public
String
getValue
()
{
return
"本部门"
;
}
@Override
public
String
getBeanName
()
{
return
"selfDepartmentStrategy"
;
}
},
subDepartment
{
@Override
public
Integer
getCode
()
{
return
3
;
}
@Override
public
String
getValue
()
{
return
"本部门及下属部门"
;
}
@Override
public
String
getBeanName
()
{
return
"subDepartmentStrategy"
;
}
},
all
{
@Override
public
Integer
getCode
()
{
return
4
;
}
@Override
public
String
getValue
()
{
return
"全部"
;
}
@Override
public
String
getBeanName
()
{
return
"allStrategy"
;
}
},
assignDepartments
{
@Override
public
Integer
getCode
()
{
return
5
;
}
@Override
public
String
getValue
()
{
return
"指定部门"
;
}
@Override
public
String
getBeanName
()
{
return
"assignDepartmentStrategy"
;
}
},
assignTenants
{
@Override
public
Integer
getCode
()
{
return
6
;
}
@Override
public
String
getValue
()
{
return
"指定租户"
;
}
@Override
public
String
getBeanName
()
{
return
"assignTenantStrategy"
;
}
},
;
public
static
String
getValueByCode
(
Integer
code
)
{
for
(
RolePermitCastType
status
:
RolePermitCastType
.
values
())
{
if
(
status
.
getCode
().
equals
(
code
))
{
return
status
.
getValue
();
}
}
return
null
;
}
public
static
String
getBeanNameByCode
(
Integer
code
)
{
for
(
RolePermitCastType
status
:
RolePermitCastType
.
values
())
{
if
(
status
.
getCode
().
equals
(
code
))
{
return
status
.
getBeanName
();
}
}
return
null
;
}
public
abstract
String
getBeanName
();
}
/**
* 角色可见度(0=共享,1=系统管理员,2=指定租户)
*/
enum
RoleVisibility
implements
SysConstants
{
share
{
@Override
public
Integer
getCode
()
{
return
0
;
}
@Override
public
String
getValue
()
{
return
"共享"
;
}
},
superAdmin
{
@Override
public
Integer
getCode
()
{
return
1
;
}
@Override
public
String
getValue
()
{
return
"超级管理员"
;
}
},
specifyTenants
{
@Override
public
Integer
getCode
()
{
return
2
;
}
@Override
public
String
getValue
()
{
return
"指定租户"
;
}
};
public
static
String
getValueByCode
(
Integer
code
)
{
for
(
EnableStatus
status
:
EnableStatus
.
values
())
{
if
(
status
.
getCode
().
equals
(
code
))
{
return
status
.
getValue
();
}
}
return
null
;
}
}
}
ne-shield-common/src/main/java/cn/com/glsx/admin/common/enums/MenuType.java
0 → 100644
View file @
86d3f18
package
cn
.
com
.
glsx
.
admin
.
common
.
enums
;
import
com.google.common.collect.Lists
;
import
lombok.Getter
;
import
java.util.List
;
/**
* @author payu
*/
@Getter
public
enum
MenuType
{
DIRECTORY
(
1
,
"目录"
),
MENU
(
2
,
"菜单"
),
BUTTON
(
3
,
"按钮"
),
TEXT_BUTTON
(
4
,
"文本按钮"
);
private
Integer
code
;
private
String
type
;
MenuType
(
Integer
code
,
String
type
)
{
this
.
code
=
code
;
this
.
type
=
type
;
}
public
static
List
<
Integer
>
getAllTypes
()
{
List
<
Integer
>
list
=
Lists
.
newArrayList
();
MenuType
[]
types
=
MenuType
.
values
();
for
(
MenuType
type
:
types
)
{
list
.
add
(
type
.
getCode
());
}
return
list
;
}
}
ne-shield-common/src/main/java/cn/com/glsx/admin/common/enums/UserGlobalType.java
0 → 100644
View file @
86d3f18
package
cn
.
com
.
glsx
.
admin
.
common
.
enums
;
import
lombok.Getter
;
/**
* @author payu
*/
@Getter
public
enum
UserGlobalType
{
NORMAL
(
0
,
"普通用户"
),
SUPER_ADMIN
(
1
,
"超级管理员"
),
TENANT_ADMIN
(
2
,
"租户管理员"
);
private
Integer
type
;
private
String
name
;
UserGlobalType
(
Integer
type
,
String
name
)
{
this
.
type
=
type
;
this
.
name
=
name
;
}
}
ne-shield-common/src/main/java/cn/com/glsx/admin/common/util/RegexUtil.java
0 → 100644
View file @
86d3f18
package
cn
.
com
.
glsx
.
admin
.
common
.
util
;
/**
* @author taoyr
*/
public
class
RegexUtil
{
//public static final String pwdRegex = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,18}$";
public
static
final
String
pwdRegex
=
"^[0-9A-Za-z]{6,18}$"
;
public
static
final
String
mobileRegex
=
"^1(3|4|5|6|7|8|9)\\d{9}$"
;
public
static
boolean
regexPwd
(
String
pwd
)
{
return
pwd
.
matches
(
pwdRegex
);
}
}
pom.xml
0 → 100644
View file @
86d3f18
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<groupId>
com.glsx
</groupId>
<artifactId>
rest-framework-admin
</artifactId>
<version>
1.2.0-SNAPSHOT
</version>
<relativePath/>
<!-- lookup parent from repository -->
</parent>
<artifactId>
ne-shield-parent
</artifactId>
<version>
1.2.0-SNAPSHOT
</version>
<modelVersion>
4.0.0
</modelVersion>
<packaging>
pom
</packaging>
<description>
Microservice Scaffolding project for Spring Boot
</description>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.reporting.outputEncoding>
UTF-8
</project.reporting.outputEncoding>
<maven.compiler.source>
1.8
</maven.compiler.source>
<maven.compiler.target>
1.8
</maven.compiler.target>
<spring-cloud.version>
Hoxton.SR10
</spring-cloud.version>
<spring-cloud-alibaba.version>
2.2.6.RELEASE
</spring-cloud-alibaba.version>
<rest-admin-framework.version>
1.2.0-SNAPSHOT
</rest-admin-framework.version>
<org.mapstruct.version>
1.4.2.Final
</org.mapstruct.version>
<!-- <repo.internal.snapshots.url>https://repo1.maven.org/maven2</repo.internal.snapshots.url>-->
<!-- <repo.internal.releases.url>https://repo1.maven.org/maven2</repo.internal.releases.url>-->
<!-- <repo.proxy.url>https://repo1.maven.org/maven2</repo.proxy.url>-->
<!-- <repo.external.url>https://repo1.maven.org/maven2</repo.external.url>-->
<local.nexus.snapshots.url>
http://192.168.3.233/nexus/content/repositories/snapshots/
</local.nexus.snapshots.url>
<local.nexus.releases.url>
http://192.168.3.233/nexus/content/repositories/releases/
</local.nexus.releases.url>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-dependencies
</artifactId>
<version>
${spring-cloud.version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
<!--spring cloud alibaba-->
<dependency>
<groupId>
com.alibaba.cloud
</groupId>
<artifactId>
spring-cloud-alibaba-dependencies
</artifactId>
<version>
${spring-cloud-alibaba.version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
<!--rest-admin-framework-->
<dependency>
<groupId>
com.glsx
</groupId>
<artifactId>
rest-admin-framework-dependencies
</artifactId>
<version>
${rest-admin-framework.version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<resources>
<resource>
<directory>
src/main/java
</directory>
<excludes>
<exclude>
**/*.java
</exclude>
</excludes>
</resource>
<resource>
<directory>
src/main/resources
</directory>
<filtering>
true
</filtering>
<includes>
<include>
**/*.*
</include>
</includes>
</resource>
<resource>
<directory>
src/main/java
</directory>
<includes>
<include>
**/*.xml
</include>
</includes>
<filtering>
true
</filtering>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-compiler-plugin
</artifactId>
<version>
3.8.1
</version>
<configuration>
<source>
1.8
</source>
<target>
1.8
</target>
<encoding>
UTF-8
</encoding>
<annotationProcessorPaths>
<path>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<version>
${lombok.version}
</version>
</path>
<path>
<groupId>
org.mapstruct
</groupId>
<artifactId>
mapstruct-processor
</artifactId>
<version>
${org.mapstruct.version}
</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-resources-plugin
</artifactId>
<version>
3.0.2
</version>
<configuration>
<encoding>
UTF-8
</encoding>
<useDefaultDelimiters>
false
</useDefaultDelimiters>
<delimiters>
<delimiter>
${*}
</delimiter>
</delimiters>
</configuration>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-war-plugin
</artifactId>
<version>
3.2.3
</version>
<configuration>
<failOnMissingWebXml>
false
</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<version>
2.2.6.RELEASE
</version>
<configuration>
<classifier>
exec
</classifier>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>
dev
</id>
<activation>
<activeByDefault>
true
</activeByDefault>
</activation>
<properties>
<profile.active>
dev
</profile.active>
</properties>
</profile>
<profile>
<id>
test
</id>
<properties>
<profile.active>
test
</profile.active>
</properties>
</profile>
<profile>
<id>
prod
</id>
<properties>
<profile.active>
prod
</profile.active>
</properties>
</profile>
</profiles>
<modules>
<module>
ne-shield-common
</module>
<!-- <module>ne-shield-usercenter</module>-->
<!-- <module>ne-shield-ordercenter</module>-->
<!-- <module>ne-shield-reportcenter</module>-->
<!-- <module>ne-shield-notifycenter</module>-->
<!-- <module>ne-shield-publiccenter</module>-->
<!-- <module>ne-shield-alarmcenter</module>-->
<!-- <module>ne-shield-loggincenter</module>-->
<!-- <module>ne-shield-kafkaconsumer</module>-->
</modules>
</project>
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment