Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
matrix
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
mall
arch
matrix
Commits
cce1a3d5
Commit
cce1a3d5
authored
Aug 15, 2019
by
qiuweili123
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加zk依赖;util类曾加BizResponse对象处理
parent
2dba5c90
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
1 deletions
+33
-1
BeanUtil.java
common-util/src/main/java/com/secoo/mall/common/util/bean/BeanUtil.java
+1
-0
ObjectUtils.java
common-util/src/main/java/com/secoo/mall/common/util/object/ObjectUtils.java
+2
-1
ResponseUtil.java
common-util/src/main/java/com/secoo/mall/common/util/response/ResponseUtil.java
+13
-0
pom.xml
pom.xml
+17
-0
No files found.
common-util/src/main/java/com/secoo/mall/common/util/bean/BeanUtil.java
View file @
cce1a3d5
...
...
@@ -23,6 +23,7 @@ public class BeanUtil extends BeanUtils {
return
ArrayUtils
.
contains
(
arr
,
obj
);
}
public
static
<
T
>
Object
getFieldValueByName
(
T
obj
,
String
fieldName
)
throws
Exception
{
Class
clazz
=
obj
.
getClass
();
Field
field
=
clazz
.
getDeclaredField
(
fieldName
);
...
...
common-util/src/main/java/com/secoo/mall/common/util/object/ObjectUtils.java
View file @
cce1a3d5
...
...
@@ -5,8 +5,9 @@ import java.util.Map;
import
java.util.Set
;
/**
*
Created by liumingming on 2018/6/13.
*
推荐使用CollectionUtil相关方法
*/
@Deprecated
public
class
ObjectUtils
{
/**
...
...
common-util/src/main/java/com/secoo/mall/common/util/response/ResponseUtil.java
View file @
cce1a3d5
package
com
.
secoo
.
mall
.
common
.
util
.
response
;
import
com.secoo.mall.common.constant.CommonConstant
;
import
com.secoo.mall.common.core.bean.BizResponse
;
import
com.secoo.mall.common.core.bean.Response
;
import
com.secoo.mall.common.core.exception.BusinessException
;
...
...
@@ -21,4 +22,16 @@ public interface ResponseUtil {
return
response
;
}
/**
* 业务BizResponse处理
*
* @param data
* @param <T>
* @return
*/
static
<
T
>
BizResponse
getSuccessBizResponse
(
T
data
)
{
BizResponse
response
=
new
BizResponse
(
CommonConstant
.
Success
.
CODE
,
CommonConstant
.
Success
.
MSG
);
response
.
setData
(
data
);
return
response
;
}
}
pom.xml
View file @
cce1a3d5
...
...
@@ -210,6 +210,23 @@
</exclusion>
</exclusions>
</dependency>
<!--zookeeper-->
<dependency>
<groupId>
org.apache.dubbo
</groupId>
<artifactId>
dubbo-dependencies-zookeeper
</artifactId>
<version>
${dubbo.version}
</version>
<type>
pom
</type>
<exclusions>
<exclusion>
<artifactId>
log4j
</artifactId>
<groupId>
log4j
</groupId>
</exclusion>
<exclusion>
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-log4j12
</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--rocketmq-->
<dependency>
<groupId>
org.apache.rocketmq
</groupId>
...
...
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