Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JeeSpringCloud
Commits
e9629e7a
Commit
e9629e7a
authored
Dec 13, 2018
by
Sun
Browse files
no commit message
parent
e4054436
Changes
411
Hide whitespace changes
Inline
Side-by-side
Too many changes to show.
To preserve performance only
20 of 411+
files are displayed.
Plain diff
Email patch
JeeSpringCloud/jeespring-company/src/main/java/cn/com/duiba/credits/sdk/result/AddCreditResult.java
deleted
100644 → 0
View file @
e4054436
package
cn.com.duiba.credits.sdk.result
;
public
class
AddCreditResult
{
private
boolean
success
;
private
String
errorMessage
=
""
;
private
String
bizId
=
""
;
private
Long
credits
=-
1L
;
//用户积分余额
public
AddCreditResult
(
boolean
success
){
this
.
success
=
success
;
}
public
String
toString
(){
if
(
success
){
return
"{'status':'ok','errorMessage':'','bizId':'"
+
bizId
+
"','credits':'"
+
credits
+
"'}"
;
}
else
{
return
"{'status':'fail','errorMessage':'"
+
errorMessage
+
"','credits':'"
+
credits
+
"'}"
;
}
}
public
String
getErrorMessage
()
{
return
errorMessage
;
}
public
void
setErrorMessage
(
String
errorMessage
)
{
this
.
errorMessage
=
errorMessage
;
}
public
String
getBizId
()
{
return
bizId
;
}
public
void
setBizId
(
String
bizId
)
{
this
.
bizId
=
bizId
;
}
public
Long
getCredits
()
{
return
credits
;
}
public
void
setCredits
(
Long
credits
)
{
this
.
credits
=
credits
;
}
}
JeeSpringCloud/jeespring-company/src/main/java/cn/com/duiba/credits/sdk/result/CreditConsumeResult.java
deleted
100644 → 0
View file @
e4054436
package
cn.com.duiba.credits.sdk.result
;
public
class
CreditConsumeResult
{
private
boolean
success
;
private
String
errorMessage
=
""
;
private
String
bizId
=
""
;
private
Long
credits
=-
1L
;
//用户积分余额
public
CreditConsumeResult
(
boolean
success
){
this
.
success
=
success
;
}
public
String
toString
(){
if
(
success
){
return
"{'status':'ok','errorMessage':'','bizId':'"
+
bizId
+
"','credits':'"
+
credits
+
"'}"
;
}
else
{
return
"{'status':'fail','errorMessage':'"
+
errorMessage
+
"','credits':'"
+
credits
+
"'}"
;
}
}
public
String
getErrorMessage
()
{
return
errorMessage
;
}
public
void
setErrorMessage
(
String
errorMessage
)
{
this
.
errorMessage
=
errorMessage
;
}
public
String
getBizId
()
{
return
bizId
;
}
public
void
setBizId
(
String
bizId
)
{
this
.
bizId
=
bizId
;
}
public
Long
getCredits
()
{
return
credits
;
}
public
void
setCredits
(
Long
credits
)
{
this
.
credits
=
credits
;
}
}
JeeSpringCloud/jeespring-company/src/main/java/cn/com/duiba/credits/sdk/result/VirtualResult.java
deleted
100644 → 0
View file @
e4054436
package
cn.com.duiba.credits.sdk.result
;
public
class
VirtualResult
{
private
String
status
;
//充值是否成功的状态
private
String
errorMessage
=
""
;
//失败信息
private
String
supplierBizId
=
""
;
//虚拟商品充值流水号
private
Long
credits
=-
1L
;
public
VirtualResult
(
String
status
){
this
.
status
=
status
;
}
public
String
toString
(){
if
(
status
==
"success"
){
return
"{'status':'success','credits':'"
+
credits
+
"','supplierBizId':'"
+
supplierBizId
+
"'}"
;
}
else
if
(
status
==
"process"
){
return
"{'status':'success','credits':'"
+
credits
+
"','supplierBizId':'"
+
supplierBizId
+
"'}"
;
}
else
return
"{'status':'fail','errorMessage':'"
+
errorMessage
+
"','supplierBizId':'"
+
supplierBizId
+
"'}"
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
String
getErrorMessage
()
{
return
errorMessage
;
}
public
void
setErrorMessage
(
String
errorMessage
)
{
this
.
errorMessage
=
errorMessage
;
}
public
String
getSupplierBizId
()
{
return
supplierBizId
;
}
public
void
setSupplierBizId
(
String
supplierBizId
)
{
this
.
supplierBizId
=
supplierBizId
;
}
public
Long
getCredits
()
{
return
credits
;
}
public
void
setCredits
(
Long
credits
)
{
this
.
credits
=
credits
;
}
}
JeeSpringCloud/jeespring-company/src/main/java/com/company/compnay.txt
deleted
100644 → 0
View file @
e4054436
JeeSpringCloud/jeespring-company/src/main/java/com/company/project/modules/duiba/duibaRestController.java
deleted
100644 → 0
View file @
e4054436
/**
* * Copyright © 2015-2020 <a href="https://gitee.com/JeeHuangBingGui/JeeSpring">JeeSpring</a> All rights reserved..
*/
package
com.company.project.modules.duiba
;
import
cn.com.duiba.credits.sdk.BulidUrl
;
import
cn.com.duiba.credits.sdk.CreditTool
;
import
cn.com.duiba.credits.sdk.entity.CreditConsumeParams
;
import
cn.com.duiba.credits.sdk.result.CreditConsumeResult
;
import
com.jeespring.common.web.AbstractBaseController
;
import
com.jeespring.common.web.Result
;
import
com.jeespring.common.web.ResultFactory
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
/**
* 订单Controller
* @author 黄炳桂
* @version 2017-11-13
*/
@RestController
@RequestMapping
(
value
=
"/duiba"
)
@Api
(
value
=
"duiba"
,
description
=
"积分兑换"
)
public
class
duibaRestController
extends
AbstractBaseController
{
@RequestMapping
(
value
=
{
"index"
},
method
={
RequestMethod
.
POST
,
RequestMethod
.
GET
})
@ApiOperation
(
value
=
"积分兑换首页(Content-Type为text/html)"
,
notes
=
"积分兑换首页(Content-Type为text/html)"
)
public
Result
index
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
Long
credits
=
Long
.
valueOf
(
0
);
String
redirect
=
null
;
if
(
request
.
getParameter
(
"credits"
)!=
null
){
credits
=
Long
.
valueOf
(
request
.
getParameter
(
"credits"
));
}
if
(
request
.
getParameter
(
"redirect"
)!=
null
){
redirect
=
request
.
getParameter
(
"redirect"
);
}
if
(
request
.
getParameter
(
"dbredirect"
)!=
null
){
redirect
=
request
.
getParameter
(
"dbredirect"
);
}
Result
result
=
ResultFactory
.
getSuccessResult
();
result
.
setResultObject
(
BulidUrl
.
buildAutoLoginRequest
(
request
.
getParameter
(
"uid"
),
credits
,
redirect
));
return
result
;
}
@RequestMapping
(
value
=
{
"signIn"
},
method
={
RequestMethod
.
POST
,
RequestMethod
.
GET
})
@ApiOperation
(
value
=
"签到(Content-Type为text/html)"
,
notes
=
"签到(Content-Type为text/html)"
)
public
Result
signIn
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
Long
credits
=
Long
.
valueOf
(
0
);
String
redirect
=
null
;
if
(
request
.
getParameter
(
"credits"
)!=
null
){
credits
=
Long
.
valueOf
(
request
.
getParameter
(
"credits"
));
}
if
(
request
.
getParameter
(
"redirect"
)!=
null
){
redirect
=
request
.
getParameter
(
"redirect"
);
}
else
{
//redirect="http://activity.m.duiba.com.cn/activity/acShareIndex?url=https%3A%2F%2Factivity-1.m.duiba.com.cn%2Fnewtools%2Findex%3Fid%3D2685169&apk=3dqRcUoEnKDLAj5ziF63DgkZBT3z";
redirect
=
"https://activity.m.duiba.com.cn/signactivity/index?id=90&dpm=43346.41.1.0&dcm=216.90.51.0&appKey=7HWwRiKJXPiyh7pF4QnYAieVPQL&open4share=tongdun"
;
}
Result
result
=
ResultFactory
.
getSuccessResult
();
result
.
setResultObject
(
BulidUrl
.
buildAutoLoginRequest
(
request
.
getParameter
(
"uid"
),
credits
,
redirect
));
return
result
;
}
@RequestMapping
(
value
=
{
"cancle"
},
method
={
RequestMethod
.
POST
,
RequestMethod
.
GET
})
@ApiOperation
(
value
=
"扣积分(Content-Type为text/html)"
,
notes
=
"扣积分(Content-Type为text/html)"
)
public
void
cancle
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
CreditTool
tool
=
new
CreditTool
(
BulidUrl
.
AppKey
,
BulidUrl
.
AppSecret
);
try
{
CreditConsumeParams
params
=
tool
.
parseCreditConsume
(
request
);
//利用tool来解析这个请求
String
uid
=
params
.
getUid
();
//用户id
Long
credits
=
params
.
getCredits
();
String
type
=
params
.
getType
();
//获取兑换类型
String
alipay
=
params
.
getAlipay
();
//获取支付宝账号
//其他参数参见 params的属性字段
//TODO 开发者系统对uid用户扣除credits个积分
String
bizId
=
"001"
;
//返回开发者系统中的业务订单id
CreditConsumeResult
result
=
new
CreditConsumeResult
(
true
);
result
.
setBizId
(
bizId
);
response
.
getWriter
().
write
(
result
.
toString
());
}
catch
(
Exception
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
}
@RequestMapping
(
value
=
{
"add"
},
method
={
RequestMethod
.
POST
,
RequestMethod
.
GET
})
@ApiOperation
(
value
=
"加积分(Content-Type为text/html)"
,
notes
=
"加积分(Content-Type为text/html)"
)
public
String
add
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
return
"{'status': 'ok','errorMessage': '失败原因''credits': '100'}"
;
}
}
\ No newline at end of file
JeeSpringCloud/jeespring-company/src/main/java/com/company/project/modules/modules.txt
deleted
100644 → 0
View file @
e4054436
JeeSpringCloud/jeespring-company/src/main/java/com/company/project/project.txt
deleted
100644 → 0
View file @
e4054436
JeeSpringCloud/jeespring-company/src/main/resources/mappings/modules/modules.txt
deleted
100644 → 0
View file @
e4054436
JeeSpringCloud/jeespring-company/src/main/webapp/WEB-INF/views/modules/jsp说明必看和处理.txt
deleted
100644 → 0
View file @
e4054436
本模块jsp;
注意:一定复制到web项目中。
\ No newline at end of file
JeeSpringCloud/jeespring-company/src/main/webapp/staticViews/modules/jscss说明必看和处理.txt
deleted
100644 → 0
View file @
e4054436
本模块js css
注意:一定要复制到web项目中。
\ No newline at end of file
JeeSpringCloud/jeespring-framework/pom.xml
deleted
100644 → 0
View file @
e4054436
<?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"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.jeespring
</groupId>
<artifactId>
jeespring-framework
</artifactId>
<name>
jeespring-framework
</name>
<description>
jeespring-framework
</description>
<version>
1.0.0
</version>
<packaging>
jar
</packaging>
<parent>
<groupId>
com.jeespring
</groupId>
<artifactId>
jeespring
</artifactId>
<version>
1.0.0
</version>
<relativePath>
../pom.xml
</relativePath>
</parent>
<dependencies>
<dependency>
<groupId>
com.ckfinder
</groupId>
<artifactId>
apache-ant-zip
</artifactId>
<version>
2.3
</version>
<scope>
system
</scope>
<systemPath>
${project.basedir}/../jeespring-web/src/main/webapp/WEB-INF/lib/apache-ant-zip-2.3.jar
</systemPath>
</dependency>
<dependency>
<groupId>
com.ckfinder
</groupId>
<artifactId>
ckfinder
</artifactId>
<version>
2.3
</version>
<scope>
system
</scope>
<systemPath>
${project.basedir}/../jeespring-web/src/main/webapp/WEB-INF/lib/ckfinder-2.3.jar
</systemPath>
</dependency>
<dependency>
<groupId>
com.ckfinder
</groupId>
<artifactId>
ckfinderplugin-fileeditor
</artifactId>
<version>
2.3
</version>
<scope>
system
</scope>
<systemPath>
${project.basedir}/../jeespring-web/src/main/webapp/WEB-INF/lib/ckfinderplugin-fileeditor-2.3.jar
</systemPath>
</dependency>
<dependency>
<groupId>
com.ckfinder
</groupId>
<artifactId>
ckfinderplugin-imageresize
</artifactId>
<version>
2.3
</version>
<scope>
system
</scope>
<systemPath>
${project.basedir}/../jeespring-web/src/main/webapp/WEB-INF/lib/ckfinderplugin-imageresize-2.3.jar
</systemPath>
</dependency>
<dependency>
<groupId>
com.swetake
</groupId>
<artifactId>
qrcode
</artifactId>
<version>
1.5
</version>
<scope>
system
</scope>
<systemPath>
${project.basedir}/../jeespring-web/src/main/webapp/WEB-INF/lib/QRCode-1.5.jar
</systemPath>
</dependency>
<dependency>
<groupId>
bitwalker
</groupId>
<artifactId>
UserAgentUtils
</artifactId>
<version>
1.13
</version>
<scope>
system
</scope>
<systemPath>
${project.basedir}/../jeespring-web/src/main/webapp/WEB-INF/lib/UserAgentUtils-1.13.jar
</systemPath>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>
src/main/resources
</directory>
</resource>
</resources>
</build>
</project>
\ No newline at end of file
JeeSpringCloud/jeespring-framework/src/main/java/com/jeespring/common/annotation/FieldName.java
deleted
100644 → 0
View file @
e4054436
package
com.jeespring.common.annotation
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
/**
* bean中文名注解
*/
@Target
(
ElementType
.
METHOD
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
public
@interface
FieldName
{
String
value
();
}
JeeSpringCloud/jeespring-framework/src/main/java/com/jeespring/common/beanvalidator/AddGroup.java
deleted
100644 → 0
View file @
e4054436
/**
* * Copyright © 2015-2020 <a href="https://gitee.com/JeeHuangBingGui/JeeSpring">JeeSpring</a> All rights reserved..
*/
package
com.jeespring.common.beanvalidator
;
/**
* 添加Bean验证组
* @author 黄炳桂 516821420@qq.com
*
*/
public
interface
AddGroup
{
}
JeeSpringCloud/jeespring-framework/src/main/java/com/jeespring/common/beanvalidator/DefaultGroup.java
deleted
100644 → 0
View file @
e4054436
/**
* * Copyright © 2015-2020 <a href="https://gitee.com/JeeHuangBingGui/JeeSpring">JeeSpring</a> All rights reserved..
*/
package
com.jeespring.common.beanvalidator
;
/**
* 默认Bean验证组
* @author 黄炳桂 516821420@qq.com
*/
public
interface
DefaultGroup
{
}
JeeSpringCloud/jeespring-framework/src/main/java/com/jeespring/common/beanvalidator/EditGroup.java
deleted
100644 → 0
View file @
e4054436
/**
* * Copyright © 2015-2020 <a href="https://gitee.com/JeeHuangBingGui/JeeSpring">JeeSpring</a> All rights reserved..
*/
package
com.jeespring.common.beanvalidator
;
/**
* 编辑Bena验证组
* @author 黄炳桂 516821420@qq.com
*/
public
interface
EditGroup
{
}
JeeSpringCloud/jeespring-framework/src/main/java/com/jeespring/common/config/Global.java
deleted
100644 → 0
View file @
e4054436
/**
* Copyright © 2012-2016 <a href="https://github.com/HuangBingGui/jeespring">jeespring</a> All rights reserved.
*/
package
com.jeespring.common.config
;
import
com.ckfinder.connector.ServletContextFactory
;
import
com.google.common.collect.Maps
;
import
com.jeespring.common.utils.PropertiesLoader
;
import
com.jeespring.common.utils.StringUtils
;
import
com.jeespring.modules.sys.entity.SysConfig
;
import
com.jeespring.modules.sys.service.SysConfigService
;
import
org.apache.ibatis.io.Resources
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.bind.RelaxedPropertyResolver
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.io.DefaultResourceLoader
;
import
java.io.File
;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
import
java.io.Reader
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Properties
;
/**
* 全局配置类
*
* @author 黄炳桂 516821420@qq.com
* @version 2014-06-25
*/
public
class
Global
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
Global
.
class
);
static
RelaxedPropertyResolver
resolver
;
//@Autowired
//private static Environment env;
/**
* 当前对象实例
*/
private
static
Global
global
=
new
Global
();
/**
* 保存全局属性值
*/
private
static
Map
<
String
,
String
>
map
=
Maps
.
newHashMap
();
/**
* 属性文件加载对象
*/
private
static
PropertiesLoader
loader
=
new
PropertiesLoader
(
"bootstrap.yml"
);
/**
* 显示/隐藏
*/
public
static
final
String
SHOW
=
"1"
;
public
static
final
String
HIDE
=
"0"
;
/**
* 是/否
*/
public
static
final
String
YES
=
"1"
;
public
static
final
String
NO
=
"0"
;
/**
* 对/错
*/
public
static
final
String
TRUE
=
"true"
;
public
static
final
String
FALSE
=
"false"
;
/**
* 上传文件基础虚拟路径
*/
public
static
final
String
USERFILES_BASE_URL
=
"/userfiles/"
;
/**
* 获取当前对象实例
*/
public
static
Global
getInstance
()
{
return
global
;
}
/**
* 获取配置
* ${fns:getConfig('adminPath')}
*/
public
static
String
getConfig
(
String
key
)
{
String
value
=
map
.
get
(
key
);
if
(
value
==
null
)
{
try
{
value
=
resolver
.
getProperty
(
key
);
//value =env.getProperty(key);
if
(
StringUtils
.
isBlank
(
value
))
{
throw
new
RuntimeException
(
"value null"
);
}
map
.
put
(
key
,
value
);
}
catch
(
Exception
e
)
{
value
=
loader
.
getProperty
(
key
);
map
.
put
(
key
,
value
!=
null
?
value
:
StringUtils
.
EMPTY
);
}
}
return
value
;
}
public
static
String
getConfig
(
String
key
,
String
value
){
String
result
=
getConfig
(
key
);
if
(
result
==
StringUtils
.
EMPTY
){
return
value
;
}
return
result
;
}
/**
* 获取管理端根路径
*/
public
static
String
getAdminPath
()
{
return
getConfig
(
"adminPath"
);
}
/**
* 获取前端根路径
*/
public
static
String
getFrontPath
()
{
return
getConfig
(
"frontPath"
);
}
/**
* 获取URL后缀
*/
public
static
String
getUrlSuffix
()
{
return
getConfig
(
"urlSuffix"
);
}
/**
* 是否是演示模式,演示模式下不能修改用户、角色、密码、菜单、授权
*/
public
static
Boolean
isDemoMode
()
{
String
dm
=
getConfig
(
"demoMode"
);
return
"true"
.
equals
(
dm
)
||
"1"
.
equals
(
dm
);
}
public
static
String
isDemoModeDescription
()
{
String
dmd
=
getConfig
(
"demoModeDescription"
);
if
(
dmd
==
null
){
return
"演示版启用为系统能正常演示,暂时不允许操作!"
;
}
return
dmd
;
}
public
static
Boolean
isDubbo
()
{
String
dm
=
getConfig
(
"dubbo.run"
);
return
"true"
.
equals
(
dm
)
||
"1"
.
equals
(
dm
);
}
/**
* 获取上传文件的根目录
*
* @return
*/
public
static
String
getUserfilesBaseDir
()
{
String
dir
=
getConfig
(
"userfiles.basedir"
);
if
(
StringUtils
.
isBlank
(
dir
))
{
try
{
dir
=
ServletContextFactory
.
getServletContext
().
getRealPath
(
"/"
);
}
catch
(
Exception
e
)
{
return
""
;
}
}
if
(!
dir
.
endsWith
(
"/"
))
{
dir
+=
"/"
;
}
return
dir
;
}
public
static
String
getJdbcType
()
{
if
(
map
.
containsKey
(
"spring.datasource.url"
))
{
return
map
.
get
(
"spring.datasource.url"
);
}
try
{
String
url
=
resolver
.
getProperty
(
"spring.datasource.url"
);
//String url = env.getProperty("spring.datasource.url");
String
type
=
getDbType
(
url
);
map
.
put
(
"spring.datasource.url"
,
type
);
return
type
;
}
catch
(
Exception
e
)
{
logger
.
error
(
"get jdbcType error"
,
e
);
}
logger
.
error
(
"return the defaut jdbc type is mysql"
);
return
"mysql"
;
}
private
static
String
getDbType
(
String
rawUrl
)
{
return
rawUrl
==
null
?
null
:
(!
rawUrl
.
startsWith
(
"jdbc:derby:"
)
&&
!
rawUrl
.
startsWith
(
"jdbc:log4jdbc:derby:"
)
?
(!
rawUrl
.
startsWith
(
"jdbc:mysql:"
)
&&
!
rawUrl
.
startsWith
(
"jdbc:cobar:"
)
&&
!
rawUrl
.
startsWith
(
"jdbc:log4jdbc:mysql:"
)
?
(
rawUrl
.
startsWith
(
"jdbc:mariadb:"
)
?
"mariadb"
:
(!
rawUrl
.
startsWith
(
"jdbc:oracle:"
)
&&
!
rawUrl
.
startsWith
(
"jdbc:log4jdbc:oracle:"
)
?
(
rawUrl
.
startsWith
(
"jdbc:alibaba:oracle:"
)
?
"AliOracle"
:
(!
rawUrl
.
startsWith
(
"jdbc:microsoft:"
)
&&
!
rawUrl
.
startsWith
(
"jdbc:log4jdbc:microsoft:"
)
?
(!
rawUrl
.
startsWith
(
"jdbc:sqlserver:"
)
&&
!
rawUrl
.
startsWith
(
"jdbc:log4jdbc:sqlserver:"
)
?
(!
rawUrl
.
startsWith
(
"jdbc:sybase:Tds:"
)
&&
!
rawUrl
.
startsWith
(
"jdbc:log4jdbc:sybase:"
)
?
(!
rawUrl
.
startsWith
(
"jdbc:jtds:"
)
&&
!
rawUrl
.
startsWith
(
"jdbc:log4jdbc:jtds:"
)
?
(!
rawUrl
.
startsWith
(
"jdbc:fake:"
)
&&
!
rawUrl
.
startsWith
(
"jdbc:mock:"
)
?
(!
rawUrl
.
startsWith
(
"jdbc:postgresql:"
)
&&
!
rawUrl
.
startsWith
(
"jdbc:log4jdbc:postgresql:"
)
?
(
rawUrl
.
startsWith
(
"jdbc:edb:"
)
?
"edb"
:
(!
rawUrl
.
startsWith
(
"jdbc:hsqldb:"
)
&&
!
rawUrl
.
startsWith
(
"jdbc:log4jdbc:hsqldb:"
)
?
(
rawUrl
.
startsWith
(
"jdbc:odps:"
)
?
"odps"
:
(
rawUrl
.
startsWith
(
"jdbc:db2:"
)
?
"db2"
:
(
rawUrl
.
startsWith
(
"jdbc:sqlite:"
)
?
"sqlite"
:
(
rawUrl
.
startsWith
(
"jdbc:ingres:"
)
?
"ingres"
:
(!
rawUrl
.
startsWith
(
"jdbc:h2:"
)
&&
!
rawUrl
.
startsWith
(
"jdbc:log4jdbc:h2:"
)
?
(
rawUrl
.
startsWith
(
"jdbc:mckoi:"
)
?
"mckoi"
:
(
rawUrl
.
startsWith
(
"jdbc:cloudscape:"
)
?
"cloudscape"
:
(!
rawUrl
.
startsWith
(
"jdbc:informix-sqli:"
)
&&
!
rawUrl
.
startsWith
(
"jdbc:log4jdbc:informix-sqli:"
)
?
(
rawUrl
.
startsWith
(
"jdbc:timesten:"
)
?
"timesten"
:
(
rawUrl
.
startsWith
(
"jdbc:as400:"
)
?
"as400"
:
(
rawUrl
.
startsWith
(
"jdbc:sapdb:"
)
?
"sapdb"
:
(
rawUrl
.
startsWith
(
"jdbc:JSQLConnect:"
)
?
"JSQLConnect"
:
(
rawUrl
.
startsWith
(
"jdbc:JTurbo:"
)
?
"JTurbo"
:
(
rawUrl
.
startsWith
(
"jdbc:firebirdsql:"
)
?
"firebirdsql"
:
(
rawUrl
.
startsWith
(
"jdbc:interbase:"
)
?
"interbase"
:
(
rawUrl
.
startsWith
(
"jdbc:pointbase:"
)
?
"pointbase"
:
(
rawUrl
.
startsWith
(
"jdbc:edbc:"
)
?
"edbc"
:
(
rawUrl
.
startsWith
(
"jdbc:mimer:multi1:"
)
?
"mimer"
:
(
rawUrl
.
startsWith
(
"jdbc:dm:"
)
?
"dm"
:
(
rawUrl
.
startsWith
(
"jdbc:kingbase:"
)
?
"kingbase"
:
(
rawUrl
.
startsWith
(
"jdbc:log4jdbc:"
)
?
"log4jdbc"
:
(
rawUrl
.
startsWith
(
"jdbc:hive:"
)
?
"hive"
:
(
rawUrl
.
startsWith
(
"jdbc:hive2:"
)
?
"hive"
:
(
rawUrl
.
startsWith
(
"jdbc:phoenix:"
)
?
"phoenix"
:
null
))))))))))))))))
:
"informix"
)))
:
"h2"
)))))
:
"hsql"
))
:
"postgresql"
)
:
"mock"
)
:
"jtds"
)
:
"sybase"
)
:
"sqlserver"
)
:
"sqlserver"
))
:
"oracle"
))
:
"mysql"
)
:
"derby"
);
}
/**
* 获取工程路径
* @return
*/
public
static
String
getProjectPath
(){
// 如果配置了工程路径,则直接返回,否则自动获取。
String
projectPath
=
Global
.
getConfig
(
"projectPath"
);
if
(
StringUtils
.
isNotBlank
(
projectPath
)){
return
projectPath
;
}
try
{
File
file
=
new
DefaultResourceLoader
().
getResource
(
""
).
getFile
();
if
(
file
!=
null
){
while
(
true
){
File
f
=
new
File
(
file
.
getPath
()
+
File
.
separator
+
"src"
+
File
.
separator
+
"main"
);
if
(
f
==
null
||
f
.
exists
()){
break
;
}
if
(
file
.
getParentFile
()
!=
null
){
file
=
file
.
getParentFile
();
}
else
{
break
;
}
}
projectPath
=
file
.
toString
();
}
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
return
projectPath
;
}
/**
* 写入properties信息
*
* @param key
* 名称
* @param value
* 值
*/
public
static
void
modifyConfig
(
String
key
,
String
value
)
{
try
{
// 从输入流中读取属性列表(键和元素对)
Properties
prop
=
getProperties
();
prop
.
setProperty
(
key
,
value
);
String
path
=
Global
.
class
.
getResource
(
"/jeespring.properties"
).
getPath
();
FileOutputStream
outputFile
=
new
FileOutputStream
(
path
);
prop
.
store
(
outputFile
,
"modify"
);
outputFile
.
close
();
outputFile
.
flush
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
/**
* (注意:加载的是src下的文件,如果在某个包下.请把包名加上)
* 返回 Properties
* @return
*/
public
static
Properties
getProperties
(){
Properties
prop
=
new
Properties
();
try
{
Reader
reader
=
Resources
.
getResourceAsReader
(
"/jeespring.properties"
);
prop
.
load
(
reader
);
}
catch
(
Exception
e
)
{
return
null
;
}
return
prop
;
}
}
JeeSpringCloud/jeespring-framework/src/main/java/com/jeespring/common/config/ScheduleConfig.java
deleted
100644 → 0
View file @
e4054436
package
com.jeespring.common.config
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.scheduling.quartz.SchedulerFactoryBean
;
import
javax.sql.DataSource
;
import
java.util.Properties
;
/**
* 定时任务配置
*
* @author JeeSpring
*
*/
@Configuration
public
class
ScheduleConfig
{
@Bean
public
SchedulerFactoryBean
schedulerFactoryBean
(
DataSource
dataSource
)
{
SchedulerFactoryBean
factory
=
new
SchedulerFactoryBean
();
factory
.
setDataSource
(
dataSource
);
// quartz参数
Properties
prop
=
new
Properties
();
prop
.
put
(
"org.quartz.scheduler.instanceName"
,
"RuoyiScheduler"
);
prop
.
put
(
"org.quartz.scheduler.instanceId"
,
"AUTO"
);
// 线程池配置
prop
.
put
(
"org.quartz.threadPool.class"
,
"org.quartz.simpl.SimpleThreadPool"
);
prop
.
put
(
"org.quartz.threadPool.threadCount"
,
"20"
);
prop
.
put
(
"org.quartz.threadPool.threadPriority"
,
"5"
);
// JobStore配置
prop
.
put
(
"org.quartz.jobStore.class"
,
"org.quartz.impl.jdbcjobstore.JobStoreTX"
);
// 集群配置
prop
.
put
(
"org.quartz.jobStore.isClustered"
,
"true"
);
prop
.
put
(
"org.quartz.jobStore.clusterCheckinInterval"
,
"15000"
);
prop
.
put
(
"org.quartz.jobStore.maxMisfiresToHandleAtATime"
,
"1"
);
prop
.
put
(
"org.quartz.jobStore.txIsolationLevelSerializable"
,
"true"
);
prop
.
put
(
"org.quartz.jobStore.misfireThreshold"
,
"12000"
);
prop
.
put
(
"org.quartz.jobStore.tablePrefix"
,
"QRTZ_"
);
factory
.
setQuartzProperties
(
prop
);
factory
.
setSchedulerName
(
"RuoyiScheduler"
);
// 延时启动
factory
.
setStartupDelay
(
1
);
factory
.
setApplicationContextSchedulerContextKey
(
"applicationContextKey"
);
// 可选,QuartzScheduler
// 启动时更新己存在的Job,这样就不用每次修改targetObject后删除qrtz_job_details表对应记录了
factory
.
setOverwriteExistingJobs
(
true
);
// 设置自动启动,默认为true
factory
.
setAutoStartup
(
true
);
return
factory
;
}
}
JeeSpringCloud/jeespring-framework/src/main/java/com/jeespring/common/config/ShiroConfig.java
deleted
100644 → 0
View file @
e4054436
package
com.jeespring.common.config
;
import
com.jeespring.common.filter.LogoutFilter
;
import
com.jeespring.common.filter.OnlineSessionFilter
;
import
com.jeespring.common.redis.RedisUtils
;
import
com.jeespring.common.security.shiro.session.CacheSessionDAO
;
import
com.jeespring.common.security.shiro.session.SessionManager
;
import
com.jeespring.modules.sys.dao.OnlineSessionDAO
;
import
com.jeespring.modules.sys.dao.OnlineSessionFactory
;
import
com.jeespring.modules.sys.security.FormAuthenticationFilter
;
import
com.jeespring.modules.sys.security.SystemAuthorizingRealm
;
import
net.sf.ehcache.CacheManager
;
import
org.apache.shiro.cache.ehcache.EhCacheManager
;
import
org.apache.shiro.spring.LifecycleBeanPostProcessor
;
import
org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor
;
import
org.apache.shiro.spring.web.ShiroFilterFactoryBean
;
import
org.apache.shiro.web.filter.authc.BasicHttpAuthenticationFilter
;
import
org.apache.shiro.web.mgt.DefaultWebSecurityManager
;
import
org.apache.shiro.web.servlet.SimpleCookie
;
import
org.crazycake.shiro.RedisCacheManager
;
import
org.crazycake.shiro.RedisManager
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.bind.RelaxedPropertyResolver
;
import
org.springframework.boot.web.servlet.FilterRegistrationBean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.DependsOn
;
import
org.springframework.core.env.Environment
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.filter.DelegatingFilterProxy
;
import
com.jeespring.common.filter.SyncOnlineSessionFilter
;
import
javax.servlet.Filter
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* shiro的控制类
* 下面方法的顺序不能乱
* Created by zhao.weiwei
* create on 2017/1/11 10:59
* the email is zhao.weiwei@jyall.com.
*/
@Component
public
class
ShiroConfig
{
/**
* 日志对象
*/
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
RedisUtils
.
class
);
@Autowired
public
OnlineSessionDAO
sessionDAO
;
@Autowired
public
OnlineSessionFactory
sessionFactory
;
// Session超时时间,单位为毫秒(默认30分钟)
@Value
(
"${shiro.session.expireTime}"
)
private
int
expireTime
;
//启动shiro redis缓存,单点登录
//@Value("${shiro.redis}")
//private String shiroRedis;
// 相隔多久检查一次session的有效性,单位毫秒,默认就是10分钟
@Value
(
"${shiro.session.validationInterval}"
)
private
int
validationInterval
;
// 验证码开关
@Value
(
"${shiro.user.captchaEbabled}"
)
private
boolean
captchaEbabled
;
// 验证码类型
@Value
(
"${shiro.user.captchaType}"
)
private
String
captchaType
;
// 设置Cookie的域名
@Value
(
"${shiro.cookie.domain}"
)
private
String
domain
;
// 设置cookie的有效访问路径
@Value
(
"${shiro.cookie.path}"
)
private
String
path
;
// 设置HttpOnly属性
@Value
(
"${shiro.cookie.httpOnly}"
)
private
boolean
httpOnly
;
// 设置Cookie的过期时间,秒为单位
@Value
(
"${shiro.cookie.maxAge}"
)
private
int
maxAge
;
// 登录地址
@Value
(
"${shiro.user.loginUrl}"
)
private
String
loginUrl
=
"/admin/login"
;
// 权限认证失败地址
@Value
(
"${shiro.user.unauthorizedUrl}"
)
private
String
unauthorizedUrl
;
/**
* 全局的环境变量的设置
* shiro的拦截
*
* @param environment
* @param adminPath
* @return
*/
@Bean
(
name
=
"shiroFilterChainDefinitions"
)
public
String
shiroFilterChainDefinitions
(
Environment
environment
,
@Value
(
"${adminPath}"
)
String
adminPath
,
@Value
(
"${frontPath}"
)
String
frontPath
)
{
Global
.
resolver
=
new
RelaxedPropertyResolver
(
environment
);
StringBuilder
string
=
new
StringBuilder
();
string
.
append
(
"/static/** = anon\n"
);
string
.
append
(
"/staticViews/** = anon\n"
);
string
.
append
(
"/jeeSpringStatic/** = anon\n"
);
string
.
append
(
"/userfiles/** = anon\n"
);
string
.
append
(
"/rest/** = anon\n"
);
string
.
append
(
frontPath
+
"/** = anon\n"
);
string
.
append
(
adminPath
+
"/basic = basic\n"
);
string
.
append
(
adminPath
+
"/login = authc\n"
);
string
.
append
(
adminPath
+
"/loginBase = anon\n"
);
string
.
append
(
adminPath
+
"/logout = logout\n"
);
string
.
append
(
adminPath
+
"/register = anon\n"
);
string
.
append
(
adminPath
+
"/sys/register/registerUser = anon\n"
);
string
.
append
(
adminPath
+
"/sys/user/validateLoginName = anon\n"
);
string
.
append
(
adminPath
+
"/sys/user/validateMobile = anon\n"
);
string
.
append
(
adminPath
+
"/** = user\n"
);
string
.
append
(
"/ReportServer/** = user"
);
return
string
.
toString
();
}
@Bean
(
name
=
"basicHttpAuthenticationFilter"
)
public
BasicHttpAuthenticationFilter
casFilter
(
@Value
(
"${adminPath:/a}"
)
String
adminPath
)
{
BasicHttpAuthenticationFilter
basicHttpAuthenticationFilter
=
new
BasicHttpAuthenticationFilter
();
basicHttpAuthenticationFilter
.
setLoginUrl
(
adminPath
+
"/login"
);
return
basicHttpAuthenticationFilter
;
}
@Bean
(
name
=
"shiroFilter"
)
public
ShiroFilterFactoryBean
shiroFilterFactoryBean
(
@Value
(
"${adminPath:/a}"
)
String
adminPath
,
BasicHttpAuthenticationFilter
basicHttpAuthenticationFilter
,
FormAuthenticationFilter
formAuthenticationFilter
,
DefaultWebSecurityManager
securityManager
,
@Qualifier
(
"shiroFilterChainDefinitions"
)
String
shiroFilterChainDefinitions
)
{
Map
<
String
,
Filter
>
filters
=
new
HashMap
<>();
filters
.
put
(
"basic"
,
basicHttpAuthenticationFilter
);
filters
.
put
(
"authc"
,
formAuthenticationFilter
);
filters
.
put
(
"syncOnlineSession"
,
syncOnlineSessionFilter
());
//filters.put("onlineSession", onlineSessionFilter());
filters
.
put
(
"logout"
,
logoutFilter
());
ShiroFilterFactoryBean
bean
=
new
ShiroFilterFactoryBean
();
bean
.
setFilters
(
filters
);
bean
.
setSecurityManager
(
securityManager
);
bean
.
setLoginUrl
(
adminPath
+
"/login"
);
bean
.
setSuccessUrl
(
adminPath
+
"?login"
);
// Shiro过滤器配置
bean
.
setFilterChainDefinitions
(
shiroFilterChainDefinitions
);
return
bean
;
}
@Bean
(
name
=
"shiroCacheManager"
)
public
EhCacheManager
shiroCacheManager
(
CacheManager
manager
)
{
EhCacheManager
ehCacheManager
=
new
EhCacheManager
();
ehCacheManager
.
setCacheManager
(
manager
);
return
ehCacheManager
;
}
//@Bean(name = "redisCacheManager")
public
RedisCacheManager
redisCacheManager
(
String
redisHostName
,
String
reidsPassword
,
int
reidsPort
,
int
expireTimeShiro
)
{
RedisCacheManager
redisCacheManager
=
new
RedisCacheManager
();
RedisManager
redisManager
=
new
RedisManager
();
redisManager
.
setHost
(
redisHostName
);
redisManager
.
setPassword
(
reidsPassword
);
redisManager
.
setPort
(
reidsPort
);
redisManager
.
setExpire
(
expireTimeShiro
);
redisCacheManager
.
setRedisManager
(
redisManager
);
return
redisCacheManager
;
}
@Bean
(
name
=
"sessionManager"
)
public
SessionManager
sessionManager
(
CacheSessionDAO
dao
)
{
SessionManager
sessionManager
=
new
SessionManager
();
sessionManager
.
setSessionDAO
(
dao
);
// 设置全局session超时时间
sessionManager
.
setGlobalSessionTimeout
(
86400000
);
// 相隔多久检查一次session的有效性,单位毫秒,默认就是10分钟
sessionManager
.
setSessionValidationInterval
(
1800000
);
sessionManager
.
setSessionValidationSchedulerEnabled
(
true
);
sessionManager
.
setSessionIdCookie
(
new
SimpleCookie
(
"com.jeespring.session.id"
));
sessionManager
.
setSessionIdCookieEnabled
(
true
);
// 删除过期的session
sessionManager
.
setDeleteInvalidSessions
(
true
);
// 去掉 JSESSIONID
sessionManager
.
setSessionIdUrlRewritingEnabled
(
false
);
// 是否定时检查session
sessionManager
.
setSessionValidationSchedulerEnabled
(
true
);
// 自定义SessionDao
//sessionManager.setSessionDAO(sessionDAO());
// 自定义sessionFactory
//sessionManager.setSessionFactory(sessionFactory());
return
sessionManager
;
}
@Bean
(
name
=
"securityManager"
)
public
DefaultWebSecurityManager
defaultWebSecurityManager
(
SystemAuthorizingRealm
systemAuthorizingRealm
,
SessionManager
sessionManager
,
EhCacheManager
ehCacheManager
,
@Value
(
"${spring.redis.run}"
)
String
redisRun
,
@Value
(
"${spring.redis.hostName}"
)
String
redisHostName
,
@Value
(
"${spring.redis.password}"
)
String
reidsPassword
,
@Value
(
"${spring.redis.port}"
)
int
redisPort
,
@Value
(
"${spring.redis.expireTimeShiro}"
)
int
expireTimeShiro
,
@Value
(
"${shiro.redis}"
)
String
shiroRedis
)
{
DefaultWebSecurityManager
defaultWebSecurityManager
=
new
DefaultWebSecurityManager
();
defaultWebSecurityManager
.
setSessionManager
(
sessionManager
);
if
(
"true"
.
equals
(
redisRun
)
&&
"true"
.
equals
(
shiroRedis
)){
try
{
// 加入缓存管理器
defaultWebSecurityManager
.
setCacheManager
(
redisCacheManager
(
redisHostName
,
reidsPassword
,
redisPort
,
expireTimeShiro
));
}
catch
(
Exception
e
)
{
logger
.
error
(
"RedisUtils run:"
+
RedisUtils
.
RUN_MESSAGE
+
e
.
getMessage
(),
RedisUtils
.
RUN_MESSAGE
+
e
.
getMessage
());
defaultWebSecurityManager
.
setCacheManager
(
ehCacheManager
);
}
}
else
{
// 加入缓存管理器
defaultWebSecurityManager
.
setCacheManager
(
ehCacheManager
);
}
defaultWebSecurityManager
.
setRealm
(
systemAuthorizingRealm
);
return
defaultWebSecurityManager
;
}
@Bean
public
AuthorizationAttributeSourceAdvisor
authorizationAttributeSourceAdvisor
(
DefaultWebSecurityManager
defaultWebSecurityManager
)
{
AuthorizationAttributeSourceAdvisor
authorizationAttributeSourceAdvisor
=
new
AuthorizationAttributeSourceAdvisor
();
authorizationAttributeSourceAdvisor
.
setSecurityManager
(
defaultWebSecurityManager
);
return
authorizationAttributeSourceAdvisor
;
}
@Bean
public
FilterRegistrationBean
filterRegistrationBean
()
{
FilterRegistrationBean
filterRegistration
=
new
FilterRegistrationBean
();
filterRegistration
.
setFilter
(
new
DelegatingFilterProxy
(
"shiroFilter"
));
filterRegistration
.
addInitParameter
(
"targetFilterLifecycle"
,
"true"
);
filterRegistration
.
setEnabled
(
true
);
filterRegistration
.
addUrlPatterns
(
"/*"
);
return
filterRegistration
;
}
@Bean
(
name
=
"lifecycleBeanPostProcessor"
)
public
LifecycleBeanPostProcessor
lifecycleBeanPostProcessor
()
{
return
new
LifecycleBeanPostProcessor
();
}
@Bean
@DependsOn
(
"lifecycleBeanPostProcessor"
)
public
DefaultAdvisorAutoProxyCreator
defaultAdvisorAutoProxyCreator
()
{
DefaultAdvisorAutoProxyCreator
defaultAdvisorAutoProxyCreator
=
new
DefaultAdvisorAutoProxyCreator
();
defaultAdvisorAutoProxyCreator
.
setProxyTargetClass
(
true
);
return
defaultAdvisorAutoProxyCreator
;
}
/**
* 自定义在线用户处理过滤器
*/
public
OnlineSessionFilter
onlineSessionFilter
()
{
OnlineSessionFilter
onlineSessionFilter
=
new
OnlineSessionFilter
();
//onlineSessionFilter.setLoginUrl(loginUrl);
return
onlineSessionFilter
;
}
/**
* 自定义在线用户同步过滤器
*/
@Bean
public
SyncOnlineSessionFilter
syncOnlineSessionFilter
()
{
SyncOnlineSessionFilter
syncOnlineSessionFilter
=
new
SyncOnlineSessionFilter
();
return
syncOnlineSessionFilter
;
}
public
LogoutFilter
logoutFilter
()
{
LogoutFilter
logoutFilter
=
new
LogoutFilter
();
logoutFilter
.
setLoginUrl
(
loginUrl
);
return
logoutFilter
;
}
}
JeeSpringCloud/jeespring-framework/src/main/java/com/jeespring/common/constant/Constants.java
deleted
100644 → 0
View file @
e4054436
package
com.jeespring.common.constant
;
/**
* 通用常量信息
*
* @author JeeSpring
*/
public
class
Constants
{
/**
* UTF-8 字符集
*/
public
static
final
String
UTF8
=
"UTF-8"
;
/**
* 通用成功标识
*/
public
static
final
String
SUCCESS
=
"0"
;
/**
* 通用失败标识
*/
public
static
final
String
FAIL
=
"1"
;
/**
* 登录成功
*/
public
static
final
String
LOGIN_SUCCESS
=
"Success"
;
/**
* 注销
*/
public
static
final
String
LOGOUT
=
"Logout"
;
/**
* 登录失败
*/
public
static
final
String
LOGIN_FAIL
=
"Error"
;
/**
* 自动去除表前缀
*/
public
static
String
AUTO_REOMVE_PRE
=
"true"
;
/**
* 当前记录起始索引
*/
public
static
String
PAGE_NUM
=
"pageNum"
;
/**
* 每页显示记录数
*/
public
static
String
PAGE_SIZE
=
"pageSize"
;
/**
* 排序列
*/
public
static
String
ORDER_BY_COLUMN
=
"orderByColumn"
;
/**
* 排序的方向 "desc" 或者 "asc".
*/
public
static
String
IS_ASC
=
"isAsc"
;
}
JeeSpringCloud/jeespring-framework/src/main/java/com/jeespring/common/constant/ScheduleConstants.java
deleted
100644 → 0
View file @
e4054436
package
com.jeespring.common.constant
;
/**
* 任务调度通用常量
*
* @author JeeSpring
*/
public
interface
ScheduleConstants
{
public
static
final
String
TASK_CLASS_NAME
=
"__TASK_CLASS_NAME__"
;
public
static
final
String
TASK_PROPERTIES
=
"__TASK_PROPERTIES__"
;
/** 默认 */
public
static
final
String
MISFIRE_DEFAULT
=
"0"
;
/** 立即触发执行 */
public
static
final
String
MISFIRE_IGNORE_MISFIRES
=
"1"
;
/** 触发一次执行 */
public
static
final
String
MISFIRE_FIRE_AND_PROCEED
=
"2"
;
/** 不触发立即执行 */
public
static
final
String
MISFIRE_DO_NOTHING
=
"3"
;
public
enum
Status
{
/**
* 正常
*/
NORMAL
(
"0"
),
/**
* 暂停
*/
PAUSE
(
"1"
);
private
String
value
;
private
Status
(
String
value
)
{
this
.
value
=
value
;
}
public
String
getValue
()
{
return
value
;
}
}
}
Prev
1
…
3
4
5
6
7
8
9
10
11
…
21
Next
Write
Preview
Supports
Markdown
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