Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
8ce9ef7c
Commit
8ce9ef7c
authored
Jun 26, 2025
by
麻笑宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(amos-boot-module-statistics): 添加条件枚举类
- 新增 ConditionEnum 枚举类,定义了多种条件类型 -包含字符串、数字和日期等不同类型的操作符 - 提供了根据参数类型获取条件枚举的方法
parent
5b673c1c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
0 deletions
+54
-0
ConditionEnum.java
.../amos/boot/module/statistics/api/enums/ConditionEnum.java
+54
-0
No files found.
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/enums/ConditionEnum.java
0 → 100644
View file @
8ce9ef7c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistics
.
api
.
enums
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.annotation.TechnicalParameter
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
java.util.HashMap
;
import
java.util.Map
;
@AllArgsConstructor
@Getter
public
enum
ConditionEnum
{
/**
* 类型枚举
*/
stringEq
(
"等于"
,
"eq"
,
TechnicalParameter
.
ParamType
.
STRING
),
like
(
"匹配"
,
"like"
,
TechnicalParameter
.
ParamType
.
STRING
),
notLike
(
"不匹配"
,
"notLike"
,
TechnicalParameter
.
ParamType
.
STRING
),
numberEq
(
"等于"
,
"eq"
,
TechnicalParameter
.
ParamType
.
BIG_DECIMAL
),
numberGt
(
"大于"
,
"gt"
,
TechnicalParameter
.
ParamType
.
BIG_DECIMAL
),
numberLt
(
"小于"
,
"lt"
,
TechnicalParameter
.
ParamType
.
BIG_DECIMAL
),
numberGe
(
"大于等于"
,
"ge"
,
TechnicalParameter
.
ParamType
.
BIG_DECIMAL
),
numberLe
(
"小于等于"
,
"le"
,
TechnicalParameter
.
ParamType
.
BIG_DECIMAL
),
dateEq
(
"等于"
,
"eq"
,
TechnicalParameter
.
ParamType
.
DATE
),
dateGt
(
"大于"
,
"gt"
,
TechnicalParameter
.
ParamType
.
DATE
),
dateLt
(
"小于"
,
"lt"
,
TechnicalParameter
.
ParamType
.
DATE
),
dateGe
(
"大于等于"
,
"ge"
,
TechnicalParameter
.
ParamType
.
DATE
),
dateLe
(
"小于等于"
,
"le"
,
TechnicalParameter
.
ParamType
.
DATE
),
in
(
"包含"
,
"in"
,
null
),
notin
(
"不包含"
,
"notin"
,
null
),
;
private
String
name
;
private
String
code
;
private
TechnicalParameter
.
ParamType
paramType
;
public
static
JSONArray
getByCode
(
TechnicalParameter
.
ParamType
paramType
)
{
JSONArray
jsonArray
=
new
JSONArray
();
for
(
ConditionEnum
value
:
values
())
{
if
(
value
.
code
.
equals
(
paramType
))
{
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"label"
,
value
.
name
);
jsonObject
.
put
(
"value"
,
value
.
code
);
jsonArray
.
add
(
jsonObject
);
}
}
return
jsonArray
;
}
}
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