Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dili
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
dili
Commits
361083c7
提交
361083c7
authored
9月 02, 2019
作者:
renjianyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
631aaec0
隐藏空白字符变更
内嵌
并排
正在显示
18 个修改的文件
包含
0 行增加
和
1232 行删除
+0
-1232
BooleanStatusEnum.java
.../src/main/java/com/zrqx/core/enums/BooleanStatusEnum.java
+0
-82
GoodsTypeEnum.java
...core/src/main/java/com/zrqx/core/enums/GoodsTypeEnum.java
+0
-115
ProperyTypeEnum.java
...re/src/main/java/com/zrqx/core/enums/ProperyTypeEnum.java
+0
-27
ResourceStatusEnum.java
...src/main/java/com/zrqx/core/enums/ResourceStatusEnum.java
+0
-32
SourceEnum.java
...qx.core/src/main/java/com/zrqx/core/enums/SourceEnum.java
+0
-83
StatusEnum.java
...qx.core/src/main/java/com/zrqx/core/enums/StatusEnum.java
+0
-35
TimeUnitEnum.java
....core/src/main/java/com/zrqx/core/enums/TimeUnitEnum.java
+0
-41
EbookStatusEnum.java
...in/java/com/zrqx/core/enums/resource/EbookStatusEnum.java
+0
-102
LibraryStatusEnum.java
.../java/com/zrqx/core/enums/resource/LibraryStatusEnum.java
+0
-83
FunctionTypeEnum.java
...core/enums/resource/questionlibrary/FunctionTypeEnum.java
+0
-113
MemberAgeAreaEnum.java
...ore/enums/resource/questionlibrary/MemberAgeAreaEnum.java
+0
-115
QuestionTypeEnum.java
...core/enums/resource/questionlibrary/QuestionTypeEnum.java
+0
-135
CollectionUpdateStatusEnum.java
.../enums/sysuser/collection/CollectionUpdateStatusEnum.java
+0
-31
CorrectionEnum.java
...om/zrqx/core/enums/sysuser/correction/CorrectionEnum.java
+0
-73
DictonaryCodeEnum.java
...zrqx/core/enums/sysuser/dictionary/DictonaryCodeEnum.java
+0
-48
MemberStatusEnum.java
.../com/zrqx/core/enums/sysuser/member/MemberStatusEnum.java
+0
-47
RechargeType.java
...java/com/zrqx/core/enums/sysuser/member/RechargeType.java
+0
-35
RechargeTypeInfo.java
.../com/zrqx/core/enums/sysuser/member/RechargeTypeInfo.java
+0
-35
没有找到文件。
com.zrqx.core/src/main/java/com/zrqx/core/enums/BooleanStatusEnum.java
deleted
100644 → 0
浏览文件 @
631aaec0
package
com
.
zrqx
.
core
.
enums
;
import
com.zrqx.core.constant.book.ValidateMessage
;
import
com.zrqx.core.exception.BusinessValidateException
;
public
enum
BooleanStatusEnum
{
/** 是 */
YES
(
"1"
,
"是"
),
/** 否 */
NO
(
"0"
,
"否"
);
private
final
String
code
;
private
final
String
name
;
private
BooleanStatusEnum
(
String
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
}
/**
* 判断名称是否有效
* @param name
* @return
* @author lpf
* @date: 2018年6月11日 下午6:30:16
*/
public
static
boolean
isExist
(
String
code
)
{
BooleanStatusEnum
[]
enums
=
BooleanStatusEnum
.
values
();
for
(
BooleanStatusEnum
BooleanStatusEnum
:
enums
)
{
if
(
BooleanStatusEnum
.
code
.
equals
(
code
))
{
return
true
;
}
}
throw
new
BusinessValidateException
(
ValidateMessage
.
STATUS_EXCEPTION
);
}
/**
* 根据code 获取名字
* @Title getName
* @param code
* @return String
* @author Conan
* @date 2018年6月19日 上午11:28:16
*/
public
static
String
getName
(
String
code
)
{
BooleanStatusEnum
[]
enums
=
BooleanStatusEnum
.
values
();
for
(
BooleanStatusEnum
BooleanStatusEnum
:
enums
)
{
if
(
BooleanStatusEnum
.
code
.
equals
(
code
))
{
return
BooleanStatusEnum
.
name
;
}
}
return
null
;
}
/**
* 根据名字 获取code
* @Title getCode
* @param name
* @return String
* @author Conan
* @date 2018年7月9日 下午2:52:30
*/
public
static
String
getCode
(
String
name
)
{
BooleanStatusEnum
[]
enums
=
BooleanStatusEnum
.
values
();
for
(
BooleanStatusEnum
BooleanStatusEnum
:
enums
)
{
if
(
BooleanStatusEnum
.
name
.
equals
(
name
))
{
return
BooleanStatusEnum
.
code
;
}
}
throw
new
BusinessValidateException
(
ValidateMessage
.
STATUS_EXCEPTION
);
}
public
String
getCode
()
{
return
code
;
}
public
String
getName
()
{
return
name
;
}
}
com.zrqx.core/src/main/java/com/zrqx/core/enums/GoodsTypeEnum.java
deleted
100644 → 0
浏览文件 @
631aaec0
package
com
.
zrqx
.
core
.
enums
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
org.apache.commons.lang3.StringUtils
;
/**
* 商品分类枚举
* @author lpf
* @date 2018年7月11日上午10:48:39
*/
public
enum
GoodsTypeEnum
{
/** 纸质书 */
PBOOK
(
"0"
,
"纸质书"
),
/** 电子书 */
EBOOK
(
"1"
,
"电子书"
),
/** 套餐 */
PACKAGE
(
"2"
,
"套餐"
),
/** 课程 */
COURSE
(
"3"
,
"课程"
),
/** 试题 */
QUESTION
(
"4"
,
"试题"
);
private
final
String
code
;
private
final
String
name
;
private
GoodsTypeEnum
(
String
code
,
String
name
){
this
.
code
=
code
;
this
.
name
=
name
;
}
/**
* 获取需要收取邮费的商品类型
* @return
* @author ydm
* @date: 2018年8月24日 下午2:33:23
*/
public
static
List
<
Integer
>
getNeedCarriage
(){
List
<
Integer
>
list
=
new
ArrayList
<>();
list
.
add
(
Integer
.
valueOf
(
PBOOK
.
code
));
list
.
add
(
Integer
.
valueOf
(
PACKAGE
.
code
));
return
list
;
}
/**
* 获取需要拆分商品的商品类型
* @return
* @author ydm
* @date: 2018年10月22日 下午2:24:19
*/
public
static
List
<
Integer
>
getNeedUnZipCarriage
(){
List
<
Integer
>
list
=
new
ArrayList
<>();
list
.
add
(
Integer
.
valueOf
(
PACKAGE
.
code
));
return
list
;
}
public
static
GoodsTypeEnum
valueOfCode
(
String
code
)
{
if
(
StringUtils
.
isBlank
(
code
))
{
throw
new
IllegalArgumentException
(
"GoodsType Status "
+
code
+
" is blank"
);
}
for
(
GoodsTypeEnum
mt
:
values
())
{
if
(
mt
.
getCode
().
equals
(
code
))
{
return
mt
;
}
}
throw
new
IllegalArgumentException
(
"GoodsType Status "
+
code
+
" is not exist"
);
}
/**
* 通过ID获取中文名称
* @param code
* @return
*/
public
static
String
getName
(
String
code
)
{
if
(
StringUtils
.
isBlank
(
code
))
{
return
null
;
}
for
(
GoodsTypeEnum
mt
:
values
())
{
if
(
mt
.
getCode
().
equals
(
code
))
{
return
mt
.
getName
();
}
}
return
null
;
}
/**
* 获取所有的枚举,以MAP返回
* @return
*/
public
static
HashMap
<
String
,
String
>
getAllEnumMap
()
{
HashMap
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
for
(
GoodsTypeEnum
mt
:
values
())
{
map
.
put
(
mt
.
getCode
(),
mt
.
getName
());
}
return
map
;
}
public
String
getCode
()
{
return
code
;
}
public
String
getName
()
{
return
name
;
}
}
com.zrqx.core/src/main/java/com/zrqx/core/enums/ProperyTypeEnum.java
deleted
100644 → 0
浏览文件 @
631aaec0
package
com
.
zrqx
.
core
.
enums
;
import
com.zrqx.core.util.qiyu.ListTypeImpl
;
import
com.zrqx.core.util.qiyu.ObjectTypeImpl
;
import
com.zrqx.core.util.qiyu.ProperyTypeInterface
;
import
com.zrqx.core.util.qiyu.SimpleTypeImpl
;
public
enum
ProperyTypeEnum
{
/** 基本类型 */
SIMPLE
(
SimpleTypeImpl
.
getInstance
()),
/** list 泛型为非基本类型 */
LIST
(
ListTypeImpl
.
getInstance
()),
/** 对象类型 */
OBJECT
(
ObjectTypeImpl
.
getInstance
());
private
ProperyTypeInterface
interfaces
;
private
ProperyTypeEnum
(
ProperyTypeInterface
interfaces
){
this
.
interfaces
=
interfaces
;
}
public
ProperyTypeInterface
getInterfaces
()
{
return
interfaces
;
}
}
com.zrqx.core/src/main/java/com/zrqx/core/enums/ResourceStatusEnum.java
deleted
100644 → 0
浏览文件 @
631aaec0
package
com
.
zrqx
.
core
.
enums
;
/**
*
* ClassName: StatusEnum
* @Description: TODO
* @author lizhuo
* @date 2019年1月29日
*/
public
enum
ResourceStatusEnum
{
ENTRY
(
0
,
"录入中"
),
TOBEAUDITED
(
1
,
"待审核"
),
INAUDIT
(
2
,
"审核中"
),
AUDITPASS
(
3
,
"审核通过"
),
AUDITFAILED
(
4
,
"审核未通过"
);
//状态码
private
final
int
value
;
private
final
String
value_zh
;
private
ResourceStatusEnum
(
int
value
,
String
value_zh
)
{
this
.
value
=
value
;
this
.
value_zh
=
value_zh
;
}
public
int
getValue
()
{
return
value
;
}
public
String
getValue_zh
()
{
return
value_zh
;
}
}
com.zrqx.core/src/main/java/com/zrqx/core/enums/SourceEnum.java
deleted
100644 → 0
浏览文件 @
631aaec0
package
com
.
zrqx
.
core
.
enums
;
import
java.util.HashMap
;
import
org.apache.commons.lang3.StringUtils
;
/**
* 来源<br>
* pc | wap | app
* @author lpf
* @date 2018年7月9日下午4:23:25
*/
public
enum
SourceEnum
{
/** pc */
PC
(
"0"
,
"PC"
),
/** wap */
WAP
(
"1"
,
"WAP"
),
/** app */
APP
(
"2"
,
"APP"
);
private
final
String
code
;
private
final
String
name
;
private
SourceEnum
(
String
code
,
String
name
){
this
.
code
=
code
;
this
.
name
=
name
;
}
public
static
SourceEnum
valueOfCode
(
String
code
)
{
if
(
StringUtils
.
isBlank
(
code
))
{
throw
new
IllegalArgumentException
(
"Source Status "
+
code
+
" is blank"
);
}
for
(
SourceEnum
mt
:
values
())
{
if
(
mt
.
getCode
().
equals
(
code
))
{
return
mt
;
}
}
throw
new
IllegalArgumentException
(
"Source Status "
+
code
+
" is not exist"
);
}
/**
* 通过ID获取中文名称
* @param code
* @return
*/
public
static
String
getName
(
String
code
)
{
if
(
StringUtils
.
isBlank
(
code
))
{
return
null
;
}
for
(
SourceEnum
mt
:
values
())
{
if
(
mt
.
getCode
().
equals
(
code
))
{
return
mt
.
getName
();
}
}
return
null
;
}
/**
* 获取所有的枚举,以MAP返回
* @return
*/
public
static
HashMap
<
String
,
String
>
getAllEnumMap
()
{
HashMap
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
for
(
SourceEnum
mt
:
values
())
{
map
.
put
(
mt
.
getCode
(),
mt
.
getName
());
}
return
map
;
}
public
String
getCode
()
{
return
code
;
}
public
String
getName
()
{
return
name
;
}
}
com.zrqx.core/src/main/java/com/zrqx/core/enums/StatusEnum.java
deleted
100644 → 0
浏览文件 @
631aaec0
package
com
.
zrqx
.
core
.
enums
;
/**
*
* @ClassName StatusEnum
* @Description: 共享状态枚举
* @author lpf
* @date 2018年5月9日上午9:46:35
*
*/
public
enum
StatusEnum
{
/** 启用 */
ENABLE
(
1
,
"启用"
),
/** 禁用 */
DISABLE
(
0
,
"禁用"
);
//状态码
private
final
int
value
;
// test submit
// test submit
// test co 1
// test conflict 1
private
final
String
value_zh
;
private
StatusEnum
(
int
value
,
String
value_zh
)
{
this
.
value
=
value
;
this
.
value_zh
=
value_zh
;
}
public
int
getValue
()
{
return
value
;
}
public
String
getValue_zh
()
{
return
value_zh
;
}
}
com.zrqx.core/src/main/java/com/zrqx/core/enums/TimeUnitEnum.java
deleted
100644 → 0
浏览文件 @
631aaec0
package
com
.
zrqx
.
core
.
enums
;
import
java.util.concurrent.TimeUnit
;
public
enum
TimeUnitEnum
{
// 微秒 一百万分之一秒(就是毫秒/1000)
微秒
(
TimeUnit
.
MICROSECONDS
),
// 毫秒 千分之一秒
毫秒
(
TimeUnit
.
MILLISECONDS
),
// 毫微秒 十亿分之一秒(就是微秒/1000)
毫微秒
(
TimeUnit
.
NANOSECONDS
),
// 秒
秒
(
TimeUnit
.
SECONDS
),
// 分钟
分钟
(
TimeUnit
.
MINUTES
),
// 小时
小时
(
TimeUnit
.
HOURS
),
// 天
天
(
TimeUnit
.
DAYS
);
private
final
TimeUnit
value
;
private
TimeUnitEnum
(
TimeUnit
value
)
{
this
.
value
=
value
;
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
分钟
.
value
);
System
.
out
.
println
(
TimeUnitEnum
.
getValue
(
"小时"
));
}
public
static
TimeUnit
getValue
(
String
name
)
{
if
(
name
==
null
)
{
throw
new
IllegalArgumentException
(
"TimeUnitEnum name is not null"
);
}
for
(
TimeUnitEnum
mt
:
values
())
{
if
(
mt
.
name
().
equals
(
name
))
{
return
mt
.
value
;
}
}
return
天
.
value
;
}
}
com.zrqx.core/src/main/java/com/zrqx/core/enums/resource/EbookStatusEnum.java
deleted
100644 → 0
浏览文件 @
631aaec0
package
com
.
zrqx
.
core
.
enums
.
resource
;
import
java.util.HashMap
;
/**
* 资源库数据状态
* @author cxc
* @date 2018年7月13日下午9:26:42
*/
public
enum
EbookStatusEnum
{
/** 录入中 */
_0
(
0
,
"录入中"
),
/** 待审核*/
_1
(
1
,
"待审核"
),
/** 审核中 */
_2
(
2
,
"审核中"
),
/** 审核未通过*/
_3
(
3
,
"审核通过"
),
/** 审核未通过 */
_4
(
4
,
"审核未通过"
);
private
final
Integer
code
;
private
final
String
name
;
private
EbookStatusEnum
(
Integer
code
,
String
name
){
this
.
code
=
code
;
this
.
name
=
name
;
}
public
static
EbookStatusEnum
valueOfCode
(
Integer
code
)
{
if
(
code
==
null
)
{
throw
new
IllegalArgumentException
(
"Book Status "
+
code
+
" is blank"
);
}
for
(
EbookStatusEnum
mt
:
values
())
{
if
(
mt
.
getCode
().
equals
(
code
))
{
return
mt
;
}
}
throw
new
IllegalArgumentException
(
"Book Status "
+
code
+
" is not exist"
);
}
/**
* 通过ID获取中文名称
* @param code
* @return
*/
public
static
String
getName
(
Integer
code
)
{
if
(
code
==
null
)
{
return
null
;
}
for
(
EbookStatusEnum
mt
:
values
())
{
if
(
mt
.
getCode
().
equals
(
code
))
{
return
mt
.
getName
();
}
}
return
null
;
}
/**
* 通过ID获取中文名称
* @param code
* @return
*/
public
static
boolean
isExists
(
Integer
code
)
{
if
(
code
==
null
)
{
return
false
;
}
for
(
EbookStatusEnum
mt
:
values
())
{
if
(
mt
.
getCode
().
equals
(
code
))
{
return
true
;
}
}
return
false
;
}
/**
* 获取所有的枚举,以MAP返回
* @return
*/
public
static
HashMap
<
Integer
,
String
>
getAllEnumMap
()
{
HashMap
<
Integer
,
String
>
map
=
new
HashMap
<
Integer
,
String
>();
for
(
EbookStatusEnum
mt
:
values
())
{
map
.
put
(
mt
.
getCode
(),
mt
.
getName
());
}
return
map
;
}
public
Integer
getCode
()
{
return
code
;
}
public
String
getName
()
{
return
name
;
}
}
com.zrqx.core/src/main/java/com/zrqx/core/enums/resource/LibraryStatusEnum.java
deleted
100644 → 0
浏览文件 @
631aaec0
package
com
.
zrqx
.
core
.
enums
.
resource
;
import
java.util.HashMap
;
import
org.apache.commons.lang3.StringUtils
;
/**
* 资源库数据状态
* @author cxc
* @date 2018年7月13日下午9:26:42
*/
public
enum
LibraryStatusEnum
{
/** 已录入 */
STATUS_0
(
"0"
,
"已录入"
),
/** 已上架*/
STATUS_1
(
"1"
,
"已上架"
),
/** 未上架 */
STATUS_2
(
"2"
,
"未上架"
);
private
final
String
code
;
private
final
String
name
;
private
LibraryStatusEnum
(
String
code
,
String
name
){
this
.
code
=
code
;
this
.
name
=
name
;
}
public
static
LibraryStatusEnum
valueOfCode
(
String
code
)
{
if
(
StringUtils
.
isBlank
(
code
))
{
throw
new
IllegalArgumentException
(
"Library Status "
+
code
+
" is blank"
);
}
for
(
LibraryStatusEnum
mt
:
values
())
{
if
(
mt
.
getCode
().
equals
(
code
))
{
return
mt
;
}
}
throw
new
IllegalArgumentException
(
"Library Status "
+
code
+
" is not exist"
);
}
/**
* 通过ID获取中文名称
* @param code
* @return
*/
public
static
String
getName
(
String
code
)
{
if
(
StringUtils
.
isBlank
(
code
))
{
return
null
;
}
for
(
LibraryStatusEnum
mt
:
values
())
{
if
(
mt
.
getCode
().
equals
(
code
))
{
return
mt
.
getName
();
}
}
return
null
;
}
/**
* 获取所有的枚举,以MAP返回
* @return
*/
public
static
HashMap
<
String
,
String
>
getAllEnumMap
()
{
HashMap
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
for
(
LibraryStatusEnum
mt
:
values
())
{
map
.
put
(
mt
.
getCode
(),
mt
.
getName
());
}
return
map
;
}
public
String
getCode
()
{
return
code
;
}
public
String
getName
()
{
return
name
;
}
}
com.zrqx.core/src/main/java/com/zrqx/core/enums/resource/questionlibrary/FunctionTypeEnum.java
deleted
100644 → 0
浏览文件 @
631aaec0
package
com
.
zrqx
.
core
.
enums
.
resource
.
questionlibrary
;
import
java.util.HashMap
;
import
org.apache.commons.lang3.StringUtils
;
/**
* 学习答题枚举
* @author ydm
*
*/
public
enum
FunctionTypeEnum
{
STUDY
(
1
,
"学习"
),
EXAM
(
2
,
"答题"
);
private
final
Integer
code
;
private
final
String
name
;
private
FunctionTypeEnum
(
Integer
code
,
String
name
){
this
.
code
=
code
;
this
.
name
=
name
;
}
public
static
FunctionTypeEnum
valueOfCode
(
Integer
code
)
{
if
(
code
==
null
)
{
throw
new
IllegalArgumentException
(
"Question Type "
+
code
+
" is blank"
);
}
for
(
FunctionTypeEnum
mt
:
values
())
{
if
(
mt
.
getCode
().
equals
(
code
))
{
return
mt
;
}
}
throw
new
IllegalArgumentException
(
"Question Type "
+
code
+
" is not exist"
);
}
/**
* 通过ID获取中文名称
* @param code
* @return
*/
public
static
String
getName
(
Integer
code
)
{
if
(
code
==
null
)
{
return
null
;
}
for
(
FunctionTypeEnum
mt
:
values
())
{
if
(
mt
.
getCode
().
equals
(
code
))
{
return
mt
.
getName
();
}
}
return
null
;
}
/**
* 通过中文名称获取ID
* @param code
* @return
*/
public
static
Integer
getCode
(
String
name
)
{
if
(
StringUtils
.
isBlank
(
name
))
{
return
null
;
}
for
(
FunctionTypeEnum
mt
:
values
())
{
if
(
mt
.
getName
().
equals
(
name
))
{
return
mt
.
getCode
();
}
}
return
null
;
}
/**
* 通过ID获取中文名称
* @param code
* @return
*/
public
static
boolean
isExists
(
Integer
code
)
{
if
(
code
==
null
)
{
return
false
;
}
for
(
FunctionTypeEnum
mt
:
values
())
{
if
(
mt
.
getCode
().
equals
(
code
))
{
return
true
;
}
}
return
false
;
}
/**
* 获取所有的枚举,以MAP返回
* @return
*/
public
static
HashMap
<
Integer
,
String
>
getAllEnumMap
()
{
HashMap
<
Integer
,
String
>
map
=
new
HashMap
<
Integer
,
String
>();
for
(
FunctionTypeEnum
mt
:
values
())
{
map
.
put
(
mt
.
getCode
(),
mt
.
getName
());
}
return
map
;
}
public
Integer
getCode
()
{
return
code
;
}
public
String
getName
()
{
return
name
;
}
}
com.zrqx.core/src/main/java/com/zrqx/core/enums/resource/questionlibrary/MemberAgeAreaEnum.java
deleted
100644 → 0
浏览文件 @
631aaec0
package
com
.
zrqx
.
core
.
enums
.
resource
.
questionlibrary
;
import
java.util.HashMap
;
import
org.apache.commons.lang3.StringUtils
;
/**
* 用户年龄段
* @author ydm
* @date 2019年3月17日下午9:26:42
*/
public
enum
MemberAgeAreaEnum
{
AGE_1
(
1
,
"25岁以下"
),
AGE_2
(
2
,
"26-35"
),
AGE_3
(
3
,
"36-45"
),
AGE_4
(
4
,
"46-60"
);
private
final
Integer
code
;
private
final
String
name
;
private
MemberAgeAreaEnum
(
Integer
code
,
String
name
){
this
.
code
=
code
;
this
.
name
=
name
;
}
public
static
MemberAgeAreaEnum
valueOfCode
(
Integer
code
)
{
if
(
code
==
null
)
{
throw
new
IllegalArgumentException
(
"MemberAgeArea "
+
code
+
" is blank"
);
}
for
(
MemberAgeAreaEnum
mt
:
values
())
{
if
(
mt
.
getCode
().
equals
(
code
))
{
return
mt
;
}
}
throw
new
IllegalArgumentException
(
"MemberAgeArea "
+
code
+
" is not exist"
);
}
/**
* 通过ID获取中文名称
* @param code
* @return
*/
public
static
String
getName
(
Integer
code
)
{
if
(
code
==
null
)
{
return
null
;
}
for
(
MemberAgeAreaEnum
mt
:
values
())
{
if
(
mt
.
getCode
().
equals
(
code
))
{
return
mt
.
getName
();
}
}
return
null
;
}
/**
* 通过中文名称获取ID
* @param code
* @return
*/
public
static
Integer
getCode
(
String
name
)
{
if
(
StringUtils
.
isBlank
(
name
))
{
return
null
;
}
for
(
MemberAgeAreaEnum
mt
:
values
())
{
if
(
mt
.
getName
().
equals
(
name
))
{
return
mt
.
getCode
();
}
}
return
null
;
}
/**
* 通过ID获取中文名称
* @param code
* @return
*/
public
static
boolean
isExists
(
Integer
code
)
{
if
(
code
==
null
)
{
return
false
;
}
for
(
MemberAgeAreaEnum
mt
:
values
())
{
if
(
mt
.
getCode
().
equals
(
code
))
{
return
true
;
}
}
return
false
;
}
/**
* 获取所有的枚举,以MAP返回
* @return
*/
public
static
HashMap
<
Integer
,
String
>
getAllEnumMap
()
{
HashMap
<
Integer
,
String
>
map
=
new
HashMap
<
Integer
,
String
>();
for
(
MemberAgeAreaEnum
mt
:
values
())
{
map
.
put
(
mt
.
getCode
(),
mt
.
getName
());
}
return
map
;
}
public
Integer
getCode
()
{
return
code
;
}
public
String
getName
()
{
return
name
;
}
}
com.zrqx.core/src/main/java/com/zrqx/core/enums/resource/questionlibrary/QuestionTypeEnum.java
deleted
100644 → 0
浏览文件 @
631aaec0
package
com
.
zrqx
.
core
.
enums
.
resource
.
questionlibrary
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.commons.lang3.StringUtils
;
/**
* 试题类型
* @author ydm
* @date 2019年3月17日下午9:26:42
*/
public
enum
QuestionTypeEnum
{
TYPE_1
(
1
,
"单选"
),
TYPE_2
(
2
,
"多选"
),
TYPE_3
(
3
,
"判断"
),
TYPE_4
(
4
,
"填空"
),
TYPE_5
(
5
,
"简答"
),
TYPE_6
(
6
,
"案例"
);
private
final
Integer
code
;
private
final
String
name
;
private
QuestionTypeEnum
(
Integer
code
,
String
name
){
this
.
code
=
code
;
this
.
name
=
name
;
}
/**
* 获取测试需要的试题类型
* @return
*/
public
static
List
<
QuestionTypeEnum
>
getExamType
(){
List
<
QuestionTypeEnum
>
list
=
new
ArrayList
<
QuestionTypeEnum
>();
list
.
add
(
TYPE_1
);
list
.
add
(
TYPE_2
);
list
.
add
(
TYPE_3
);
list
.
add
(
TYPE_4
);
return
list
;
}
public
static
QuestionTypeEnum
valueOfCode
(
Integer
code
)
{
if
(
code
==
null
)
{
throw
new
IllegalArgumentException
(
"Question Type "
+
code
+
" is blank"
);
}
for
(
QuestionTypeEnum
mt
:
values
())
{
if
(
mt
.
getCode
().
equals
(
code
))
{
return
mt
;
}
}
throw
new
IllegalArgumentException
(
"Question Type "
+
code
+
" is not exist"
);
}
/**
* 通过ID获取中文名称
* @param code
* @return
*/
public
static
String
getName
(
Integer
code
)
{
if
(
code
==
null
)
{
return
null
;
}
for
(
QuestionTypeEnum
mt
:
values
())
{
if
(
mt
.
getCode
().
equals
(
code
))
{
return
mt
.
getName
();
}
}
return
null
;
}
/**
* 通过中文名称获取ID
* @param code
* @return
*/
public
static
Integer
getCode
(
String
name
)
{
if
(
StringUtils
.
isBlank
(
name
))
{
return
null
;
}
for
(
QuestionTypeEnum
mt
:
values
())
{
if
(
mt
.
getName
().
equals
(
name
))
{
return
mt
.
getCode
();
}
}
return
null
;
}
/**
* 通过ID获取中文名称
* @param code
* @return
*/
public
static
boolean
isExists
(
Integer
code
)
{
if
(
code
==
null
)
{
return
false
;
}
for
(
QuestionTypeEnum
mt
:
values
())
{
if
(
mt
.
getCode
().
equals
(
code
))
{
return
true
;
}
}
return
false
;
}
/**
* 获取所有的枚举,以MAP返回
* @return
*/
public
static
HashMap
<
Integer
,
String
>
getAllEnumMap
()
{
HashMap
<
Integer
,
String
>
map
=
new
HashMap
<
Integer
,
String
>();
for
(
QuestionTypeEnum
mt
:
values
())
{
map
.
put
(
mt
.
getCode
(),
mt
.
getName
());
}
return
map
;
}
public
Integer
getCode
()
{
return
code
;
}
public
String
getName
()
{
return
name
;
}
}
com.zrqx.core/src/main/java/com/zrqx/core/enums/sysuser/collection/CollectionUpdateStatusEnum.java
deleted
100644 → 0
浏览文件 @
631aaec0
package
com
.
zrqx
.
core
.
enums
.
sysuser
.
collection
;
/**
* 收藏或取消收藏状态
* @author lw
* @date 2018年8月27日下午3:54:33
*/
public
enum
CollectionUpdateStatusEnum
{
// 收藏
COLLECTON
(
1
,
"收藏"
),
// 删除收藏
DEL_COLLECTION
(
0
,
"删除收藏"
);
private
final
Integer
code
;
private
final
String
name
;
private
CollectionUpdateStatusEnum
(
Integer
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
}
public
Integer
getCode
()
{
return
code
;
}
public
String
getName
()
{
return
name
;
}
}
com.zrqx.core/src/main/java/com/zrqx/core/enums/sysuser/correction/CorrectionEnum.java
deleted
100644 → 0
浏览文件 @
631aaec0
/**
* @author niguanghui
* @date 2018年12月5日 上午11:55:11
*/
package
com
.
zrqx
.
core
.
enums
.
sysuser
.
correction
;
import
java.util.HashMap
;
import
org.apache.commons.lang3.StringUtils
;
/**
* 纠错管理
*
* @author niguanghui
* @date 2018年12月5日上午11:55:11
*/
public
enum
CorrectionEnum
{
// 未审核
NOT_REVIEW
(
0
,
"未审核"
),
// 已审核
YES_REVIEW
(
1
,
"已审核"
),
// 已修改
YES_REVISED
(
2
,
"已修改"
);
private
final
Integer
code
;
private
final
String
name
;
private
CorrectionEnum
(
Integer
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
}
/**
* 通过ID获取中文名称
*
* @param code
* @return
*/
public
static
String
getName
(
String
code
)
{
if
(
StringUtils
.
isBlank
(
code
))
{
return
null
;
}
for
(
CorrectionEnum
mt
:
values
())
{
if
(
mt
.
getCode
().
equals
(
code
))
{
return
mt
.
getName
();
}
}
return
null
;
}
/**
* 获取所有的枚举,以MAP返回
*
* @return
*/
public
static
HashMap
<
Integer
,
String
>
getAllEnumMap
()
{
HashMap
<
Integer
,
String
>
map
=
new
HashMap
<
Integer
,
String
>();
for
(
CorrectionEnum
mt
:
values
())
{
map
.
put
(
mt
.
getCode
(),
mt
.
getName
());
}
return
map
;
}
public
Integer
getCode
()
{
return
code
;
}
public
String
getName
()
{
return
name
;
}
}
com.zrqx.core/src/main/java/com/zrqx/core/enums/sysuser/dictionary/DictonaryCodeEnum.java
deleted
100644 → 0
浏览文件 @
631aaec0
package
com
.
zrqx
.
core
.
enums
.
sysuser
.
dictionary
;
/**
* 数据字典code
* @author pc
*
*/
public
enum
DictonaryCodeEnum
{
/**
* 系统安全配置
*/
SYSTEMSAFTY
(
"SYSTEMSAFTY"
,
"系统安全"
)
,
/**
* 网站基础参数配置
*/
SITE
(
"SITE"
,
"网站基础参数"
)
,
/**
* 会员参数配置
*/
MEMBER
(
"MEMBER"
,
"会员参数"
)
,
/**
* 邮件参数配置
*/
EMAIL
(
"EMAIL"
,
"邮件参数"
)
,
/**
* 短信参数配置
*/
SHORTMESSAGE
(
"SHORTMESSAGE"
,
"短信参数"
)
,
/**
* 会员签到参数
*/
MEMBERSIGNED
(
"MEMBERSIGNED"
,
"会员签到参数"
)
;
private
final
String
code
;
private
final
String
description
;
private
DictonaryCodeEnum
(
String
code
,
String
description
)
{
this
.
code
=
code
;
this
.
description
=
description
;
}
public
String
getCode
()
{
return
code
;
}
public
String
getDescription
()
{
return
description
;
}
}
com.zrqx.core/src/main/java/com/zrqx/core/enums/sysuser/member/MemberStatusEnum.java
deleted
100644 → 0
浏览文件 @
631aaec0
package
com
.
zrqx
.
core
.
enums
.
sysuser
.
member
;
import
java.util.HashMap
;
import
java.util.Map
;
import
com.zrqx.core.exception.BaseException
;
/**
* 个人会员
* 启用、禁用
* @author lw
* @date 2018年7月25日下午5:27:39
*/
public
enum
MemberStatusEnum
{
/** 启用 */
ENABLE
(
"1"
,
"启用"
),
/** 禁用 */
DISABLE
(
"0"
,
"禁用"
);
private
final
String
code
;
private
final
String
name
;
public
static
String
getName
(
String
code
){
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
map
.
put
(
ENABLE
.
getCode
(),
ENABLE
.
getName
());
map
.
put
(
DISABLE
.
getCode
(),
DISABLE
.
getName
());
return
map
.
get
(
code
);
}
private
MemberStatusEnum
(
String
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
}
public
String
getCode
()
{
return
code
;
}
public
String
getName
()
{
return
name
;
}
}
com.zrqx.core/src/main/java/com/zrqx/core/enums/sysuser/member/RechargeType.java
deleted
100644 → 0
浏览文件 @
631aaec0
package
com
.
zrqx
.
core
.
enums
.
sysuser
.
member
;
/**
* 充值类型
* @author pc
*
*/
public
enum
RechargeType
{
/**
* 积分
*/
SCORE
(
0
,
"积分"
),
/**
* 成长值
*/
GROWTHVALUE
(
1
,
"成长值"
);
private
final
Integer
value
;
private
final
String
description
;
private
RechargeType
(
Integer
value
,
String
description
)
{
this
.
value
=
value
;
this
.
description
=
description
;
}
public
Integer
getValue
()
{
return
value
;
}
public
String
getDescription
()
{
return
description
;
}
}
com.zrqx.core/src/main/java/com/zrqx/core/enums/sysuser/member/RechargeTypeInfo.java
deleted
100644 → 0
浏览文件 @
631aaec0
package
com
.
zrqx
.
core
.
enums
.
sysuser
.
member
;
/**
* 充值类型
* @author pc
*
*/
public
enum
RechargeTypeInfo
{
/**
* 减少
*/
SUB
(
0
,
"减少"
),
/**
* 增加
*/
ADD
(
1
,
"增加"
);
private
final
Integer
value
;
private
final
String
description
;
private
RechargeTypeInfo
(
Integer
value
,
String
description
)
{
this
.
value
=
value
;
this
.
description
=
description
;
}
public
Integer
getValue
()
{
return
value
;
}
public
String
getDescription
()
{
return
description
;
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论