Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
one-certificate-system
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
one-certificate-system
Commits
710f03d3
Commit
710f03d3
authored
Jul 30, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加目录字段
parent
d5b27230
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
130 additions
and
0 deletions
+130
-0
one-certificate-manager/src/main/java/com/mortals/xhx/common/code/ChildStatusEnum.java
...ain/java/com/mortals/xhx/common/code/ChildStatusEnum.java
+65
-0
one-certificate-manager/src/main/java/com/mortals/xhx/common/code/DeletedEnum.java
...rc/main/java/com/mortals/xhx/common/code/DeletedEnum.java
+65
-0
No files found.
one-certificate-manager/src/main/java/com/mortals/xhx/common/code/ChildStatusEnum.java
0 → 100644
View file @
710f03d3
package
com.mortals.xhx.common.code
;
import
java.util.LinkedHashMap
;
import
java.util.Map
;
/**
* 子证状态(0.禁用,1.启用)枚举类
*
* @author zxfei
*/
public
enum
ChildStatusEnum
{
禁用
(
0
,
"禁用"
),
启用
(
1
,
"启用"
);
private
Integer
value
;
private
String
desc
;
ChildStatusEnum
(
Integer
value
,
String
desc
)
{
this
.
value
=
value
;
this
.
desc
=
desc
;
}
public
Integer
getValue
()
{
return
this
.
value
;
}
public
String
getDesc
()
{
return
this
.
desc
;
}
public
static
ChildStatusEnum
getByValue
(
Integer
value
)
{
for
(
ChildStatusEnum
childStatusEnum
:
ChildStatusEnum
.
values
())
{
if
(
childStatusEnum
.
getValue
()
==
value
)
{
return
childStatusEnum
;
}
}
return
null
;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public
static
Map
<
String
,
String
>
getEnumMap
(
Integer
...
eItem
)
{
Map
<
String
,
String
>
resultMap
=
new
LinkedHashMap
<>();
for
(
ChildStatusEnum
item
:
ChildStatusEnum
.
values
())
{
try
{
boolean
hasE
=
false
;
for
(
Integer
e
:
eItem
)
{
if
(
item
.
getValue
()
==
e
)
{
hasE
=
true
;
break
;
}
}
if
(!
hasE
)
{
resultMap
.
put
(
item
.
getValue
()
+
""
,
item
.
getDesc
());
}
}
catch
(
Exception
ex
)
{
}
}
return
resultMap
;
}
}
\ No newline at end of file
one-certificate-manager/src/main/java/com/mortals/xhx/common/code/DeletedEnum.java
0 → 100644
View file @
710f03d3
package
com.mortals.xhx.common.code
;
import
java.util.LinkedHashMap
;
import
java.util.Map
;
/**
* 删除状态(0.未删除,1.已删除)枚举类
*
* @author zxfei
*/
public
enum
DeletedEnum
{
未删除
(
0
,
"未删除"
),
已删除
(
1
,
"已删除"
);
private
Integer
value
;
private
String
desc
;
DeletedEnum
(
Integer
value
,
String
desc
)
{
this
.
value
=
value
;
this
.
desc
=
desc
;
}
public
Integer
getValue
()
{
return
this
.
value
;
}
public
String
getDesc
()
{
return
this
.
desc
;
}
public
static
DeletedEnum
getByValue
(
Integer
value
)
{
for
(
DeletedEnum
deletedEnum
:
DeletedEnum
.
values
())
{
if
(
deletedEnum
.
getValue
()
==
value
)
{
return
deletedEnum
;
}
}
return
null
;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public
static
Map
<
String
,
String
>
getEnumMap
(
Integer
...
eItem
)
{
Map
<
String
,
String
>
resultMap
=
new
LinkedHashMap
<>();
for
(
DeletedEnum
item
:
DeletedEnum
.
values
())
{
try
{
boolean
hasE
=
false
;
for
(
Integer
e
:
eItem
)
{
if
(
item
.
getValue
()
==
e
)
{
hasE
=
true
;
break
;
}
}
if
(!
hasE
)
{
resultMap
.
put
(
item
.
getValue
()
+
""
,
item
.
getDesc
());
}
}
catch
(
Exception
ex
)
{
}
}
return
resultMap
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment